# YBrowse Admin Guide
Initialize at `/admin/setup.php`, create the first super-admin with a 12+ character password, then delete setup.php.

Roles: Super Admin (all), Manager (operations), Support Admin (users/devices/support/notifications), Accountant (payments/methods/subscriptions/reports), Moderator (websites/notifications/support).

- Users: block/unblock, revoke sessions, extend trial.
- Subscriptions: configure plans, extend/cancel active subscriptions.
- Devices: approve/reject replacement requests; approval unbinds old device and revokes sessions.
- Payments: independently verify real bKash/Nagad/Rocket/Upay transaction before approval. Approval creates subscription for the enabled plan duration in a DB transaction.
- Payment methods: multiple receiving numbers, Personal/Merchant/Agent type, instructions, ordering and enable/disable.
- YouTube API keys: add/edit/delete, priority, enable/disable, quota/error counters. Keys are encrypted at rest using APP_KEY and masked in list view. Quota-exhausted/invalid keys are automatically disabled until reviewed.
- Websites, coupons, notifications, app versions and public settings are API-managed.
- Reports: CSV export for users, payments, subscriptions.
- Logs: admin activity and API request metadata.
- Backups: create SQL snapshot in private `storage/backups`; copy off-host securely.

Never expose API keys, DB credentials, passwords, bearer tokens or full payment secrets.
