feat: Phase 1 - multi-user auth foundation

- New auth.py module: users table, invite_codes table, JWT auth,
  password hashing (bcrypt), auth dependencies for FastAPI
- KITHARA_MODE=single|multi in .env (default: single)
- Single mode: no auth required, no login, user_id='default'
- Multi mode: full JWT auth, login/register endpoints, admin bootstrap
- Health endpoint now reports mode: {status, version, mode}
- Auth endpoints: POST /api/auth/login, /register, GET /me
- Admin endpoints: GET /admin/users, POST /admin/users,
  POST /admin/invites, GET /admin/invites,
  DELETE /admin/users/:id, PUT /admin/users/:id/role
- BYOK: PUT /api/auth/api-key for per-user Lyria keys
- DB migrations: user_id, shared, remixed_from columns on clips
- DB indexes for user-based and shared-content queries
- requirements.txt: added PyJWT and passlib[bcrypt]
- .env.example: documented all new config options
This commit is contained in:
rin.kagamine committed 2026-05-31 11:59:07 -04:00
1 parent b008a6790a
commit b3f273942e
5 files changed
+540 -5

No files matched your search

+2
View File
@@ -10,3 +10,5 @@ librosa==0.10.2
soundfile==0.12.1
google-genai==1.0.0
mutagen==1.47.0
PyJWT==2.8.0
passlib[bcrypt]==1.7.4