feat: add admin panel with session auth, user management, and billing dashboard

Implement a full-featured admin backend at `/manage/` with login authentication using
signed cookies and constant-time credential verification. The panel includes a dashboard
showing total/active users, storage usage, monthly revenue, and pending invoices, plus
user management, payment overview, and pricing configuration pages. New environment
variables `ADMIN_USERNAME`, `ADMIN_PASSWORD`, `ADMIN_SESSION_SECRET`, and
`ADMIN_SESSION_EXPIRE_HOURS` control access. The admin router is registered in main.py
and all new templates, auth module, and router files are added.
This commit is contained in:
2026-01-05 20:50:41 +00:00
parent a8e13cb3c5
commit b8d88f5807
16 changed files with 2316 additions and 2 deletions
+5
View File
@@ -27,3 +27,8 @@ SMTP_PASSWORD=
SMTP_FROM_EMAIL=no-reply@example.com
TOTP_ISSUER=MyWebdav
ADMIN_USERNAME=admin
ADMIN_PASSWORD=change-this-password
ADMIN_SESSION_SECRET=change-this-to-a-random-secret
ADMIN_SESSION_EXPIRE_HOURS=24