Archon is a production-grade, AI-native SaaS platform designed to conduct, evaluate, and score Senior and Staff-level System Design Interviews.
Combining the real-time collaboration of interactive whiteboards, the conversational realism of veteran tech leads, and the analytical power of multi-model LLMs (Google Gemini, Groq LLaMA-3.3, NVIDIA Vision), Archon provides objective, multi-dimensional feedback across Requirements Gathering, Capacity Estimation, API/Data Modeling, High-Level Architecture, and Failure Mode Analysis.
Archon is architected as an Event-Driven, CQRS Polyglot Distributed System built with Go (for ultra-low latency I/O, WebSockets, rate limiting, and business services) and Python (for asynchronous LLM orchestration, vector retrieval, and background scoring).
flowchart TB
subgraph Clients["Client Layer"]
Browser["React / Next.js Web App"]
end
subgraph Edge["Gateway & Ingress"]
API["Go API Gateway (Gin & Gorilla WS)"]
RateLimiter["Sliding Window Rate Limiter (Redis)"]
Tracer["OpenTelemetry Tracer"]
end
subgraph Persistence["Storage & State Tier"]
Postgres[("PostgreSQL 15 (Source of Truth)")]
RedisState[("Redis 7 (Sessions, L2 Cache, Pub/Sub)")]
QdrantDB[("Qdrant (Vector Knowledge Graph)")]
end
subgraph AsyncBus["Event Backbone & CDC"]
Kafka{{"Apache Kafka 3.7"}}
Debezium["Debezium CDC (Postgres WAL)"]
end
subgraph AIWorker["Intelligence & Evaluation Layer"]
AIEngine["Python AI Engine (FastAPI)"]
LangGraph["Multi-Agent FSM & LangChain"]
Temporal["Temporal Workflow Orchestrator"]
LLMs["LLMs (Gemini / Groq / NVIDIA)"]
end
subgraph Observability["Observability Suite"]
Jaeger["Jaeger (Distributed Tracing)"]
Prometheus["Prometheus (Metrics)"]
Grafana["Grafana (Dashboards)"]
Loki["Loki & Promtail (Structured Logs)"]
end
Browser <-->|WebSocket / REST| API
API --> RateLimiter
API --> Tracer
API --> Postgres
API <--> RedisState
Postgres -.->|Logical Decoding WAL| Debezium
Debezium --> Kafka
API -->|Direct Outbox Fallback| Kafka
Kafka <--> AIEngine
AIEngine <--> RedisState
AIEngine <--> QdrantDB
AIEngine <--> Temporal
AIEngine <--> LLMs
API -.-> Jaeger
AIEngine -.-> Jaeger
API -.-> Prometheus
Archon is structured around Domain-Driven Design (DDD) bounded contexts:
-
Interview Generation Engine (
internal/interview): Dynamically generates role-, difficulty-, and company-tailored system design scenarios with evaluation rubrics and time constraints. -
Conversation & Multi-Agent Engine (
ai_engine/app/services): Maintains a stateful Finite State Machine (REQUIREMENTS$\to$ ESTIMATION$\to$ HIGH_LEVEL$\to$ DEEP_DIVE$\to$ COMPLETED) to prevent conversational drift and simulate realistic senior interviewer prompts. -
Diagram Engine (
internal/diagram): Streams structured JSON architectural graphs (nodesandedges) in real-time over WebSockets, allowing the AI to analyze whiteboard state without blocking candidate interactions. -
Evaluation Engine (
internal/reports): Scores candidates across 5 core dimensions (Requirements, Estimation, API Design, Data Modeling, Scalability/Reliability) using multi-tier evaluation prompts. -
Knowledge Engine & RAG (
ai_engine/app/services/knowledge_service.py): Grounds interview evaluations with factual engineering architectures using Qdrant vector search and local sentence-transformer embeddings (sentence-transformers/all-MiniLM-L6-v2). -
Reporting & Feedback Engine (
internal/reports): Synthesizes comprehensive JSON scorecards with actionable recommendations, anti-pattern breakdowns, and customized study paths.
-
Transactional Outbox & Debezium CDC:
Guarantees atomic state persistence in PostgreSQL and event streaming to Kafka via PostgreSQL Write-Ahead Log (
WAL) logical decoding, completely eliminating the Dual-Write Problem. -
Distributed WebSockets with Redis Pub/Sub:
Scales stateful WebSocket connections horizontally across multiple Go API replicas with thread-safe
sync.Mutexwrite pumps, heartbeat ping/pong lifecycle management, and connection leak prevention. - Sliding Window Log Rate Limiting: Atomic Redis sliding window rate limiter implemented via Lua scripts to protect downstream LLM gateways from token starvation and DDoS attacks.
-
Resilience & Circuit Breakers:
Configurable circuit breakers (
pkg/resilience) and retry policies to isolate external third-party LLM provider downtime. - Two-Tier Cache Architecture: L1 In-Memory sync cache combined with L2 Distributed Redis caching and Pub/Sub invalidation channels for sub-microsecond hot reads.
-
Distributed Tracing & Full-Stack Telemetry:
End-to-end W3C trace context propagation across HTTP
$\to$ WebSockets$\to$ Kafka$\to$ Python AI Engine visualized in Jaeger, Prometheus, Grafana, and Loki. - Supply Chain Security & Dependabot: Automated multi-ecosystem vulnerability scans across Go modules, Python dependencies, Docker multi-stage images, and GitHub Actions.
| Layer | Technologies |
|---|---|
| Backend API Gateway | Go 1.22, Gin, Gorilla WebSocket, pgx/v5, go-redis, kafka-go |
| AI & LLM Services | Python 3.11, FastAPI, LangChain, Qdrant Client, FastEmbed, Temporal SDK |
| Databases & Cache | PostgreSQL 15 (WAL Logical Decoding), Redis 7 Alpine, Qdrant Vector DB |
| Event Streaming | Apache Kafka 3.7 (KRaft mode), Debezium Connect 2.6 |
| Workflow Orchestrator | Temporal 1.23 |
| Observability | OpenTelemetry Go/Python SDKs, Jaeger 1.57, Prometheus, Grafana, Loki |
| Infrastructure | Docker, Docker Compose, Multi-Stage Builds |
βββ .agents/ # Architecture vision & System Design Interview notes
βββ .github/ # Dependabot & GitHub Actions workflows
βββ ai_engine/ # Python FastAPI AI & LLM Evaluation Service
β βββ app/
β β βββ core/ # Configuration, Key Rotators, OpenTelemetry
β β βββ services/ # LLM, Kafka, Knowledge RAG, Temporal Workflows
β β βββ main.py # FastAPI entrypoint
β βββ Dockerfile
β βββ requirements.txt
βββ cmd/
β βββ api/ # Go API Gateway Main Entrypoint
βββ debezium/ # CDC connector configs and registration scripts
βββ docs/ # Swagger / OpenAPI 2.0 specifications
βββ grafana/ # Provisioned datasources and dashboard JSONs
βββ internal/ # Core DDD Bounded Contexts
β βββ ai/ # WebSocket Hub, Session Processors, Kafka Dispatchers
β βββ analytics/ # User performance analytics and metrics
β βββ auth/ # JWT authentication, session tokens, user repos
β βββ cache/ # Redis connection management
β βββ database/ # PostgreSQL connection pooling and migrations
β βββ diagram/ # Real-time whiteboard graph ingestion & persistence
β βββ interview/ # Interview lifecycle, Outbox workers, sessions
β βββ quiz/ # System design quiz bank & cached repositories
β βββ reports/ # Report generation, scoring models, feedback
β βββ server/ # Gin HTTP/WS routing & middleware setup
β βββ settings/ # User configuration & preferences
βββ pkg/ # Reusable Infrastructure Packages
β βββ config/ # Environment loaders and typed configurations
β βββ middleware/ # OpenTelemetry tracing, auth, Prometheus metrics
β βββ ratelimit/ # Sliding window Redis rate limiters
β βββ resilience/ # Generic circuit breakers and fallbacks
β βββ telemetry/ # OpenTelemetry Tracer Provider initializers
βββ prometheus/ # Prometheus scrape configurations
βββ docker-compose.yml # Full multi-container development environment
βββ Dockerfile # Production multi-stage Go build
βββ go.mod # Go dependencies and module definition
- Docker (v24.0+) & Docker Compose (v2.20+)
- Go (v1.22+) (for local development)
- Python (v3.11+) (for local AI engine development)
- API Key for Google Gemini, Groq, or NVIDIA NIM
Clone the repository and copy the environment template:
git clone https://github.com/MonuChaudhary14/Archon.git
cd Archon
cp .env.example .env # or configure your .envEnsure your .env contains at least one active LLM API key:
LLM_PROVIDER=gemini
GEMINI_API_KEY=your_gemini_api_key_here
# Or:
# LLM_PROVIDER=groq
# GROQ_API_KEY=your_groq_api_key_hereStart the entire polyglot microservice cluster with a single command:
docker compose up --build -d| Service | Port | Description |
|---|---|---|
| Go API Gateway | http://localhost:8080 |
REST API, WebSocket Endpoint, Metrics |
| Python AI Engine | http://localhost:8122 |
FastAPI Documentation & AI Service |
| Swagger UI | http://localhost:8080/swagger/index.html |
Interactive REST API Documentation |
| Kafka UI | http://localhost:8085 |
Topic inspector & consumer lag monitor |
| Temporal UI | http://localhost:8233 |
Background workflow visualization |
| Jaeger UI | http://localhost:16686 |
Distributed trace explorer |
| Grafana | http://localhost:3000 |
Real-time system dashboards (admin/admin) |
| Prometheus | http://localhost:9090 |
Time-series metric query engine |
| Qdrant Vector DB | http://localhost:6333/dashboard |
Vector storage & embeddings console |
go test -v -race ./...cd ai_engine
pytest tests/ -v