Admin Panel
Set up the Admin Panel dashboard in your app to manage users, revenue, and subscriptions.
Setup
To seed an Admin account, follow these steps:
- Open the script
scripts/seed-admin-manual.cjsand configure the new admin details:scripts/seed-admin-manual.cjsconst newAdmin = { email: 'your_admin@yourdomain.com', password: 'your-secure-password', name: 'Your Admin Name', role: 'admin', } - Run the command to create the admin:Terminal
npm run seed:admin
Usage
The Admin Panel dashboard is available at /admin (accessible only to users with the admin role).
Dashboard
- Stats: Displays total users, admins, members, and new signups (last 7 days).
User Management
- List Users: View all users with pagination and filter by name.
- Edit User Status: Update a user’s status to Active or Banned.
- Create New User: Add a new user by filling in name, email, role, and password (restricted to admins).