Afron — agent-native compliance and settlement for African markets
# Afron
**Agent-native compliance and settlement for African markets.**
Afron is the regional on-ramp that lets x402-enabled AI agents pay African data and service providers with identity, sanctions, and audit trails built for machine traffic — plus optional NGN payout for partners who want local currency rather than holding stablecoins.
See docs/adr/0001-system-architecture.md for architecture decisions.
## Stack
| Layer | What’s in |
| --- | --- |
| API | FastAPI, Postgres, Redis, Alembic |
| Settlement | x402 (Base / EIP-3009), compliance gate, NGN bridge |
| Discovery | Provider directory + reputation |
| Web | React + TypeScript + Tailwind (landing + partner console) |
## Quick start (Docker)
```bash
docker compose up --build
```
- API:
localhost
- Health:
localhost
- Docs:
localhost
Migrations run automatically on API container start (`alembic upgrade head`).
## Frontend
```bash
cd frontend
npm install
npm run dev
```
- Landing:
localhost
- Partner console:
localhost
Vite proxies `/api` to `
127.0.0.1`. Start the API first.
Dashboard login: `POST /api/v1/auth/dashboard/login` (email + optional `DASHBOARD_ACCESS_CODE`).
## Local API development
```bash
python -m venv .venv
# Windows: .venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env
docker compose up postgres redis -d
alembic upgrade head
uvicorn app.main:app --reload
```
## Investor demo seed
With Postgres up and migrations applied:
```bash
python scripts/seed_demo.py
# re-seed cleanly:
python scripts/seed_demo.py --reset
```
Creates listed providers, completed settlements, NGN payouts, a flagged
compliance item, and recomputes reputation — so the landing page stats and
partner console trail look real.
Then:
1. `uvicorn app.main:app --reload`
2. `cd frontend && npm run dev`
3. Open
localhost → login with any email → drill a transaction
## Tests
```bash …