Stack architecture for the four factory apps — planning folder
Goal: One coherent, minimal-footprint stack decision — programming language(s), database(s), and the web/online overview surface — for Atlas, Parity Harness, FleetOps, and WorkLedger, on a single WSL2 host that will run hundreds of concurrent Claude Code agents.
Status: Draft — research complete, decision synthesized. Flip to active on Robert’s acceptance.
Trigger: Robert’s ask 2026-07-19 (“describe desired architecture of all — DB, programming language, web interface for everything, lowest possible memory/CPU/speed, hundreds of agents; run oh-architecture to really decide”).
Read order
| # | Doc | What it does |
|---|---|---|
| 00 | SYNTHESIS | 5-minute decision: matrix, recommendation, diagram, risks, first TDD steps |
| 01 | Deep dive | Binding prior constraints + host ground truth + runtime/DB/obs footprint evidence |
| 02 | Case studies | Named adopters per stack shape + agentic-era language-fit evidence |
| 03 | Options | The 4 candidates (A all-TS, B Rust, C Go, D do-less), each with diagram |
| 04 | Steelman | Advocate/Prosecutor + cross-examination per candidate |
| 05 | Postgres-only comparison | Second court + Robert’s ruling — final: ONE database (events→PG, SQLite out, VM dropped for DIY OTLP receiver §5b, Grafana deferred) |
| — | evidence/ | Raw research-packet outputs (10-agent phase-1 workflow) |
Out of scope
- Re-litigating the four product verdicts (BUILD/PIVOT decisions of plans 001–004 stand).
- Zaruba’s core-plane stack (Tomas-owned; substrate is a fixed input here).
- The showcase site (plan 005 — decided: Astro 7).
- Cloud deployment (billing gate; local-first is a binding input, revisited when it clears).
Cross-references
| Path | What |
|---|---|
plans/002-work-ledger-product/10-architecture.md |
WorkLedger pinned: Encore.ts + Drizzle + Postgres (ADR D5) |
plans/003-atlas-intelligence-layer/10-architecture.md |
Atlas pinned: Encore.ts internal-plane service, pg_trgm |
plans/002-dual-run-parity-harness/architecture.md |
Harness pinned: TS workspace + CLI outside Encore |
plans/004-fleet-monitor/06-architecture.md |
FleetOps architecture this plan revises (ADR-9 Loki, ADR-2 board) |