Complete the Production Tasks API
Build CRUD, validation, error semantics, business rules, filtering, search, stable sorting, and pagination as one coherent API.
What you are building
Deliverables
Work through it one observable step at a time
- 01
Implement POST and define its request/response schema.
- 02
Implement collection GET with deterministic sorting.
- 03
Implement GET by id with deliberate 404 behavior.
- 04
Implement PATCH and keep patch semantics distinct from replacement.
- 05
Implement DELETE using the product’s chosen delete semantics.
- 06
Validate untrusted payloads with Zod and shape validation failures consistently.
- 07
Add one business invariant in the service layer and one database constraint where appropriate.
- 08
Add filtering/search and prove results with fixtures.
- 09
Implement offset pagination, then cursor pagination with a stable tie-breaker.
- 10
Write API contract tests for success and important failure paths.