Architecture & components
Components
Section titled “Components”| Component | What it is | Notes |
|---|---|---|
| API | Go service (Gin) | The product. Stateless except for its on-disk WAL. |
| MongoDB | Off-chain record store | The queryable hot tier. |
| Redis | Cache + shared rate limiter | Optional; the API degrades gracefully without it. |
| Hyperledger Fabric | Permissioned ledger | Stores Merkle roots; Go chaincode. External to the API. |
| WAL | On-disk write-ahead log | Per-pod; must be on durable storage. |
| Dashboard | Static web UI (nginx) | Optional; talks directly to the API. |
How they connect
Section titled “How they connect” ┌─────────────┐ gRPC (gateway) client ──▶│ Go API │──────────────────────▶ Hyperledger Fabric └─────┬───┬───┘ (Merkle roots, write-once) │ └────────▶ Redis (cache + limiter) ▼ MongoDB (records) WAL (durable record writes)The API talks to Fabric only through the gateway gRPC SDK with an X.509 identity — no Docker socket, no peer CLI.
Statefulness & scaling
Section titled “Statefulness & scaling”- API: mostly stateless, but the file WAL is per-pod. A
ReadWriteOnce PVC cannot be shared across nodes, so multi-node HA needs a
StatefulSet (per-pod WAL) — the Helm chart gates
replicaCount > 1behind an explicit opt-in. - Rate limiting & batching are already multi-instance safe (Redis-backed limiter, atomic batch claim).
- MongoDB/Redis/Fabric scale on their own terms (replica sets, clusters, multi-org networks).
Deployment paths
Section titled “Deployment paths”- Docker Compose for a single host.
- Kubernetes (Helm) for production.