A lightweight SaaS for monitoring website and API uptime, response times, and incidents
Python
1
28 commits
updated Oct 4, 2026
StatusNest is a backend uptime monitoring service built with FastAPI, MySQL, Redis, Celery, and Docker.
It allows users to create website monitors, automatically check their availability, store historical results, detect outages, and track incidents.
Current version: v0.1.0 — Backend MVP
┌──────────────┐
│ FastAPI │
│ API │
└──────┬───────┘
│
▼
┌──────────────┐
│ MySQL │
└──────────────┘
▲
│
┌──────┴───────┐
│ Celery Worker│
└──────▲───────┘
│
┌──────┴───────┐
│ Redis │
└──────▲───────┘
│
┌──────┴───────┐
│ Celery Beat │
└──────────────┘
Celery Beat periodically schedules active monitors.
Celery workers perform website checks and save the results to MySQL. If a website becomes unavailable, StatusNest opens an incident. When the website becomes available again, the incident is automatically resolved.
Website UP
│
▼
Check result stored
│
▼
Website DOWN
│
▼
Incident opened
│
▼
Website still DOWN
│
▼
Existing incident remains open
│
▼
Website UP again
│
▼
Incident resolved
StatusNest includes several backend security protections.
Protected endpoints require a JWT access token.
JWT secrets are loaded from environment variables and are not stored directly in the source code.
Users can only access their own monitors and incident history.
Requests for another user's resources return 404.
Monitor URLs are validated before requests are made.
The application blocks targets such as:
localhost127.0.0.1Redirect following is disabled during monitor checks.
statusnest/
├── alembic/
├── app/
│ ├── api/
│ ├── core/
│ ├── db/
│ ├── models/
│ ├── services/
│ ├── main.py
│ ├── tasks.py
│ └── worker.py
├── tests/
├── .env.example
├── docker-compose.yml
├── Dockerfile
├── pytest.ini
├── requirements.txt
└── requirements-dev.txt
Copy the example environment file:
cp .env.example .env
Then configure the values inside .env.
Example:
JWT_SECRET_KEY=replace-with-a-long-random-secret
MYSQL_ROOT_PASSWORD=replace-with-root-password
MYSQL_DATABASE=statusnest
MYSQL_USER=statusnest
MYSQL_PASSWORD=replace-with-db-password
DATABASE_URL=mysql+asyncmy://statusnest:replace-with-db-password@db:3306/statusnest
DATABASE_SYNC_URL=mysql+pymysql://statusnest:replace-with-db-password@db:3306/statusnest
CELERY_BROKER_URL=redis://redis:6379/0
Generate a secure JWT secret with:
python -c "import secrets; print(secrets.token_urlsafe(64))"
Never commit your real .env file.
Build and start the application:
docker compose up --build -d
Check the running services:
docker compose ps
The following services should be running:
api
worker
beat
db
redis
The API is available at:
http://localhost:8000
Swagger documentation:
http://localhost:8000/docs
Run Alembic migrations with:
docker compose exec api alembic upgrade head
Create a new migration after changing database models:
docker compose exec api alembic revision --autogenerate -m "migration description"
Activate the local virtual environment:
source .venv/bin/activate
Install development dependencies:
python -m pip install -r requirements-dev.txt
Run all tests:
pytest -v
The current backend MVP includes automated tests for:
Register
Login
Current user
Create monitor
List monitors
Get monitor
Update monitor
Delete monitor
Manual check
Check history
Statistics
Incident history
Active monitors are periodically scheduled by Celery Beat and processed by Celery workers.
Completed:
Future versions may include:
StatusNest v0.1.0 is a backend MVP and portfolio project.
Additional security hardening and operational configuration should be completed before exposing the service to untrusted public traffic.
This project is licensed under the MIT License. See the LICENSE file for details.
Python
98.0%
Mako
1.6%
A lightweight SaaS for monitoring website and API uptime, response times, and incidents
Python
1
28 commits
updated Oct 4, 2026
StatusNest is a backend uptime monitoring service built with FastAPI, MySQL, Redis, Celery, and Docker.
It allows users to create website monitors, automatically check their availability, store historical results, detect outages, and track incidents.
Current version: v0.1.0 — Backend MVP
┌──────────────┐
│ FastAPI │
│ API │
└──────┬───────┘
│
▼
┌──────────────┐
│ MySQL │
└──────────────┘
▲
│
┌──────┴───────┐
│ Celery Worker│
└──────▲───────┘
│
┌──────┴───────┐
│ Redis │
└──────▲───────┘
│
┌──────┴───────┐
│ Celery Beat │
└──────────────┘
Celery Beat periodically schedules active monitors.
Celery workers perform website checks and save the results to MySQL. If a website becomes unavailable, StatusNest opens an incident. When the website becomes available again, the incident is automatically resolved.
Website UP
│
▼
Check result stored
│
▼
Website DOWN
│
▼
Incident opened
│
▼
Website still DOWN
│
▼
Existing incident remains open
│
▼
Website UP again
│
▼
Incident resolved
StatusNest includes several backend security protections.
Protected endpoints require a JWT access token.
JWT secrets are loaded from environment variables and are not stored directly in the source code.
Users can only access their own monitors and incident history.
Requests for another user's resources return 404.
Monitor URLs are validated before requests are made.
The application blocks targets such as:
localhost127.0.0.1Redirect following is disabled during monitor checks.
statusnest/
├── alembic/
├── app/
│ ├── api/
│ ├── core/
│ ├── db/
│ ├── models/
│ ├── services/
│ ├── main.py
│ ├── tasks.py
│ └── worker.py
├── tests/
├── .env.example
├── docker-compose.yml
├── Dockerfile
├── pytest.ini
├── requirements.txt
└── requirements-dev.txt
Copy the example environment file:
cp .env.example .env
Then configure the values inside .env.
Example:
JWT_SECRET_KEY=replace-with-a-long-random-secret
MYSQL_ROOT_PASSWORD=replace-with-root-password
MYSQL_DATABASE=statusnest
MYSQL_USER=statusnest
MYSQL_PASSWORD=replace-with-db-password
DATABASE_URL=mysql+asyncmy://statusnest:replace-with-db-password@db:3306/statusnest
DATABASE_SYNC_URL=mysql+pymysql://statusnest:replace-with-db-password@db:3306/statusnest
CELERY_BROKER_URL=redis://redis:6379/0
Generate a secure JWT secret with:
python -c "import secrets; print(secrets.token_urlsafe(64))"
Never commit your real .env file.
Build and start the application:
docker compose up --build -d
Check the running services:
docker compose ps
The following services should be running:
api
worker
beat
db
redis
The API is available at:
http://localhost:8000
Swagger documentation:
http://localhost:8000/docs
Run Alembic migrations with:
docker compose exec api alembic upgrade head
Create a new migration after changing database models:
docker compose exec api alembic revision --autogenerate -m "migration description"
Activate the local virtual environment:
source .venv/bin/activate
Install development dependencies:
python -m pip install -r requirements-dev.txt
Run all tests:
pytest -v
The current backend MVP includes automated tests for:
Register
Login
Current user
Create monitor
List monitors
Get monitor
Update monitor
Delete monitor
Manual check
Check history
Statistics
Incident history
Active monitors are periodically scheduled by Celery Beat and processed by Celery workers.
Completed:
Future versions may include:
StatusNest v0.1.0 is a backend MVP and portfolio project.
Additional security hardening and operational configuration should be completed before exposing the service to untrusted public traffic.
This project is licensed under the MIT License. See the LICENSE file for details.
Python
98.0%
Mako
1.6%