Factory API

API conventions for both server actions and tRPC builds. Covers the decision between them, per-mutation Zod input schemas, central router composition, pagination shape, multi-field search via Drizzle `ilike` + `or()`, mutation lifecycle hooks, conditional query enabling, stale-time defaults, error response shape and custom error class taxonomy, mutation-boundary audit logging, fetch adapter for tRPC routes. Read when designing or implementing any data-mutation endpoint.

nonlinear-xyz 81491ea 16.8 KB Updated

File contents

nonlinear-xyz/factory-kit/tree/main/skills/factory-api commit 81491ea802

Frequently asked questions

npx skillmds@latest add nonlinear-xyz/factory-api