Module · core
Config, key manager, security primitives.
Configuration via env vars or a `.env` file. Rate limiting on the request path. Input sanitisation against SQL injection and XSS at every boundary.
Work / Enterprise · Security / Facial Surveillance
A production facial recognition surveillance system. Multi-database. AES-256 face encodings, Argon2 password hashes, keys that rotate themselves every 90 days. No human in the loop. No downtime when they roll over.
Act I · The Problem
The camera works. The model works. The launch demo works. Then a key expires, and nobody knows where it lives. A database goes down, and there's no fallback. A junior rotates a secret, and last quarter's footage decrypts to noise. Production-grade is not the recognition. It is everything around it.
Act II · The Foundation
Pick the database your operations team already runs. The system detects what is available, falls back when it has to, and never asks the operator to choose at install time.
| Priority | Database | Use case | Status |
|---|---|---|---|
| i. | PostgreSQL | Production. Multi-tenant deployments, audit-heavy workloads, write-heavy logging. | Recommended |
| ii. | MySQL | Production alternative for shops already standardised on MySQL or MariaDB. | Supported |
| iii. | SQLite | Development laptop, single-camera kiosk, air-gapped pilot. Zero-config fallback. | Default |
Act III · The Key Lifecycle
Every key the system uses is generated, encrypted, rotated and retired without a human on the keyboard. The PBKDF2-derived master key wraps everything else. Old data still decrypts during rollover. New data uses the new key the moment it is born.
Act IV · The Product
Module · core
Configuration via env vars or a `.env` file. Rate limiting on the request path. Input sanitisation against SQL injection and XSS at every boundary.
Module · database
One connection layer, three drivers. Health-checked at boot. Queries are parameterised. Schemas migrated by the manager itself, no manual SQL on first run.
Module · recognition
Frame capture, detection, embedding, match. Default match threshold 0.6, configurable via `FR_MIN_CONFIDENCE`. Visitor logs include confidence per recognition.
Surface · streamlit
`run.bat` on Windows. `run.sh` on Linux and macOS. Optional `install_service.sh` registers it as a systemd unit. Lives at http://localhost:8501.
The Stack
Act V · Proof
Pipeline at `.github/workflows/ci.yml` runs the full pytest suite on every push. Tests cover key management, security primitives, database connections and configuration loading.
`run.bat` for Windows, `run.sh` for Linux and macOS. `install_service.sh` registers a systemd unit so the recognition service comes up with the box.
Every security event written to the audit log: key rotations, failed matches, rate-limit trips, configuration changes. Nothing happens silently inside the system.
The 24-hour grace window means a rolled key never strands historical data. Optional one-click re-encryption migrates older rows to the current key from the UI.
I build production security software the way operations teams want it: rotated keys, real fallbacks, audit trails, and one launcher per OS. Hire dmj.one for the parts of security you cannot demo.