# Admin Panel
The Admin Panel is the SaaS management interface where you manage tenants, plans, subscriptions, and system settings.
# Accessing the Admin Panel
# Development
http://localhost:5173/admin/login
# Production
https://yourdomain.com/admin/login
# Creating the First Admin User
If you haven't created an admin user yet:
cd server
npx ts-node prisma/create-admin.ts
Default credentials:
- Email:
admin@cloudpos.com - Password:
admin123
⚠️ Change this password immediately after first login!
# First Steps After Login
# 1. Change Your Password
- Click on your profile (top right)
- Go to "Settings" or "Change Password"
- Enter current password and new password
- Save changes
# 2. Configure System Settings
Navigate to Settings → System Settings
Configure:
- System name
- Default timezone
- Default currency
- Default language
- SaaS branding (logo, favicon)
# 3. Create Subscription Plans
Navigate to Plans → Create Plan
Set up your subscription tiers:
- Trial - Free trial plan
- Basic - Entry-level plan
- Pro - Advanced plan
- Enterprise - Full features
For each plan, configure:
- Name and description
- Monthly and yearly prices
- Features list
- Plan limits (users, branches, products, etc.)
- Stripe Price IDs (if using Stripe)
# 4. Configure Payment Gateway
See Payment Gateway for detailed setup.
Navigate to Settings → Payment Gateways
Configure Stripe:
- Test/Live mode toggle
- API keys
- Webhook secret
# 5. Configure Email Settings
See Email Notifications for detailed setup.
Navigate to Settings → Email Configuration
Configure SMTP:
- SMTP host, port, credentials
- From email and name
- Test email sending
# Admin Panel Features
# Dashboard
- Overview of tenants, subscriptions, revenue
- Recent activity
- System statistics
# Tenants (Clients)
- View all tenants
- Create new tenant
- Edit tenant details
- View tenant subscription
- Impersonate tenant (if enabled)
- Suspend/activate tenants
# Plans
- Create and edit subscription plans
- Set pricing (monthly/yearly)
- Configure plan limits
- Set Stripe Price IDs
- Activate/deactivate plans
# Subscriptions
- View all subscriptions
- Manual subscription assignment
- View subscription history
- Cancel subscriptions
- View payment history
# Payment Gateways
- Configure Stripe
- Test/Live mode toggle
- Webhook configuration
- Payment gateway status
# Settings
- System Settings: Name, timezone, currency, language
- Email Configuration: SMTP settings, templates
- Branding: SaaS logos, favicons
- Security: Demo mode toggle
# Users (Admins)
- Create admin users
- Assign admin roles
- Manage permissions
- View admin activity
# Admin Roles
# SUPER_ADMIN
- Full system access
- Can manage everything
- Cannot be restricted
# ADMIN
- Admin panel access
- Can manage tenants, plans, subscriptions
- Limited by permissions
# FINANCE
- Financial operations only
- View subscriptions, payments
- Cannot modify system settings
# Branding Settings
# SaaS Branding
Configure branding for the admin panel:
- Navigate to Settings → Branding
- Upload:
- Logo (Light): Logo for light backgrounds
- Logo (Dark): Logo for dark backgrounds
- Favicon: Browser tab icon
- Save changes
File locations:
- Uploads stored in:
server/uploads/saas/ - Accessible via:
/uploads/saas/logo-light.png
# Landing Page Branding
Configure branding for the public landing page:
- Navigate to Settings → Branding → Landing Page
- Upload:
- Landing Logo: Main logo
- Landing Favicon: Browser tab icon
- Save changes
# Creating a New Tenant
# Method 1: Via Admin Panel
- Navigate to Tenants → Create Tenant
- Fill in:
- Name: Company name
- Subdomain: Unique subdomain (optional)
- Email: Contact email
- Phone: Contact phone (optional)
- Address: Business address (optional)
- Click Create
# Method 2: Tenant Self-Registration
Tenants can register themselves:
- Go to:
http://localhost:5173/register(dev) orhttps://yourdomain.com/register(prod) - Fill in registration form:
- Password
- First name, Last name
- Company name (tenant name)
- Subdomain (optional)
- Submit registration
Note: After registration, tenant needs to subscribe to a plan to access the system.
# Assigning Plans to Tenants
# Via Admin Panel
- Navigate to Tenants
- Click on a tenant
- Go to Subscription tab
- Click Assign Plan
- Select plan and billing cycle
- Set start/end dates (optional)
- Click Assign
# Via Tenant Purchase
- Tenant logs in
- Navigates to Subscription → Plans
- Selects a plan
- Completes payment (if Stripe configured)
- Plan is automatically assigned
# Managing Subscriptions
# View Subscription Details
- Navigate to Subscriptions
- Click on a subscription
- View:
- Plan details
- Status (ACTIVE, TRIAL, SUSPENDED, etc.)
- Billing cycle
- Payment history
- Subscription logs
# Cancel Subscription
- Navigate to Subscriptions
- Click on subscription
- Click Cancel Subscription
- Choose:
- Cancel immediately
- Cancel at period end
- Confirm cancellation
# Suspend Tenant
- Navigate to Tenants
- Click on tenant
- Click Suspend
- Tenant will lose access until reactivated
# System Settings
# General Settings
- System Name: Name displayed in admin panel
- Default Timezone: IANA timezone (e.g.,
America/New_York) - Default Currency: ISO currency code (e.g.,
USD) - Default Language: Language code (e.g.,
en)
# Google/Firebase Login (Optional)
Enable Google login for tenants:
- Navigate to Settings → System Settings
- Enable Google Login
- Configure Firebase credentials:
- API Key
- Auth Domain
- Project ID
- App ID
- Other Firebase settings
- Save changes
# Troubleshooting
# Can't Login to Admin Panel
Issue: Login fails or redirects
Solutions:
Verify admin user exists:
cd server npx ts-node prisma/create-admin.tsCheck credentials:
- Email:
admin@cloudpos.com(default) - Password:
admin123(default)
- Email:
Reset password (if needed):
- Use Prisma Studio or database directly
- Hash new password with bcrypt
# Admin Panel Shows Blank Page
Issue: Page loads but shows nothing
Solutions:
- Check browser console for errors
- Verify API is running:
http://localhost:3000/api - Check CORS settings in
.env - Clear browser cache
# Can't Create Tenant
Issue: Tenant creation fails
Solutions:
- Check database connection
- Verify subdomain is unique (if using subdomains)
- Check admin permissions
- Review server logs for errors
# Plans Not Showing
Issue: Plans don't appear in admin panel
Solutions:
- Create plans in Admin Panel → Plans
- Activate plans (toggle isActive)
- Check plan limits are configured
- Refresh page
Next: See SaaS Configuration for detailed tenant and plan management.