System-design interview trainer

๐Ÿ—๏ธ CloudArchitect-Sim

A drag-and-drop, LLM-graded canvas for practicing system-design interviews. Draw the architecture, an interviewer scores it against a rubric, asks one follow-up, you revise โ€” up to three rounds.

โ† Back to the game

The core loop

Nothing reaches the LLM until the diagram survives a deterministic gate โ€” that's what keeps grading cheap and scores reproducible.

01
Canvas
Drag nodes, wire connections (HTTP / gRPC / WS / async)
02
JSON topology
Graph serialized: nodes, edges, config, region, notes
03
Deterministic gate
Code-only checks โ€” a hard fail short-circuits, no LLM spend
04
LLM interviewer
Difficulty persona scores 5 categories + one follow-up
05
Revise
Answer in text or redraw; re-evaluate
โ†ป loops back to 01 โ€” capped at 3 rounds per level

Architecture

Client
frontend/
Next.js 14 ยท React Flow ยท Tailwind
  • Canvas & palette โ€” provider-agnostic components
  • Cost indicator โ€” live monthly estimate
  • Scorecard โ€” 5-axis radar, deterministic issues
  • Stress sim overlay โ€” RPS particles, bottleneck node
  • Progress panel โ€” pass rate, weakest category, debrief
Server
backend/
FastAPI ยท Firestore ยท offline mock mode
  • deterministic.py โ€” mandatory components, anti-patterns
  • prompt_builder.py / llm_client.py โ€” persona prompts
  • cache.py โ€” topology-hash response cache
  • conversation.py โ€” follow-up state, LRU-evicted
  • ratelimit.py โ€” per-minute limit + daily quota + spend cap
  • db.py โ€” player history & share links, Firestore-backed

Campaign levels

#LevelRequiresScope
01Webhook RouterAPI Gateway + a DB โ€” queue/cache/warehouse is over-engineeringv1
02Automated Media Processing PipelineQueue/Pub-Sub + Object Storage โ€” async decouplingv1
03High-Frequency Trading BotIn-memory cache + load balancer โ€” no SPOFv1
04Enterprise Big Data AnalyticsData warehouse + queue/pub-sub โ€” ingestion pipelinev1
05IoT Telemetry PlatformQueue/Pub-Sub + time-series DB โ€” buffered ingestionv2
06Recommendation EngineGraph DB + in-memory cache โ€” graph serving + cachev2
07RAG-Based SearchVector DB + object storage โ€” vector servingv2
08Always-On Payments APILoad balancer + relational DB โ€” no compute SPOF, replicated DBv2
09Multi-Region Disaster RecoveryCompute + data in โ‰ฅ2 regions โ€” regional DRv3
10Globally Resilient Ledger (5 nines)Multi-region + replicated DB + no SPOF โ€” consistency trade-offv3

Feature ledger

v1 ยท MVP โ€” core loop
  • Canvas & palette โ€” drag/click placement, typed connections
  • Live cost indicator โ€” monthly estimate as you build
  • Scorecard โ€” 5-axis scores, issues, interviewer comment
  • Follow-up loop โ€” up to 3 rounds, text or redraw
  • Reference solution โ€” unlocked on a pass
  • Offline mock interviewer โ€” fully playable with no API key
v2 โ€” depth
  • Component config โ€” DB/cache replicas, cache TTL, multi-AZ
  • Expanded DB palette โ€” time-series, graph, vector stores
  • Stress simulation โ€” target RPS, live bottleneck highlighting
  • Save & Share โ€” read-only link to a scored design
  • Levels 5โ€“8 โ€” same acceptance-criteria format
v3 โ€” breadth
  • Multi-cloud skin โ€” AWS / GCP / Azure / generic naming, one logic layer
  • Cross-region scenarios โ€” per-node region, DR/HA structural checks
  • Mock interview mode โ€” open-ended scenario, 15-minute timer
  • Custom scenario โ€” paste a real prompt, LLM structures the brief

Cost & production guardrails

Response cache
topology-hash
identical designs skip the LLM entirely
Rate limit
per-minute + daily quota
CLOUDARCH_RATE_PER_MIN / _DAILY_QUOTA
Global spend cap
daily budget
over budget โ†’ auto-degrades to offline interviewer
Session store
bounded, LRU
idle conversations evicted on TTL
Player data
Firestore
history & shared designs, keyed by a browser-local ID โ€” no account/login
Hosting
GCP Cloud Run
serverless containers, europe-west1, scale-to-zero
Test coverage
68 + 5
backend pytest + frontend vitest, both build clean
Golden-set eval
17 fixtures ร— 3
real-LLM regression harness, run on prompt changes