Fulcrum Container Map (C4 Level 2)
Shows all services/containers and their connections
Last Updated: January 15, 2026
Container Diagram
graph TB
subgraph Clients["Client Layer"]
MCP["MCP Server<br/>(JSON-RPC 2.0)"]
SDK_PY["Python SDK<br/>fulcrum-governance"]
SDK_TS["TypeScript SDK<br/>@fulcrum-governance/sdk"]
CLI["CLI<br/>fulcrum"]
DASH["Dashboard<br/>Next.js 14"]
end
subgraph Backend["Backend Services"]
API["REST API<br/>:8080"]
GRPC["gRPC Server<br/>:50051"]
subgraph Core["Core Services"]
PE["Policy Engine<br/><10ms P99"]
CE["Cost Engine<br/>Budget tracking"]
ES["Event Store<br/>NATS publisher"]
end
subgraph Cognitive["Cognitive Layer"]
SJ["Semantic Judge<br/>Intent analysis"]
OR["Oracle<br/>Cost prediction"]
IS["Immune System<br/>Auto-policy gen"]
end
end
subgraph Data["Data Layer"]
PG[("PostgreSQL 16<br/>+ TimescaleDB<br/>:5432")]
RD[("Redis 7<br/>:6379")]
NATS[("NATS JetStream<br/>:4222")]
OL["Ollama<br/>llama3.2<br/>:11434"]
end
subgraph External["External Services"]
CLERK["Clerk<br/>Authentication"]
STRIPE["Stripe<br/>Billing"]
end
MCP --> API
SDK_PY --> API
SDK_PY --> GRPC
SDK_TS --> API
SDK_TS --> GRPC
CLI --> API
DASH --> API
DASH --> CLERK
API --> PE
API --> CE
API --> ES
GRPC --> PE
GRPC --> CE
PE --> SJ
PE --> RD
CE --> OR
ES --> NATS
SJ --> OL
OR --> PG
PE --> PG
CE --> PG
ES --> PG
API --> STRIPE
Container Details
Client Containers
| Container |
Technology |
Port |
Purpose |
| MCP Server |
Go |
8080 |
AI agent self-governance via JSON-RPC |
| Python SDK |
Python 3.9+ |
- |
Client library for Python apps |
| TypeScript SDK |
TypeScript |
- |
Client library for Node/browser |
| CLI |
Go |
- |
Automation and GitOps workflows |
| Dashboard |
Next.js 14 |
3000 |
Admin UI for humans |
Backend Containers
| Container |
Technology |
Port |
Latency Target |
| REST API |
Go + Chi |
8080 |
<50ms P99 |
| gRPC Server |
Go + gRPC |
50051 |
<20ms P99 |
| Policy Engine |
Go |
internal |
<10ms P99 |
| Cost Engine |
Go |
internal |
<20ms P99 |
| Event Store |
Go + NATS |
internal |
<5ms P99 |
Cognitive Containers
| Container |
Technology |
Port |
Latency Target |
| Semantic Judge |
Go + Ollama |
internal |
<50ms P99 |
| Oracle |
Go + ML |
internal |
<20ms P99 |
| Immune System |
Go |
internal |
Async |
Data Containers
| Container |
Technology |
Port |
Purpose |
| PostgreSQL |
PostgreSQL 16 |
5432 |
Primary state, RLS multi-tenancy |
| TimescaleDB |
TimescaleDB 2.x |
5432 |
Time-series metrics |
| Redis |
Redis 7 |
6379 |
Policy cache, rate limits |
| NATS JetStream |
NATS 2.x |
4222 |
Durable event streaming |
| Ollama |
Ollama |
11434 |
Local LLM inference |
Communication Patterns
Synchronous (Request/Response)
- REST API ↔ Clients (HTTP/JSON)
- gRPC ↔ SDKs (Protobuf)
- Policy Engine ↔ Redis (TCP)
- All services ↔ PostgreSQL (TCP)
Asynchronous (Events)
- Event Store → NATS JetStream (Publish)
- Consumers ← NATS JetStream (Subscribe)
- Dashboard ← WebSocket (Real-time updates)
Multi-Tenancy Boundaries
┌─────────────────────────────────────────────────────┐
│ Tenant A │
│ ┌─────────────────────────────────────────────────┐│
│ │ PostgreSQL: RLS WHERE tenant_id = 'A' ││
│ │ Redis: Keys prefixed with tenant:A:* ││
│ │ NATS: Subject prefix fulcrum.A.* ││
│ └─────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────┐
│ Tenant B │
│ ┌─────────────────────────────────────────────────┐│
│ │ PostgreSQL: RLS WHERE tenant_id = 'B' ││
│ │ Redis: Keys prefixed with tenant:B:* ││
│ │ NATS: Subject prefix fulcrum.B.* ││
│ └─────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────┘
Back to Documentation Index