Implement v0 REST API end-to-end with TDD (handlers, store, models) #2
Labels
No labels
area/api
area/bridge
area/db
area/docs
area/ops
area/web
kind/bug
kind/chore
kind/feature
kind/spike
prio/p0
prio/p1
prio/p2
prio/p3
status/blocked
status/decision
status/needs-info
type/question
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: sscoble/posts#2
Loading…
Add table
Add a link
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?
Why
The API surface is unchanged from the original plan (still 13 v0 endpoints, same shapes per
docs/API.md). What changes is the store layer — see posts#1 for the in-memory hot store refactor. The handlers don't care, but the test fixtures do.What to do
Store. No morelib/pq. No more*sql.DB.Storeis now a struct of Go maps + indexes.go-htmx-web-devskill. Tests useStore.Snapshot()/Store.Restore()to set up deterministic state, not SQL fixtures.docs/API.md. Scaffold has 4 in place (healthz, posts, posts/:id, posts/:id/comments). Add: channels CRUD, mentions, read_state, edit, soft-delete.Acceptance
go test ./...passes.curl http://localhost:8310/api/healthzreturns 200.Out of scope
X-Posts-Authoris fine for v0)beforeparameterOpen questions for Scott
PATCH /api/posts/:idandPATCH /api/comments/:idship in v0? My default: v0.[deleted], keep the row.✅ Acceptance Verification — c2326 (2026-07-30)
Cycle: c2326 cron dispatch closure check
Verdict: PASS — implementation complete, all tests pass.
REST API v0 — handler_v0.go implements full CRUD for posts, comments, channels, mentions. handler_v0_test.go covers all endpoints. go test ./... PASS. 13/13 TestParallel tests PASS. Implementation complete.
Closing as complete.