System architecture
flowchart TB
Customer["Customer"] --> Wallet["SAGIO Wallet"]
Merchant["Merchant"] --> Terminal["SAGIO Terminal"]
Merchant --> Dashboard["SAGIO Merchant"]
Wallet --> API["SAGIO API"]
Terminal --> API
Dashboard --> API
API --> DB[("PostgreSQL / Neon")]
API --> Privy["Privy identity + wallets"]
API --> Base["Base network"]
Terminal --> Worldline["Worldline / Fasstap"]
API -. integration .-> Facilitator["x402 facilitator<br/>separate repository"]
Source boundaries
| Product |
Path |
Production shape |
| API |
apps/api |
Cloudflare Worker |
| Merchant |
apps/dashboard |
Cloudflare Pages |
| Wallet |
apps/wallet |
Web + Capacitor app |
| Terminal |
apps/terminal |
Android application |
| Landing |
apps/landing |
Cloudflare Pages |
| x402 facilitator |
separate repository |
Independent service |
Architectural invariants
- Frontends never authorize themselves; server-side tenant and role checks remain authoritative.
- Monetary values cross contracts as exact integer minor units or exact token quantities—not floating-point approximations.
- A payment success claim must point to authoritative rail evidence.
- Retried requests must not duplicate money movement or external side effects.
- Uncertain external outcomes are reconciled before retrying.
- Secrets never enter client bundles, logs, documentation, or repository history.