How codedriverepeat/centralbank works
CentralBank is a pre-MVP reference platform for governing and operating digital-token payments. The visible runtime workflow is an API request routed to domain endpoints, with a blockchain service initialized by the gateway; institutional operators also have a separate authenticated CSP workflow and dashboard. The repository additionally includes payment-format and merchant integrations, an SDK, and reconciliation tooling. The README describes broader ledger, escrow, migration, and policy capabilities, but their contract sources are absent from this tree; connections to unsampled implementations are therefore not asserted.
Main entry points: index.ts API gateway · ecb.routes.ts CSP routes · App.tsx Operations dashboard · blockchain.ts Blockchain service
Components 28
API gateway
- API gateway
api/src/index.ts - Wallet routes
api/src/routes/wallets.ts - Transfer routes
api/src/routes/transfers.ts - Payment routes
api/src/routes/payments.ts - Merchant routes
api/src/routes/merchants.ts - Admin routes
api/src/routes/admin.ts - Fraud routes
api/src/routes/fraud.ts - Audit routes
api/src/routes/audit.ts - Governance routes
api/src/routes/governance.ts - Blockchain service
api/src/services/blockchain.ts - Fee engine
api/src/services/fee-engine.ts
Institutional operations
- CSP routes
api/src/csp/routes/ecb.routes.ts - CSP access controls
api/src/csp/middleware/auth.ts - Sovereign actions
api/src/csp/controllers/ecb.controller.ts - CSP audit and idempotency
api/src/csp/services/csp.services.ts
Operator and client tools
- Operations dashboard
dashboard/src/App.tsx - Dashboard identity
dashboard/src/hooks/useAuth.ts - Client SDK
sdk/src/client.ts
Payment integrations
- ISO 20022 adapter
iso20022-adapter/src/index.ts - Status report handler
iso20022-adapter/src/handlers/payment-status-report.ts - SumUp integration
sumup-integration/SumUpCentralBankIntegration.java - Android tender app
clover-android-app/app/src/main/java/com/centralbank/clover/CentralBankTender.java
Reconciliation
- Reconciliation runner
tools/reconciliation-ref/index.js - Reconciliation storage
tools/reconciliation-ref/storage.js
Other components
- Institutional client
- Operator
- Blockchain network
- CentralBank API
Connections 26
- API gateway → Wallet routes: routes to
api/src/index.ts - API gateway → Transfer routes: routes to
api/src/index.ts - API gateway → Payment routes: routes to
api/src/index.ts - API gateway → Admin routes: routes to
api/src/index.ts - API gateway → Fraud routes: routes to
api/src/index.ts - API gateway → Audit routes: routes to
api/src/index.ts - API gateway → Merchant routes: routes to
api/src/index.ts - API gateway → Governance routes: routes to
api/src/index.ts - API gateway → Blockchain service: initializes
api/src/index.ts - Institutional client → API gateway: sends requests
- API gateway → Fee engine: uses for pricing
- Operator → Operations dashboard: uses
dashboard/src/App.tsx - Operations dashboard → Dashboard identity: uses identity
- Operations dashboard → CSP routes: submits operations
- CSP routes → CSP access controls: applies access checks
api/src/csp/routes/ecb.routes.ts - CSP routes → Sovereign actions: dispatches actions
api/src/csp/routes/ecb.routes.ts - Sovereign actions → CSP audit and idempotency: emits audit events
api/src/csp/controllers/ecb.controller.ts - CSP routes → API gateway: serves alongside
- ISO 20022 adapter → Status report handler: dispatches handler
iso20022-adapter/src/index.ts - Status report handler → CentralBank API: fetches transfer
iso20022-adapter/src/handlers/payment-status-report.ts - Institutional client → ISO 20022 adapter: submits messages
- Client SDK → CentralBank API: calls API
- SumUp integration → CentralBank API: integrates with
- Android tender app → CentralBank API: integrates with
- Reconciliation runner → Reconciliation storage: uses storage
tools/reconciliation-ref/index.js - Blockchain service → Blockchain network: connects to