Skip to content

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

  1. Frontends never authorize themselves; server-side tenant and role checks remain authoritative.
  2. Monetary values cross contracts as exact integer minor units or exact token quantities—not floating-point approximations.
  3. A payment success claim must point to authoritative rail evidence.
  4. Retried requests must not duplicate money movement or external side effects.
  5. Uncertain external outcomes are reconciled before retrying.
  6. Secrets never enter client bundles, logs, documentation, or repository history.