Problem
A personal task manager is the most obvious “throwaway script” candidate. The temptation is to skip auth, skip migrations, skip backups, and ship a SQLite file behind a basic-auth header. That produces something usable but invisible as engineering work.
Solution
The Todo module is the reference module for the hub: it’s the first place every architectural rule had to survive contact with reality. It uses the same ports-and-adapters shape every other backend module follows, the same pgxpool connection, the same migrations runner, and the same Caddy edge.
Tech stack
Go domain types are pure (no HTTP, no SQL). The application layer orchestrates tasks and projects. The postgres adapter implements TaskRepository and ProjectRepository over pgxpool. The HTTP adapter exposes the private todo endpoints behind session middleware. The React UI consumes the private API through a typed client.
AI-first angle
- Domain invariants are exercised by table-driven Go tests written alongside Claude Code; the agent cannot write a test that crosses a layer boundary because the boundary is enforced by the package graph.
- Frontend hooks (
useTasks,useProjects) are small enough to fit one screen — small files make the agent’s edits predictable. - The tree-building logic and payload shapes live in
lib/modules with named functions, not anonymous arrows — which is what made later AI edits low-risk.
Status
In daily personal use. The module is Production-like: real auth, real database, real deploys, daily backups. No public demo — see the AI-first Hub case study for the privacy boundary.
Repository
github.com/anton415/anton415-hub — the Todo backend module lives under internal/todo/. The private hub’s frontend is a separate, intentionally-not-linked surface here.