generated from wiz4apps/templates.OnlineShop
⚙️ Backend & API — Next.js scaffold + CRUD route handlers #4
Labels
No labels
High Priority
Low Priority
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: SemianiakaVY/todo-list#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal — scaffold Next.js on the existing brief-only repository and expose the task CRUD over HTTP.
Owner — Code Expert (
w4c-code).Deliverables
GET /api/todos(open first, newest first),POST /api/todos({title}→ 201),PATCH /api/todos/:id({title?, done?}),DELETE /api/todos/:id(204),GET /api/health.{ "error": string }; prepared statements only; 404 on a missing task.node:22-bookworm-slim, installcorepack pnpm install, servecorepack pnpm dev --host 0.0.0.0 --port {port}, port 9000) — do not invent other commands.Acceptance (runtime)
POST /api/todoswith{"title":"buy milk"}→ 201;GET /api/todosreturns it;PATCH{"done":true}→ 200 withdone: true;DELETE→ 204.GET /api/todos→ the task is still there (persistence proof).POSTwith{"title":" "}→ 400 with anerrormessage.Ref —
docs/PLAN.md§3–§4,SPEC.md§3–§6; skillsstack-nextjs,stack-nextjs-quality.