08 — Stack and technologies
The golden rule of altitude applied to tools: the simplest thing that meets today’s requirement; add complexity when a metric forces it (→ 12).
Defaults (depart deliberately, with an ADR)
| Layer | Default | Switch when |
|---|---|---|
| Agent / process | Claude Code + Git + GitHub (Repository (repo) — A store of the whole project’s code together with its full history of changes — who changed what and when. The repo is the project’s memory: code, documentation and change history in one place. more in the glossary →, PR (pull request) — A request to merge a branch into the main version, with a description of the changes and room for review. A small PR can be reviewed properly in fifteen minutes; a huge one goes through “on trust”. more in the glossary →, Issue — A task or bug recorded in a tracker (e.g. GitHub Issues), with a description and acceptance criteria. That’s where the “why” of a change lives — not in someone’s head or a chat that will disappear. more in the glossary →) | — |
| Backend, scripts, data | Python — A popular, readable programming language — The Craft’s default for scripts, data and the back end. A proven default: lots of ready tools and libraries, easy to drive with AI. more in the glossary → (FastAPI for an API — An agreed way for two programs to talk to each other — one asks, the other answers in a set format. Through an API your app connects to outside services (payments, maps, AI). Treat an API key like a password. more in the glossary →, pytest) — the widest ecosystem for scripts, data and AI glue | the job is done better elsewhere: Go (concurrent network services, one static binary), Rust (hot paths, memory safety, small footprint), Kotlin (JVM libraries, Android), TypeScript/Node (the web layer is already JS) |
| Database | SQLite — The simplest database — the whole thing lives in one file, with no separate server. A great default to start: zero configuration, easy backup (you copy the file). As you grow, you migrate up. more in the glossary → (WAL — Write-Ahead Log: a database mode where changes go to a journal first, then to the data. Gives safety (recovery after a crash) and better read/write concurrency. more in the glossary →) | concurrent writes, roles, heavy relations → PostgreSQL — A solid, “grown-up” database for bigger apps — runs as a separate server. The default step after SQLite, when you need many concurrent users and advanced features. more in the glossary → |
| Web / front | server-rendered HTML + a little vanilla JS | genuinely rich interaction → a Framework — A ready-made skeleton with the basic parts of an app, which you build on instead of starting from scratch. It saves work but adds a dependency and weight — the doctrine reaches for one only when the interaction needs it. more in the glossary → (e.g. Next.js) |
| API | REST/JSON with an explicit contract (OpenAPI) | — |
| Cache — A temporarily remembered result, so the same thing isn’t computed again on every request. Speeds the app up, but can be a trap: a stale cache shows old data. more in the glossary → / queue | none | a measured traffic profile → Redis |
| Packaging | Docker / container — Packaging an app with everything it needs so it runs the same on every computer. Kills “works on my machine” — the same environment locally and on the server. more in the glossary → where dependencies hurt | a dependency-free script → no container |
| Hosting | one VPS — A rented piece of a cloud server “just for you”, where you put an app “live”. Predictable cost and full control. One VPS easily carries a few small projects. more in the glossary → (e.g. Hetzner — A cheap, solid server (hosting) provider you put an app “live” on. The codex’s default server choice — predictable cost and performance without overpaying. more in the glossary →) + nginx — A program at the front of the server that takes traffic from the internet and routes it to your app. Handles HTTPS, serves static files, balances traffic — the server’s proven “reception desk”. more in the glossary → + systemd/pm2 — A manager that keeps the (Node) app running all the time — restarts it after a crash. Without it, after a crash or server restart the app just sits idle. pm2 keeps it “alive”. more in the glossary → — a Monolith — An app built as one whole (one deploy, one database), not a patchwork of separate services. A simple, cheap default to start — easy to grasp. You split it only when scale really demands. more in the glossary → | uneven/global traffic, cold start acceptable → Serverless — A model where you don’t manage a server — the code runs itself when someone needs it, and sleeps when not. You pay per use, it scales itself. The trap: a “cold start” — the first call can be slower. more in the glossary → |
| Icons | Lucide only (one geometry, one sprite) | — |
| LLM (language model) — An AI model trained on huge amounts of text that understands and generates language — e.g. Claude. Great with unstructured text, but more expensive and less predictable than ordinary code. more in the glossary → | Claude via the official SDK, streamed (→ 13) | — |
Rules
- The monolith is the default architecture: one app, one database, one server — one Deploy — Releasing a new version of the app “live”, where real people use it. It’s the moment a change reaches real people — which is why it happens only on an explicit “deploy”. more in the glossary →, one log, one Backup — A copy of your data saved earlier, which you return to when something goes wrong. It’s the only way to undo a change to data — code comes back from git, data only from a backup. more in the glossary →, one Rollback — Reverting a change to the previous, working state — “Ctrl+Z” for a deployment. When a new version breaks production, a rollback restores the previous one in seconds instead of fixing in a panic. more in the glossary →. Split into services only when traffic, team or failure isolation demands it.
- The language is chosen by fit, not by habit. Python is the default, not a dogma: switch when efficiency, concurrency, deployability or a library that only exists in another ecosystem decides — and say which, with a number or the missing library, in an ADR (decision record) — A short note: what we chose, why, and which alternatives we rejected (Architecture Decision Record). Six months later nobody has to guess whether a decision was deliberate and whether it’s safe to change. more in the glossary →. One language per layer, not one per mood; a rewrite “for speed” needs a measurement first (→ 13).
- Testable from the first line beats trendy. A technology you can’t cover with fast, deterministic tests is the wrong choice (→ 03).
- Boring and mature over new: ecosystem, documentation and testability decide, not hype.
- Reproducible environments: pinned dependencies (lock file), a virtual environment / image.
- Secrets live in env or a secret store — never in the repo.
- Every non-default choice gets an ADR: the why and the rejected alternatives, in
docs/.
Anti-patterns
- 🚫 Microservices, Kubernetes or a distributed database for an MVP.
- 🚫 A stack chosen for the CV.
- 🚫 A heavy SPA where server-rendered HTML would do.
- 🚫 Mixing icon libraries.
- 🚫 Unpinned dependencies — “it worked yesterday”.
- 🚫 Python forced onto a job it serves badly (a hot path, a concurrent service, a library that lives on the JVM) — or a rewrite in a “faster” language with no measurement behind it.