The app is now on a more production-shaped Phase 3 foundation:
- Alembic migrations for schema versioning
- Stronger auth with managed sessions, cookie support, logout, and session revocation
- CI and smoke checks for migrations, tests, and container builds
- A modular frontend foundation under
app/static/js/
alembic.inialembic/env.pyalembic/versions/20260407_0001_initial_schema.py
Run migrations manually:
alembic upgrade headThe app now supports:
- cookie-backed auth for the web UI
- bearer token auth for API clients
POST /v1/auth/logoutGET /v1/auth/sessionsPOST /v1/auth/sessions/revoke
Protected routes accept either:
Authorization: Bearer <access_token>
or the managed session cookie set by login/register.
Added:
.github/workflows/ci.ymlscripts/smoke_check.py
CI now:
- installs dependencies
- runs
alembic upgrade head - runs the unit suite
- runs an app startup smoke check
- builds the Docker image
The dashboard script is now modular:
app/static/js/api.jsapp/static/js/auth.jsapp/static/js/dom.jsapp/static/js/main.jsapp/static/js/state.jsapp/static/js/workspace.js
That gives us a cleaner base for future UI work without introducing a JS build system yet.
python -m venv .venv && source .venv/Scripts/activate && python -m pip install --upgrade pip && pip install -r requirements.txt
alembic upgrade head
uvicorn app.main:app --reloadOpen:
http://127.0.0.1:8000/http://127.0.0.1:8000/docs
docker compose up --buildThe container entrypoint now runs migrations before starting Uvicorn.
Key environment variables:
APP_DATABASE_URLAPP_AUTH_TOKEN_TTL_HOURSAPP_ALLOW_OPEN_REGISTRATIONAPP_SESSION_COOKIE_NAMEAPP_SESSION_COOKIE_SECURE
Example values live in .env.example.
python -m unittest test_scoring.py
python scripts/smoke_check.pyThis is a much stronger base, but it is not yet “finished enterprise production.” The next meaningful steps would be:
- real migration chaining for future schema changes
- RBAC expansion beyond
adminvsanalyst - password reset and email verification
- audit log APIs and session analytics
- background workers for imports
- a full frontend app build pipeline
- observability and alerting integration