API Design

Design and build the site's HTTP API surface — Next.js route handlers with typed Response.json, zod v4 validation at every boundary, one consistent error envelope (stable code + human message), strict status-code discipline, and the decision rule for when server actions beat API routes (internal mutations) and when routes win (external consumers, webhooks, non-browser clients). Invoke during the backend phase whenever the brief needs HTTP endpoints or the user says "API", "endpoint", "REST", "route handler", "webhook", or "expose the data". For the site's own forms mutating its own data, use ultraweb:server-actions instead.

blyatiful1 950fb5c 3 files · 8.5 KB Updated

File contents

blyatiful1/ultraweb/tree/main/skills/api-design commit 950fb5cafc

Frequently asked questions

npx skillmds@latest add blyatiful1/api-design