scnmnt-api-router v0.1.0
adapter
capsule://quake0day/[email protected]
Registers all backend API routes for the SceneMint application, connecting specific URL paths to their respective handlers from other backend capsules. It acts as the central routing configuration for the HTTP server.
Owns
- Mapping of API endpoints to handler functions
- Application of security middleware to specific routes
Does not own
- Implementation of handler business logic
- Core application setup or configuration
AI orientation
An agent working on this capsule would focus on defining and organizing API endpoints. They should ensure that routes are correctly mapped to handlers and that appropriate middleware is applied for security and request processing.
Avoid
- Implementing the actual logic within the handlers
- Changing the core HTTP server setup
Provides
http_api:/api/*— All backend API routes for the application.
Requires
library:image.Clientfromscnmnt-image-generation-service— Client for image generation and prompt enhancement handlers.library:quota.Storefromscnmnt-quota-service— Store for quota status and check-in handlers.library:security.Middlewarefromscnmnt-security-middleware— Security middleware for applying CSRF and source guard to routes.library:config.Securityfromscnmnt-app-core— Security configuration for initializing middleware.
Dependencies
Capsules
scnmnt-image-generation-service>=0.1.0scnmnt-quota-service>=0.1.0scnmnt-security-middleware>=0.1.0
Invariants (must always hold)
- All sensitive API routes must be protected by CSRF and source guard middleware.
- API paths must be consistent and follow the defined `/api/*` prefix.
Source files (1)
Click any file to view its content; the path on the right shows where the file lands when this capsule is installed.
src/internal/router/route.go→internal/router/route.go
Plus capsule.yaml and
install.json.