Why it exists
A full-stack app with accounts, sharing, realtime editing and long-running AI work has many places to leak access or lose data. I wanted a small reference build that shows how to plan it in writing first and check each piece as I go.
Portfolio / CASE STUDY
Reference system with a public guide
A spec-driven reference app where teams sketch an architecture on a shared canvas, ask a local model to extend it, and generate a Markdown spec.
Independent full-stack architecture, spec writing and verification
A full-stack app with accounts, sharing, realtime editing and long-running AI work has many places to leak access or lose data. I wanted a small reference build that shows how to plan it in writing first and check each piece as I go.
I wrote six context files covering the overview, architecture, code standards, AI rules, UI and a progress tracker. Then I built the app in 12 specified units, each with its own spec and verification step. Every paid service has a local replacement behind one module, so the whole system runs on one machine.
Better Auth, a Yjs room server, a pg-boss worker, a disk blob store and Ollama stand in for hosted vendors. Each sits behind one module in lib/, so swapping a vendor touches that module and not the feature code.
The app issues a short-lived token that names one room, and only after confirming the user owns or collaborates on the project. The room server refuses anything else, and it closes a socket when a collaborator is removed.
The model returns components, tiers and links against a zod schema. My code cleans labels, drops duplicate and dangling edges, and computes the layout, so the model never sets coordinates.
A local reference build, not a hosted product. It needs Docker and Ollama to run. A separate review pass found six realtime and job issues, and I fixed all six, four with end-to-end regression checks. Rate limiting is still in memory, and edits in the last two seconds before the final client leaves can be lost. Both are recorded as open in the progress tracker.