Production-style MVP for a permissioned institutional settlement network simulation in Europe.
EUPayGrid includes:
- permissioned institution onboarding
- reserve-backed internal balance activation (simulated)
- institutional transfer settlement with a double-entry ledger
- governance controls (approve/suspend/freeze/unfreeze) with audit log
- privacy-aware network activity views
- realtime operational updates in the UI via WebSocket
- Frontend (Vercel): https://eupaygrid-demo.vercel.app
- Backend API (Railway): https://eupaygrid-backend-production.up.railway.app
- Backend: FastAPI + asyncpg + Postgres
- Frontend: Next.js App Router + TypeScript + Tailwind + Recharts
- Infra: Docker Compose
You can run the demo directly from the repository page in Codespaces:
./scripts/start-demo.shPorts:
- Frontend:
3000 - Backend:
8000 - Postgres:
5432
backend/FastAPI appfrontend/Next.js appinfra/local infrastructure scaffoldingdocs/architecture.mdarchitecture and design notesdocs/isp-tr.mdISP product narrative in Turkishpolyphony-ledgerreference: WeAreTheArtMakers/polyphony-ledgerscripts/demo_seed.shhelper for demo datascripts/start-demo.shone-command demo startupproto/future event schema placeholder
cp .env.example .env
docker compose up --buildLocal endpoints:
- Frontend: http://localhost:3000
- Backend: http://localhost:8000
- Backend metrics: http://localhost:8000/metrics
- Postgres: localhost:5432
- Deploy backend to Railway from the repository root.
- Configure Railway build source as
backend/Dockerfile. - Add a Postgres service/plugin in Railway.
- Set backend environment variables:
POSTGRES_DSN(Railway PostgresDATABASE_URL),CORS_ORIGINS(your Vercel frontend URL),ALLOWED_CURRENCIES=EUR,SETTLEMENT_LAYER=simulated-solana. - Deploy frontend to Vercel from the
frontend/directory. - Set frontend environment variables in Vercel:
NEXT_PUBLIC_API_BASE=https://<your-backend-domain>,NEXT_PUBLIC_WS_URL=wss://<your-backend-domain>/ws/events,NEXT_PUBLIC_DEFAULT_ACTOR=ui-operator@eupaygrid.local. - Update the Live Demo section at the top of this README with final URLs.
Alternative backend target:
render.yamlis included for Render blueprint-style deployment.
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cd ..
uvicorn backend.app.main:app --host 0.0.0.0 --port 8000cd frontend
npm install
npm run devPOST /institutionsGET /institutionsPATCH /institutions/{id}/approvePATCH /institutions/{id}/suspendPATCH /institutions/{id}/freezePATCH /institutions/{id}/unfreezePOST /reserves/depositPOST /transfersGET /transfersGET /ledger/entriesPOST /ledger/replayGET /balancesGET /network/activityGET /admin/audit-logPOST /demo/seedGET /healthWS /ws/events
- Open
http://localhost:3000and click Demo Mode Seed. - Go to
/institutionsand inspect created institutions. - Approve/suspend/freeze/unfreeze an institution and verify behavior.
- Go to
/transfers, record a reserve deposit, then submit a transfer between approved institutions. - Verify status updates and settlement tx id.
- Verify ledger entries on
/ledger. - Verify balance changes on
/balances. - Verify privacy view behavior on
/network. - Verify governance actions and audit log on
/admin.
- Only approved institutions can send and receive.
- Suspended institutions cannot transact.
- Frozen wallets cannot initiate outgoing transfers.
- Insufficient balance fails transfer.
- A successful transfer writes transfer + settlement + 2 ledger entries + balance updates.
- Admin actions are audit logged.
- The settlement layer is simulated (
simulated-solana) with generated mock tx ids. - OTel collector scaffolding is available under the compose profile
observability.
- Real Solana on-chain write path (currently placeholder settlement event)
- Real fiat reserve partner integration
- Full authentication and RBAC layer (currently demo actor header)
- Transfer screen recipient UX should evolve from free text to institution picker/search flow
- Identity, authentication, and RBAC hardening: add SSO/OIDC login, enforce role-based policy checks server-side, and replace demo actor header with signed identity context.
- Real settlement integration: implement Solana transaction writing and confirmation tracking with retry, idempotency keys, and settlement reconciliation jobs.
- Fiat rail integration: ingest reserve deposits/withdrawals from a regulated banking partner API and add reserve reconciliation plus exception workflows.
- Transfer UX and operations tooling: replace free-text recipient entry with institution picker/search and expand admin tooling (filters, exports, case management).
- Reliability and compliance: expand test coverage (unit + integration + e2e + load) and add full tracing dashboards, alerting, and formal audit evidence exports.
This project is licensed under the WATAM (WeAreTheArtMakers) License. See the LICENSE file for details.