Step 06 of 9 1 hour· intermediate
Step 6: Scaffold the API
Generate REST endpoints, validation, and the OpenAPI spec for each resource.
Recommended prompts
Use one of these to do the work in your IDE
Open the template to read it in full. Click Copy prompt to grab it (with your stack values pre-filled where they apply) — then paste into Claude Code, Cursor, or wherever you build.
When you're done
Verify these in your own work before moving on
This is a checklist for you to mentally tick off in your repo and IDE — the site doesn't track it, you do.
- Routes file, controller, service, and schema for each resource
- OpenAPI spec generated and reviewed
- Validation runs on every request body
- Error responses follow a consistent shape
Common pitfalls
What goes wrong at this step
- Hand-rolling each endpoint — they'll diverge by week 3
- Skipping the OpenAPI spec — it's the contract your frontend reads