Files
cvfs/.claude/commands/api.md
Daniel Alves Rösel 90ad5e0260 Initial commit
2026-04-02 18:47:14 +02:00

15 lines
606 B
Markdown

Scaffold a new API endpoint. Read apps/backend/fastapi/server.py (or flask if BACKEND_MODE=flask) first.
From the arguments, determine:
- HTTP method and path (e.g. POST /items)
- Request/response shape
- Any DB or external service calls needed
Add the route to the appropriate server.py. Follow the existing structure:
- Use Pydantic models for FastAPI request/response schemas
- Use dotenv for any config
- Add proper status codes and error responses
- Keep business logic out of the route handler; extract to a helper if more than ~15 lines
If a new dependency is needed, add it to requirements.txt.