Exit to App
How It Works

System Architecture

Technical architectural layers: Frontend, Backend API, Policy Engine, Adapter layer, and Celo Network.

MOI is organized as a clean TypeScript monorepo with strict package boundaries, ensuring that execution logic, signing boundaries, and policy validation remain decoupled from user-interface rendering.

Monorepo PackagePathResponsibility
@moi/shared-typespackages/shared-typesProtocol constants, Zod schemas, Celo token address books, and type definitions.
@moi/policy-enginepackages/policy-engine18 deterministic trade rules, HMAC attestation generation, and policy verification.
@moi/wallet-signerpackages/wallet-signerRestricted agent signer, wallet separation validator, and ERC-8021 trailer encoding.
@moi/textile-adapterpackages/textile-adapterTextile FX v2 RFQ client, preview calculator, and webhook idempotency handlers.
@moi/buy-clientpackages/buy-client@x402/fetch EVM client, capability catalog discovery, and microservice billing.
@moi/identitypackages/identitySIWE challenge management, JWT session cookies, and ERC-8004 document schemas.
@moi/ledgerpackages/ledgerStrict balanced double-entry accounting journal generator and verification tests.
@moi/databasepackages/databasePostgreSQL engine, migration runner, Row-Level Security, and backup/recovery.
@moi/webapps/webNext.js 15 application shell, App Router API endpoints, and real-time Web3 dashboard.