Skip to content

0xdevmes/afri-dollar

 
 

Repository files navigation

AfriDollar

Stellar-powered financial infrastructure for African businesses.

License: MIT Node Version TypeScript

Overview

AfriDollar is a comprehensive financial infrastructure platform built on the Stellar blockchain, designed to provide African businesses with access to digital dollars, transparent foreign exchange services, and fast cross-border payments. The platform leverages USDC on Stellar, compliant asset issuance, and interoperable payment rails to help businesses reduce currency volatility risks, access USD liquidity, and settle transactions in seconds.

Vision

To make digital dollar access and cross-border payments seamless, transparent, and accessible for businesses across Africa.

Mission

To build compliant and scalable financial infrastructure using Stellar that enables African businesses to transact globally with speed, reliability, and low cost.

Key Features

  • Business Wallets: Self-custodied Stellar wallets designed for businesses
  • Treasury Management: Digital dollar treasury management using USDC
  • FX Conversion: Conversion between local currencies and USDC with transparent exchange rates
  • Payroll Infrastructure: Payroll distribution in USDC and local stable assets
  • Cross-Border Payments: Infrastructure for supplier and international settlement payments
  • Compliance Layer: Authorization flags, clawback functionality, KYC/AML verification

Architecture

Frontend → Backend Services → Stellar Infrastructure
                         ↓
              Treasury & Compliance Layer
                         ↓
                 Banking Integrations

Tech Stack

Layer Technology
Frontend Next.js 14, React 18, TypeScript, Tailwind CSS
Backend Express.js, TypeScript, REST APIs
Blockchain Stellar SDK, Soroban SDK, Stellar Horizon APIs
Database PostgreSQL, Redis
Containerization Docker
Infrastructure Cloud Services

Project Structure

afri-dollar/
├── apps/
│   ├── backend/          # Express.js backend API
│   └── frontend/         # Next.js frontend application
├── packages/
│   ├── database/         # Shared database configurations and migrations
│   └── shared/           # Shared utilities and types
├── .github/              # GitHub workflows and configurations
└── docs/                 # Additional documentation

Getting Started

Prerequisites

  • Node.js >= 18.0.0
  • npm >= 9.0.0
  • PostgreSQL
  • Redis
  • Docker (optional, for containerization)

Installation

  1. Clone the repository:
git clone https://github.com/0xdevmes/afri-dollar.git
cd afri-dollar
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env

Configure the required environment variables in .env:

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/afridollar
REDIS_URL=redis://localhost:6379

# Stellar
STELLAR_NETWORK=testnet
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
STELLAR_SECRET_KEY=your_secret_key

# API Keys
CIRCLE_API_KEY=your_circle_api_key
REHIVE_API_KEY=your_rehive_api_key

# JWT
JWT_SECRET=your_jwt_secret
  1. Set up the database:
npm run db:migrate
npm run db:seed
  1. Start the development servers:
npm run dev

This will start both the frontend (http://localhost:3000) and backend (http://localhost:3001) servers.

Available Scripts

  • npm run dev - Start development servers for all apps and packages
  • npm run build - Build all apps and packages for production
  • npm run test - Run tests across all packages
  • npm run lint - Run ESLint across all packages
  • npm run format - Format code with Prettier
  • npm run format:check - Check code formatting
  • npm run type-check - Run TypeScript type checking across all packages

Development Workflow

Working with the Monorepo

This project uses Turborepo for monorepo management. Each app and package can be developed independently:

# Run specific app
npm run dev --filter=backend
npm run dev --filter=frontend

# Build specific app
npm run build --filter=backend
npm run build --filter=frontend

Code Quality

The project uses Husky for Git hooks and lint-staged for pre-commit checks:

  • ESLint for linting
  • Prettier for code formatting
  • Commitlint for commit message conventions
  • TypeScript for type checking

Commit Convention

Follow the Conventional Commits specification:

feat: add new feature
fix: fix bug
docs: update documentation
style: format code
refactor: refactor code
test: add tests
chore: update dependencies

API Documentation

Backend API

The backend API runs on http://localhost:3001 in development.

Key endpoints:

  • GET /health - Health check endpoint
  • GET /api/v1 - API information
  • POST /api/v1/auth/login - User authentication
  • POST /api/v1/wallet/create - Create wallet
  • GET /api/v1/wallet/balance - Get wallet balance
  • POST /api/v1/transactions/send - Send transaction

For detailed API documentation, see apps/backend/README.md.

Frontend Application

The frontend application runs on http://localhost:3000 in development.

For detailed frontend documentation, see apps/frontend/README.md.

Stellar Integration

Components Used

  • USDC on Stellar: Stable digital dollar access, treasury operations, cross-border settlement
  • SEP-24: Deposit/withdrawal interoperability, fiat on/off-ramp integrations
  • Stellar Classic Assets: Compliant local currency asset issuance
  • Stellar Asset Contracts (SAC): Smart contract compatibility
  • Soroban: Programmable financial logic and automation

Network Configuration

  • Testnet: Used for development and testing
  • Mainnet: Production deployment (future)

Security & Compliance

Security Measures

  • Encrypted API communication
  • Secure wallet management
  • Multi-layer authentication
  • Infrastructure monitoring
  • Transaction auditing

Compliance

AfriDollar maintains compliance through:

  • KYC/AML procedures
  • FATF-aligned controls
  • Transaction monitoring
  • Asset authorization controls
  • Clawback functionality where required

For detailed security information, see SECURITY.md.

Product Roadmap

Phase 1 — MVP (Current)

  • Wallet infrastructure
  • USDC integrations
  • Internal ledger synchronization
  • Basic treasury dashboard
  • Testnet asset issuance

Phase 2 — Testnet Expansion

  • SEP-24 integration
  • Stable asset issuance
  • Circle API integration
  • Compliance systems
  • Soroban compatibility

Phase 3 — Mainnet Launch

  • Mainnet deployment
  • Business onboarding
  • Payroll-as-a-Service
  • Treasury automation
  • Local banking integrations

Contributing

We welcome contributions! Please see our contributing guidelines for details.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Team

Founders

  • Eleazar Musa - Founder & Software Engineer
  • Ebube Ebuka Onuora - CEO / Founder
  • Jethro Adamu - CTO / Co-Founder

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, email dev.mes.anonfedora@gmail.com or open an issue in the repository.

Acknowledgments

  • Stellar Development Foundation
  • Circle
  • The open-source community

Links

About

AfriDollar provides African businesses with transparent access to USDC and compliant digital dollar infrastructure using Stellar for fast, low-cost cross-border payments and treasury operations.

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 74.0%
  • JavaScript 21.9%
  • CSS 4.1%