Project case study

Todo

The active module of the AI-first Hub: a single-user task manager with projects, a tree-structured task list, and an editing sheet — designed as a study in productionizing a 'simple' personal module.

Production-like
Problem
Generic task managers don't enforce the engineering discipline I want around my own work — no migrations, no real authentication, no production deploys, no backups. They are useful but invisible as evidence of work.
Solution
A single-user web module with real auth (Yandex ID), real persistence (PostgreSQL 16 with proper FK and CHECK constraints), real deploys (CI to a Yandex Cloud VM with golang-migrate), and a tree-structured UI that I actually use every day.
AI-first angle
Spec-first development with Claude Code for layer-respecting code (domain stays pure Go; SQL stays in the postgres adapter), AI-generated tests pinned against real invariants, and ports-and-adapters enforced by the import graph rather than by review.
Tech stack
Go 1.25, PostgreSQL 16, chi, pgxpool, React, TypeScript, Vite, Tailwind v4
Links
Repository

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.