Commit Graph

3 Commits

Author SHA1 Message Date
KansaiGaijin
24fd6f16d2 fix: commit default campaign claim in ensure_admin_exists, surface setup errors to user
All checks were successful
Build and Push / build (push) Successful in 12m37s
2026-07-30 14:35:02 +12:00
KansaiGaijin
146da58e7d claim default campaign for the admin on startup so setup wizard works
Some checks failed
Build and Push / build (push) Has been cancelled
2026-07-30 12:55:36 +12:00
KansaiGaijin
5081ba00f6 add auth system and split backend into two-image CI/CD build
Some checks failed
Build and Push / build (push) Failing after 17s
Backend:
- password hashing via hashlib.scrypt
- stateless HMAC-SHA256 tokens (7-day expiry)
- POST /api/auth/login, /api/auth/register (admin), /api/auth/reset-password
- admin user created from NAT20_ADMIN_USERNAME/PASSWORD on first startup
- users table, campaign_shares table, created_by on campaigns
- require_user dependency on all routes except auth
- campaign sharing: GET/POST/DELETE /api/campaigns/{id}/shares

Frontend:
- AuthContext: user/token state, login/logout, global fetch Auth header
- Login page, Users page (admin user management)
- route protection, sidebar user info/sign out

Docker/CI:
- split backend/Dockerfile into thin app-only image
- backend/Dockerfile.deps builds the heavy WhisperX/PyTorch base
- CI builds deps only when requirements.txt changes
- docker compose pull now fetches ~100KB app layer instead of 3.5GB
2026-07-30 12:05:56 +12:00