A local security monitoring project built around a fictional document-sharing app. It turns login and document-access activity into security events, runs detection rules, and lets an analyst investigate alerts with their underlying evidence.
- Provides a document app with user roles and organization-based access controls.
- Records application activity and ingests events into PostgreSQL.
- Detects failed logins followed by a success and repeated denied document access.
- Shows alerts, supporting events, and case decisions in a React interface.
The backend uses Python and FastAPI. The frontend uses React and TypeScript. PostgreSQL runs locally through Docker Compose. This is a portfolio lab, not a production SIEM.
Requires Python 3.10+, Node.js 24.15+, and Docker.
-
Install dependencies and create your local configuration:
python3 -m venv .venv source .venv/bin/activate python -m pip install -e '.[dev]' cd frontend && npm ci && cd .. cp .env.example .env
-
In
.env, setPOSTGRES_PASSWORDand use the same password inDATABASE_URLandTEST_DATABASE_URL. SetCOLLECTOR_TOKENto a random value of at least 16 characters andSEED_USER_PASSWORDto a password of at least 12 characters. -
Start PostgreSQL and prepare the database:
docker compose up -d --wait python -m scripts.migrate python -m scripts.seed
-
Start the API and frontend in separate terminals:
uvicorn backend.api:create_app --factory --no-access-log
cd frontend && npm run dev
Open http://127.0.0.1:5173. Sign in as
analyst@lab.example.test with SEED_USER_PASSWORD to view alerts. To generate
sample alerts, run these commands while the API is running:
python -m scripts.generate_scenarios suspicious
python -m scripts.run_detection