Step 04 of 10 2-3 weeks· advanced
Step 4: Design the API
Define the API contract before writing any backend code. Web realities (network latency, pagination, versioning) drive the design — not the WinForms patterns.
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.
Recommended skills
Drop these into Claude Code for this phase
Skills auto-trigger on the right kind of request. Install once; they apply to every prompt that fits.
Recommended MCP configs
Wire these tools into Claude Code first
MCP servers give Claude Code direct access to external systems (Jira, browsers, databases). Configure once.
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.
- OpenAPI 3.1 spec at /api/openapi.yaml
- Every WinForms operation mapped to an endpoint
- Pagination / filtering / sorting designed for grid replacements
- Auth scheme documented (Bearer JWT)
- Error format consistent across endpoints
- Spec validated with openapi-cli lint
- SDK clients can be generated
Common pitfalls
What goes wrong at this step
- Chatty endpoints — WinForms code-behind makes 50 DB calls per form; don't make 50 API calls per page
- No pagination — WinForms grids load 50K rows in memory; web grids need server-side pagination
- Inconsistent error formats — every endpoint should return errors the same way