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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user