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 Package | Path | Responsibility |
|---|---|---|
@moi/shared-types | packages/shared-types | Protocol constants, Zod schemas, Celo token address books, and type definitions. |
@moi/policy-engine | packages/policy-engine | 18 deterministic trade rules, HMAC attestation generation, and policy verification. |
@moi/wallet-signer | packages/wallet-signer | Restricted agent signer, wallet separation validator, and ERC-8021 trailer encoding. |
@moi/textile-adapter | packages/textile-adapter | Textile FX v2 RFQ client, preview calculator, and webhook idempotency handlers. |
@moi/buy-client | packages/buy-client | @x402/fetch EVM client, capability catalog discovery, and microservice billing. |
@moi/identity | packages/identity | SIWE challenge management, JWT session cookies, and ERC-8004 document schemas. |
@moi/ledger | packages/ledger | Strict balanced double-entry accounting journal generator and verification tests. |
@moi/database | packages/database | PostgreSQL engine, migration runner, Row-Level Security, and backup/recovery. |
@moi/web | apps/web | Next.js 15 application shell, App Router API endpoints, and real-time Web3 dashboard. |