> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.adid.dev/llms.txt.
> For full documentation content, see https://docs.adid.dev/llms-full.txt.

# System Architecture

**Used in:** §1.2 Why Decentralized Identity, §1.5 Platform Architecture at a Glance
**Audience:** all personas
**IA ID:** D1

```mermaid
graph TB
  classDef client fill:#dbeafe,stroke:#1d4ed8,color:#0f172a
  classDef service fill:#dcfce7,stroke:#15803d,color:#0f172a
  classDef store fill:#fef9c3,stroke:#b45309,color:#0f172a
  classDef chain fill:#ede9fe,stroke:#6d28d9,color:#0f172a
  classDef external fill:#e5e7eb,stroke:#475569,color:#0f172a

  subgraph Clients
    Portal["Portal SPA (React + Vite)"]:::client
    Wallet["Wallet (Expo / React Native)"]:::client
    SDK["SDK (@infinia/ida-sdk)"]:::client
    AgentRT["Agent runtime (MCP-I / A2A)"]:::client
  end

  subgraph Edge
    LB["Load balancer / Ingress"]:::service
  end

  subgraph API_Layer["IDA API (Go / Chi)"]
    Auth["Auth handler"]:::service
    DIDh["DID handler"]:::service
    VCh["VC + Schema handler"]:::service
    ZKPh["ZKP handler"]:::service
    Agenth["Agent handler"]:::service
    DCh["DIDComm handler"]:::service
    Verifierh["Verifier + Trust handler"]:::service
    Dashboardh["Dashboard + Analytics"]:::service
  end

  subgraph Stores
    PG[("PostgreSQL")]:::store
    Rds[("Redis (sessions, OTP, rate limit, challenges)")]:::store
  end

  subgraph ADI["ADI blockchain (chain 8400 / testnet 99999)"]
    DIDR["DIDRegistry"]:::chain
    SchR["SchemaRegistry"]:::chain
    RevR["RevocationRegistry"]:::chain
    AgtR["AgentTrustRegistry"]:::chain
    ZKR["ZKProofVerifier"]:::chain
  end

  subgraph Externals
    IdP["OAuth IdP (Google / GitHub)"]:::external
    Mediator["DIDComm mediators"]:::external
  end

  Portal --> LB
  Wallet --> LB
  SDK --> LB
  AgentRT --> LB

  LB --> Auth
  LB --> DIDh
  LB --> VCh
  LB --> ZKPh
  LB --> Agenth
  LB --> DCh
  LB --> Verifierh
  LB --> Dashboardh

  Auth --> Rds
  Auth --> PG
  Auth --> IdP

  DIDh --> PG
  DIDh --> DIDR
  VCh --> PG
  VCh --> SchR
  VCh --> RevR
  ZKPh --> PG
  ZKPh --> Rds
  ZKPh --> ZKR
  Agenth --> PG
  Agenth --> AgtR
  DCh --> PG
  DCh --> Mediator
  Verifierh --> PG
  Dashboardh --> PG
```

**Reading guide:** Clients always reach the API through the ingress; the API is the only component that owns Postgres, Redis, and chain-write authority. The five registries on ADI are write-only from the API and read-only from anyone (including verifiers' own infra), which is what makes verifications trust-minimised.

***