Backend API And AI
Work from route to controller to service to model before changing behavior.
Follow This Workflow
- Identify the request surface in
routes/or scheduled handlers. - Read the controller, service, and model together.
- Preserve response shapes unless the frontend is updated in the same task.
- Treat auth and reset-password flows as security-sensitive.
- Validate with
cd backend && npm testwhen feasible.
Use The References
- Read
references/backend-map.mdfor key files, commands, and env. - Read
references/chat-surface.mdwhen the task touches sitewide chat.