Todoish is a single-user todo sample for the course, not a production app.
Coding conventions for this repo live in AGENTS.md.
- React 19 — UI library;
src/components/ - Next.js — App Router;
src/app/page.tsx,src/app/layout.tsx - Prisma — SQLite ORM;
prisma/schema.prisma,src/prisma/prismaClient.ts - Storybook — UI in isolation;
.storybook/, colocated*.stories.tsx - Atomic Design — UI folder map;
src/components/{atoms,molecules,organisms,templates,pages} - Tailwind CSS — utility classes;
src/app/globals.css - Vite — Storybook and Vitest toolchain, not the Next.js bundler;
.storybook/main.ts,vitest.config.ts - Vitest — component/story/action tests; colocated
*.test.tsx,tests/actions/ - Playwright — e2e;
tests/e2e/,playwright.config.ts - SQLite — local DB used by Prisma;
prisma/dev.dbis gitignored and created on migrate;prisma/schema.prisma
- Install Node.js and npm. Clone this repo.
npm install- Copy
.env.exampleto.env(do not commit.env) npm run prisma:generatenpm run prisma:migrate(applies existing migrations; createsprisma/dev.db)npm run dev→ http://localhost:3000/
See ./package.json
Execute using npm run [name of script]
dev— Next.js app at http://localhost:3000/storybook— Storybook UI on port 6006test— Vitest (storybook, components, and actions projects)test:e2e— Playwright e2eprisma:migrate— apply existing migrations; createsprisma/dev.dbprisma:generate— generate the Prisma client
.
├── src/
│ ├── app/ # routes (`page.tsx` is `/`)
│ │ ├── page.tsx # `/` — loads todos, injects Server Actions
│ │ ├── layout.tsx # root layout and document metadata
│ │ └── globals.css # Tailwind entry
│ ├── components/ # atomic UI
│ │ └── atoms/Button/Button.tsx # canonical atom
│ ├── actions/ # Server Actions
│ │ └── todo/createTodo/createTodo.ts
│ ├── prisma/prismaClient.ts # Prisma client used by actions
│ └── generated/prisma/ # generated client; do not edit
├── prisma/ # schema and migrations
├── .storybook/ # Storybook config
├── tests/
│ ├── actions/ # action tests (`prisma/test.db`)
│ └── e2e/ # Playwright (`prisma/dev.db`)
├── specs/ # SDD specs
├── vitest.config.ts # Vitest projects (storybook, components, actions)
├── playwright.config.ts # Playwright e2e config
└── AGENTS.md # conventions for this repo
To explore the codebase, start with src\app\page.tsx.
Review Prisma Schema in prisma\schema.prisma
When adding a feature with an AI agent, follow the spec layout, invoke the skills explicitly, and use the process below.
specs/spec_template.md— starting headings for a new specspecs/NNN-kebab-slug/— one folder per specspec.md— what to build and constraints (Context, Goals, Requirements, Out of scope)plan.md— how to build (files, APIs, order); written by spec-plan, not by hand during grilltask.md— checkable implementer work; written by spec-plan, executed by spec-execute
.agents/skills/spec-grill-me/,spec-plan/,spec-execute/— the SDD skills
New folder names use the next unused 3-digit prefix, then a kebab-case slug (NNN-kebab-slug).
Each skill must be invoked explicitly:
/spec-grill-me @specs/NNN-slug/spec.md
/spec-plan @specs/NNN-slug/spec.md
/spec-execute @specs/NNN-slug/task.md
- spec-grill-me — questions in rounds, then updates
spec.mdin place until Requirements and Out of scope are implementable. Does not implement. Does not createplan.mdortask.md. - spec-plan — reads an implementable
spec.mdand writes colocatedplan.mdandtask.md. Does not implement. Does not edit the spec. If those files already exist, ask before overwriting. - spec-execute — implements remaining unchecked items in
task.mdin order (including Verify) and marks them[x]as it goes. Does not rewrite spec, plan, or tasks (except checkboxes).
If spec.md is still too vague, spec-plan should stop and tell you to run spec-grill-me first. If task.md is missing or too vague, spec-execute should stop and tell you to run spec-plan first.
Always this order; do not skip spec-grill-me.
- Copy
specs/spec_template.mdtospecs/NNN-kebab-slug/spec.mdand draft the headings (can be rough). - Run spec-grill-me on that spec until Requirements and Out of scope are specific enough to implement without guessing (or stop is prompted).
- Run spec-plan on that spec →
plan.mdandtask.md. - Run spec-execute on that spec’s
task.md→ implement remaining tasks, including Verify. - Encode only durable conventions in
AGENTS.md(leave the Next.js block at the bottom unchanged). Do not dump the whole spec intoAGENTS.md.
One skill at a time. Do not hand-write plan.md / task.md instead of spec-plan.