Add an API route
Follow the conventions in .claude/rules/api.md (response schemas, z.date(), global error
envelope). Steps:
- Request schema: reuse or add in
packages/contracts(or the module's<name>.schema.ts). Uuid path ids viaidParam. - Response schema: model the service's return exactly in
<name>.schema.ts, or use a shared envelope from@/types/response. Elysia strips fields not in the schema. - Route: in
modules/<name>/<name>.controller.ts, addbody/query/paramsas needed, theresponsesuccess schema, adetailsummary, and arateLimit(policy)beforeHandlewhere the endpoint warrants one. No per-route error responses - they're declared globally. - Logic in
<name>.service.ts(tsyringe@singleton; injected classes stay value imports). New module: mirror an existing one and mount its controller inapp.ts. - Web side (if needed): Eden Treaty picks up types automatically; add query/mutation hooks
under
apps/web/src/api/. - Invoke the
verifyskill.