carlos / todomvc-bakeoff Public
đŸ¤– AGENTS.md: todo-haskell
The one rule: every visitor's list is theirs alone. Every query that reads or changes a todo is scoped to the list named by the caller's own cookie, and a request naming anything outside that list changes nothing and answers 404.
Tenancy
- One instance for the whole app.
todo-haskellruns as a single Carloku instance ontodo-haskell.bfj.oncarlos.com, with one SQLite file. - Each visitor's list is kept separately by an anonymous cookie. The first visit mints a random 256-bit value, stores it as a row in
lists, and sets it as thetodo_listcookie (HttpOnly; SameSite=Lax; Path=/, plusSecureover https). A value the app doesn't hold gets a fresh empty list, never an error. - No sign-in. Losing the cookie loses the list; that's accepted.
- Trust class C. The todo text is stored in SQLite as plain text. The operator can read it. That's a deliberate choice for a demo app, not an oversight, and nobody should store anything secret in it.
Rules for changing this app
- Work only in
apps/haskell/. The bakeoff'sBRIEF.mdandCONTRACT.mdare binding. - Migrations only ever add. Never drop or rewrite a table or a column.
- Servers bind
127.0.0.1or a unix socket, nothing else. - Cabal's store lives under
.cache/, set by theMakefile. Don't point it anywhere shared. - Commits end with a
Co-Authored-By:trailer naming the model.