Skip to content

Latest commit

Β 

History

History
95 lines (69 loc) Β· 3.51 KB

File metadata and controls

95 lines (69 loc) Β· 3.51 KB

🌊 StellarFlow Frontend

🌍 Africa-Oriented Data Oracle Dashboard | Modern Web3 interface for localized real-time data on Stellar.

StellarFlow Frontend is a cutting-edge Next.js 15 application that provides a seamless user interface for interacting with the StellarFlow Oracle. [cite_start]Our platform specializes in providing localized, high-impact data visualizations for the African market[cite: 1, 12].

πŸš€ Features

  • πŸ’° Multi-Currency Support: View data in XLM, NGN, KES, and GHS.
  • [cite_start]πŸ” Wallet Integration: Support for Albedo and Freightliner[cite: 701].
  • [cite_start]πŸ“± Mobile-First Design: Optimized for performance on lower-bandwidth devices using Tailwind CSS[cite: 1, 91].
  • [cite_start]πŸ“Š Live Oracle Feed: Real-time status updates from the StellarFlow Backend[cite: 5, 185].

πŸ› οΈ Quick Start

Prerequisites

  • [cite_start]Node.js v18+ [cite: 83]
  • [cite_start]Stellar Wallet (Albedo recommended) [cite: 760]

Installation

git clone [https://github.com/StellarFlow-Network/stellarflow-frontend.git](https://github.com/StellarFlow-Network/stellarflow-frontend.git)
cd stellarflow-frontend
npm install
npm run dev

🎨 Tech Stack

Framework: Next.js 15 (App Router) 
Styling: Tailwind CSS 
State Management: Zustand 
Web3: @stellar/stellar-sdk

---

### 2. Backend README (`stellarflow-backend`)
**Location:** `stellarflow-backend/README.md`

```markdown
# βš™οΈ StellarFlow Backend

> πŸ—οΈ **Oracle Infrastructure & Data Engine** | TypeScript/Node.js backend for the StellarFlow network.

This repository serves as the central data engine for StellarFlow. It orchestrates real-time price fetching from localized African markets and feeds that data to the Soroban smart contracts on the Stellar blockchain[cite: 17, 172].

## πŸ› οΈ Key Services
- **πŸ›°οΈ Price Oracle**: Fetches real-time exchange rates (e.g., NGN/XLM) every 10 seconds[cite: 179].
- **πŸ”— Soroban Service**: Interfaces with on-chain contracts to resolve oracle data[cite: 180].
- **πŸ›‘οΈ JWT Auth**: Secure, wallet-based authentication[cite: 172].
- **πŸ’Ύ Database**: Scalable PostgreSQL with Prisma ORM[cite: 194].

## πŸ“‚ Project Structure
```text
β”œβ”€β”€ prisma/        # Database schema and migrations [cite: 194]
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ routes/    # API Endpoints [cite: 174]
β”‚   β”œβ”€β”€ services/  # Business logic (Oracle, Soroban) [cite: 175]
β”‚   └── utils/     # Helper functions [cite: 176]

Running the Server

Configure .env: Copy .env.example and add your SOROBAN_ADMIN_SECRET.
Install: npm install 
Run: npm run dev

---

### 3. Smart Contracts README (`stellarflow-contracts`)
**Location:** `stellarflow-contracts/README.md`

```markdown
# πŸ“œ StellarFlow Smart Contracts

> πŸ’Ž **Soroban Smart Contracts** | The trustless core of the StellarFlow Oracle.

These smart contracts, written in **Rust**, manage the on-chain verification and storage of Oracle data. Built specifically for the **Soroban** platform on Stellar[cite: 170, 443].

## πŸ›‘οΈ Contract Functions
- **`initialize`**: Set the admin and authorized data providers.
- **`push_data`**: Allow authorized oracles to submit new data points.
- **`get_latest_price`**: Public function for other dApps to consume Oracle data.

## πŸ”§ Development
### Prerequisites
- **Rust Toolchain**: `rustup` [cite: 195]
- **Stellar CLI**: `stellar-cli` 

### Build & Test
```bash
# Build the contract to .wasm
stellar contract build

# Run unit tests
cargo test

Acknowledgments
Built with ❀️ for the Stellar Africa community.