Live Architecture Neighborhoods Ralph v1 Archive → GitHub →
v2 in development · v1 live at v1.qtown.ai

An autonomous town
where NPCs run
the economy.

v1 shipped: a Python monolith with 510 stories, 1,451 commits, 88% written by Ralph (an AI developer). v2 is being built right now — a polyglot microservices rewrite across 9 services and 12 languages. Each neighborhood will prove a different technology.

194 Stories shipped
420 Files
12 Languages
88% AI-written

v1 is still running.

Live data below is from v1.qtown.ai — the v1 monolith preserved as a working archive. Every 30 seconds the v1 tick loop fires; NPCs make decisions, trade, gossip, and age. v2 will replace this once it's done.

Tick
Day
Weather
Time
Total Gold
Population
50×50 World Map — Terrain
Active NPCs
Name Role Gold Hunger Energy Happy Age
Loading...
Data from v1.qtown.ai/api/world · Refreshes every 30s

Polyglot microservices.
Each service earns its stack.

No technology chosen for show. Go for the order book because concurrency matters. Rust for the fortress because correctness matters. Python for AI agents because the ecosystem matters.

┌───────────────────────────────────────────────────────┐
│                  Dashboard (Nuxt 3)                   │
│            qtown.ai — PixiJS + Chart.js               │
└────────────────────────┬──────────────────────────────┘
                         │ GraphQL
┌────────────────────────┴──────────────────────────────┐
│            Cartographer (GraphQL Gateway)              │
│                 Apollo Server + TS                     │
└──┬──────┬──────┬──────┬──────┬──────┬──────┬─────────┘
   │      │      │      │      │      │      │
   ▼      ▼      ▼      ▼      ▼      ▼      ▼
┌─────┐┌─────┐┌─────┐┌─────┐┌─────┐┌─────┐┌─────┐
│Town ││ Mkt ││Fort-││Acad-││Tav- ││Lib- ││Asset│
│Core ││Dist ││ress ││emy  ││ern  ││rary ││Pipe │
│ Py  ││ Go  ││Rust ││ Py  ││ TS  ││ Py  ││ Py  │
└──┬──┘└──┬──┘└──┬──┘└──┬──┘└──┬──┘└──┬──┘└──┬──┘
   └──────┴──────┴──────┴──────┴──────┴──────┘
                      Kafka
            ┌─────────────────────┐
            │    Infrastructure    │
            │ Postgres · Redis     │
            │ Kafka · ES · Jaeger  │
            └─────────────────────┘
gRPC
Service-to-service Protobuf definitions, type-safe contracts
Kafka
27 topics Event backbone, npc_id partitioning
GraphQL
Client gateway Single query fans out to 5 services
Postgres
Shared database Per-service schemas, pgvector for RAG

9 districts. Each one proves
a technology works.

Python

Town Core

Simulation engine. 30-second tick loop. 50+ NPCs making autonomous decisions based on needs, goals, and social relationships.

FastAPI · SQLAlchemy · Postgres
Go

Market District

Concurrent order book with real-time trade settlement. Goroutines handle parallel bid/ask matching. <5ms p99 at 10K orders/sec.

gRPC · goroutines · channel-based
Rust

Fortress

Event validation with zero unsafe code. Every Kafka event passes through type-level guards before it can modify game state.

Actix · serde · zero-copy deserialization
Python

Academy

Local AI agents via Ollama. NPCs learn skills, take courses, and generate knowledge. RAG pipeline over the town's history.

Ollama · pgvector · LangChain
TypeScript

Tavern

Social hub. Real-time WebSocket connections for NPC gossip propagation. Rumors spread across the social graph with decay.

Fastify · WebSocket · social graph
Python

Library

Vector-based knowledge retrieval. Town lore indexed with pgvector embeddings. NPCs query their own history.

pgvector · embeddings · semantic search
TypeScript

Cartographer

GraphQL gateway. Single entry point for the dashboard — one query fans out to up to five services via schema stitching.

Apollo Server · schema stitching
Python

Asset Pipeline

Background job processing with Celery. Sprite generation, map rendering, NPC portrait creation — all async.

Celery · Redis · image processing
Vue/Nuxt

Dashboard

Real-time visualization. PixiJS isometric renderer, Chart.js analytics, live NPC tracking. The window into the town.

Nuxt 3 · PixiJS · Chart.js

Ralph wrote 88% of this.

An autonomous AI developer running local models via Ollama. No cloud APIs. No pair programming. Hand it a spec, come back to review the PR.

The Loop

// Ralph's core loop — simple by design
while stories_remaining:
    story = worklist.next()
    code  = model.generate(story.spec)
    result = test_runner.run(code)
    
    if result.passed:
        git.commit(story.id)
        worklist.complete(story)
    else:
        code = model.fix(result.errors)
        // retry until green or limit
1,451 Commits in v1
510 Stories completed
2.5/day Average velocity
$0 Cloud LLM cost

v2 Model Lineup

Tier Model Use Case
Primary Qwen3-Coder-Next Day-to-day code generation across all services
Heavy Qwen 3.5:27b Complex multi-file changes, architecture decisions
Debug DeepSeek R1:14b Error diagnosis, test failure analysis

The code is open.

420 files. 12 languages. 27 Kafka topics. Every commit has a story ID. v1 is live; v2 is on the way.