scnmnt-app-core v0.1.0
subsystem
capsule://quake0day/[email protected]
Manages the overall Go application lifecycle, configuration loading, logger setup, and serves static frontend assets. It acts as the orchestrator, integrating various backend services and exposing the main HTTP server.
Owns
- Application entry point and main function
- Centralized configuration loading from environment variables
- Global logger setup
- Static file serving for the frontend
- Core build and development scripts (Makefile, Dockerfile)
- Repository-level documentation and ignore files
Does not own
- Specific API route definitions (delegated to scnmnt-api-router)
- Business logic for image generation, quota, or security
AI orientation
This is the core Go application that orchestrates other backend services. An agent working on this capsule would focus on application startup, configuration, logging, and serving static files. It should ensure proper initialization and shutdown of dependent services.
Avoid
- Implementing specific business logic for image generation or quota management
- Modifying frontend code directly
Provides
cli:run— Main application entry point to start the HTTP server.http_api:/api/status— Provides a basic 'ok' status endpoint for health checks.env:Config— Application configuration loaded from environment variables.
Requires
library:image.Clientfromscnmnt-image-generation-service— Image generation and prompt enhancement client.library:quota.Storefromscnmnt-quota-service— Quota management store.library:security.Middlewarefromscnmnt-security-middleware— Security middleware for HTTP headers, CSRF, and source guarding.library:router.Registerfromscnmnt-api-router— Function to register all API routes onto the Echo instance.
Dependencies
Capsules
scnmnt-image-generation-service>=0.1.0scnmnt-quota-service>=0.1.0scnmnt-security-middleware>=0.1.0scnmnt-api-router>=0.1.0
Invariants (must always hold)
- All required environment variables must be present and valid at startup.
- The HTTP server must start successfully and serve static files from 'web/dist'.
Source files (14)
Click any file to view its content; the path on the right shows where the file lands when this capsule is installed.
src/.dockerignore→.dockerignoresrc/.env.example→.env.examplesrc/.github/workflows/docker.yml→.github/workflows/docker.ymlsrc/.gitignore→.gitignoresrc/AGENTS.md→AGENTS.mdsrc/cmd/main.go→cmd/main.gosrc/Dockerfile→Dockerfilesrc/go.mod→go.modsrc/go.sum→go.sumsrc/internal/app.go→internal/app.gosrc/internal/config/config.go→internal/config/config.gosrc/internal/handler/status.go→internal/handler/status.gosrc/Makefile→Makefilesrc/README.md→README.md
Plus capsule.yaml and
install.json.