I am batman

This commit is contained in:
2026-07-12 20:26:16 -04:00
commit 5a3a6357cf
37 changed files with 2938 additions and 0 deletions

16
.github/instructions/api.md vendored Normal file
View File

@@ -0,0 +1,16 @@
# API Instructions
## Scope
- Applies to Fiber handlers and route registration under `internal/handlers` and `internal/server/routes.go`.
## Rules
- Keep API contracts stable; if changing request/response shape, document backward compatibility in PR notes.
- Prefer snake_case JSON request fields for backend payloads and accept legacy aliases only when needed.
- Validate required fields explicitly in handlers and return clear `400` errors with actionable messages.
- Return `404` for missing resources, `500` only for unexpected server/database failures.
- Keep route naming consistent (`/resource`, `/resource/:id`) and group related routes in `routes.go`.
## Implementation Notes
- Use `database.DB()` directly in handlers unless a service layer exists for that feature.
- Preload only required relations for performance-sensitive list endpoints.
- Keep list endpoints sorted deterministically (e.g., `position asc, id asc`).