What problem does it solve?
Ensure site HTTP endpoints in the Madoc TypeScript service are implemented consistently, follow shared middleware and authorization patterns, and return predictable request/response shapes to reduce bugs and integration issues.
Core Features & Use Cases
- Conventions for Route Modules: Guidance on where site route modules live under services/madoc-ts/src/routes/site and how to structure handlers.
- Middleware and Shared Setup: Advice on confirming and using shared middleware from services/madoc-ts/src/routes/root.ts and services/madoc-ts/src/routes/global/.
- Request/Response Expectations: Recommendations for consistent response shapes, auth/permission checks, and integration test coverage when adding or updating endpoints.
- Use Cases: Add a new site endpoint, modify an existing handler's response, or introduce middleware for site routes while preserving global behaviors.
Quick Start
Add a new site endpoint in services/madoc-ts/src/routes/site/ following existing handler patterns and using shared middleware from services/madoc-ts/src/routes/root.ts.