Kaiten
Architecture

Architecture

High-level architecture of the Kaiten platform.

Architecture

Kaiten follows a modular monolith architecture with vertical feature slices, event-driven integration, and infrastructure-as-code deployment.

System Overview

┌─────────────────────────────────────────────────────────┐
│  Traefik (API Gateway)                                  │
│  ├── JWT Middleware (Clerk/OIDC)                         │
│  ├── ForwardAuth Middleware (API tokens)                 │
│  └── Routing (path-based → services)                    │
├─────────────────┬───────────────────────────────────────┤
│  Go API Server  │  Worker / Event Processor             │
│  (Fiber + Huma) │  (Dapr + Svix)                        │
│  REST + GraphQL │  Webhook delivery                     │
│  + OFREP        │                                       │
├─────────────────┴───────────────────────────────────────┤
│  PostgreSQL 17 (WAL logical replication)                │
│  ├── Domain tables                                      │
│  ├── outbox_events (CDC source)                         │
│  └── feature_audit_trail                                │
├─────────────────────────────────────────────────────────┤
│  Event Pipeline (optional)                              │
│  Debezium → RabbitMQ → Dapr → Svix                     │
├─────────────────────────────────────────────────────────┤
│  React Dashboard │  MCP Server (FastMCP)                │
│  (TanStack Router)│  (AI assistant integration)         │
└──────────────────┴──────────────────────────────────────┘

Key Design Decisions

DecisionChoiceRationale
ArchitectureModular monolithSimplicity + module isolation without microservice overhead
API FrameworkFiber + Huma v2OpenAPI generation, validation, structured operations
DatabasePostgreSQL 17WAL logical replication for CDC, JSONB for flexible schemas
Event DeliveryTransactional outbox + CDCGuarantees at-least-once without dual writes
Auth GatewayTraefikPlugin ecosystem, JWT validation, ForwardAuth
Feature FlagsCEL + OFREPStandard evaluation language + OpenFeature compatibility

Learn More

On this page