fiofio is centered on the alert-collector service: a FastAPI API plus Celery worker/beat stack that periodically pulls alerts from a mocked upstream API, enriches and stores them in PostgreSQL, and exposes authenticated endpoints for listing alerts, triggering syncs, and checking overall system health.
- Python
3.13 uvtask- Docker with Docker Compose
openssl(used by local RabbitMQ TLS bootstrap)
From the repository root, run:
task setupThe command handles:
- creating local secret files and
.env- Note: Local secret files are meant to be a placeholder for a proper secrets manager
- installs Python dependencies for
alert-collectorandexternalMock - generates RabbitMQ development certificates
- builds and starts the Docker Compose stack
Create an API user, along with a bearer token:
task get-user-and-token EMAIL=admin@example.com PASSWORD=change-meNote: can be split into create-user and get-token.
Run formatting and tests:
task fmt
task test- Architecture overview: see
ARCHITECTURE.md - Development decisions and API exposure notes: see
DECISIONS.md
Inspect the local stack:
task logs SERVICE=alert-collector-apiTest the service locally with this flow:
- Bootstrap the stack:
task setup- Create a user and retrieve a bearer token:
task get-user-and-token EMAIL=admin@example.com PASSWORD=change-me- Use
POST /syncto trigger a manual sync run. - Use
GET /alertsto inspect collected alerts. - Use
GET /healthto monitor overall system health. - Use
task db-worker-executionsto get a summary of recent worker runs.
To measure how the service behaves when the external system is unreliable, adjust MOCK_ERROR_PROBABILITY in .env before running the stack or restarting the affected services.
The Nginx edge service publishes the collector on http://localhost:8000.
POST /auth/loginPOST /auth/logoutGET /alertsPOST /syncGET /health
All business endpoints require a bearer token. See DECISIONS.md for the current public/private endpoint split and auth details.