Admin Setup Guide
Complete guide to setting up and managing the Alzig Flow Pro server.
🛠️ Alzig Flow Pro - Administrator Tutorial
Complete guide for administrators from server setup to user management.
---
📋 Table of Contents
1. [Server Requirements](#server-requirements)
2. [Installation](#installation)
3. [Admin Panel Overview](#admin-panel)
4. [Managing Users](#managing-users)
5. [Managing Licenses](#managing-licenses)
6. [Payment Configuration](#payment-configuration)
7. [Email Configuration](#email-configuration)
8. [System Settings](#system-settings)
9. [Security Monitoring](#security-monitoring)
10. [Maintenance](#maintenance)
---
💻 Server Requirements
Minimum Requirements
| Component | Requirement |
|-----------|-------------|
| PHP | 7.4 or higher |
| MySQL | 5.7 or higher |
| Extensions | curl, mysqli, pdo_mysql, json, mbstring |
Recommended
- PHP 8.0+
- MySQL 8.0+
- SSL certificate (HTTPS)
- 512MB+ RAM
- ✅ PHP version
- ✅ Required extensions
- ✅ Folder permissions
- Name: Your name
- Email: admin@yourdomain.com
- Password: Strong password
- Auto-generated during installation
- Used for API token signing
- Change if compromised
- Failed login attempts
- Multi-device detections
- License tampering attempts
- API abuse
- Server disk space
- Database size
- Error logs
- Documentation: /server/docs/
- API Reference: /server/apiserver/
- Database Schema: /server/database/schema.sql
---
📥 Installation
Step 1: Upload Files
1. Download the server files
2. Upload to your web server (e.g.,
/public_html/extension/)3. Ensure these folders are writable:
-
includes/-
portal/-
admin/Step 2: Run Installation Wizard
1. Open your browser
2. Go to:
https://yourdomain.com/extension/3. You'll be redirected to the installation wizard
Step 3: Requirements Check
The wizard checks:
Click Next if all checks pass.
Step 4: Database Configuration
Enter your database details:
`Host: localhost (or your DB host)
Database: alzig_flow_pro
Username: your_db_user
Password: your_db_password
`Click Test Connection then Next.
Step 5: Admin Account
Create your admin account:
Click Complete Installation.
Step 6: Secure Installation
IMPORTANT: Delete the
install/ folder after installation:`rm -rf /public_html/extension/install/
`---
🎛️ Admin Panel
Access Admin Panel
1. Go to:
https://yourdomain.com/extension/admin/2. Login with admin credentials
Dashboard Overview
| Section | Shows |
|---------|-------|
| Total Users | Number of registered users |
| Active Licenses | Valid licenses |
| Revenue | Total payments received |
| Recent Activity | Latest user actions |
---
👥 Managing Users
View All Users
1. Click Users in sidebar
2. See list of all registered users
User Information
| Field | Description |
|-------|-------------|
| Name | User's display name |
| Email | Login email |
| Status | Active/Inactive |
| Verified | Email verified? |
| Created | Registration date |
User Actions
| Action | What it does |
|--------|--------------|
| View | See full user details |
| Edit | Modify user info |
| Suspend | Disable account |
| Delete | Remove user permanently |
Suspend a User
1. Find the user
2. Click Suspend
3. User can't login or use extension
4. To restore, click Activate
---
🔑 Managing Licenses
View All Licenses
1. Click Licenses in sidebar
2. See all license keys
License Information
| Field | Description |
|-------|-------------|
| License Key | Unique key (ALZ-XXXX-XXXX-XXXX) |
| User | Who owns this license |
| Plan | free/standard/premium |
| Status | active/expired/suspended |
| Daily Limit | Max videos per day |
| Usage Today | Videos used today |
| Valid Until | Expiry date |
Create Manual License
1. Click Create License
2. Select user
3. Choose plan
4. Set validity period
5. Click Create
Upgrade/Downgrade License
1. Find the license
2. Click Edit
3. Change the plan
4. Update daily limit if needed
5. Click Save
Revoke License
1. Find the license
2. Click Suspend
3. User immediately loses access
License Plans
| Plan | Daily Limit | Price |
|------|-------------|-------|
| Free | 2 | ৳0 |
| Standard | 10 | ৳500/month |
| Premium | 100 | ৳2000/month |
---
💳 Payment Configuration
PipraPay Setup
1. Go to Settings
2. Find Payment Settings
3. Enter:
- API Key: Your PipraPay API key
- Store ID: Your store ID
Get PipraPay Credentials
1. Go to https://piprapay.com
2. Create merchant account
3. Complete verification
4. Get API key from dashboard
Webhook Configuration
Set webhook URL in PipraPay:
`https://yourdomain.com/extension/apiserver/webhook/piprapay
`Payment Flow
1. User clicks Upgrade in portal
2. Redirected to PipraPay
3. User pays via bKash/Nagad/Card
4. PipraPay sends webhook
5. License auto-upgrades
6. User gets email confirmation
---
📧 Email Configuration
SMTP Settings
1. Go to Settings
2. Find Email Configuration
3. Enter:
| Setting | Example |
|---------|---------|
| Mail From Name | Alzig Flow Pro |
| Mail From Email | noreply@yourdomain.com |
| SMTP Host | smtp.gmail.com |
| SMTP Port | 587 |
| SMTP Username | your@gmail.com |
| SMTP Password | app-password |
Gmail App Password
1. Enable 2FA on Google account
2. Go to: Security → App Passwords
3. Generate new app password
4. Use that as SMTP Password
Email Types Sent
| Email | When Sent |
|-------|-----------|
| Welcome | After email verification |
| Verification | On registration |
| Password Reset | User requests reset |
| Payment Success | After successful payment |
| Expiry Reminder | 7 days before expiry |
| License Expired | When license expires |
| Daily Limit | When user hits daily limit |
| Multi-Device Alert | Too many devices detected |
Broadcast Emails
1. Go to Broadcast in sidebar
2. Enter:
- Subject
- Title
- Message
- Optional: CTA button
3. Click Send to All Users
---
⚙️ System Settings
Access Settings
1. Click Settings in sidebar
2. Modify values
3. Click Save Settings
Configurable Settings
| Setting | Description | Default |
|---------|-------------|---------|
| Free Daily Limit | Videos for free users | 2 |
| Standard Daily Limit | Videos for standard | 10 |
| Premium Daily Limit | Videos for premium | 100 |
| Max Devices per License | Device limit | 3 |
| License Validity Days | Default validity | 30 |
| Standard Price | Price in BDT | 500 |
| Premium Price | Price in BDT | 2000 |
JWT Secret
---
🔒 Security Monitoring
Security Logs
The system logs:
View Security Events
1. Check
security_logs table in database2. Or create admin page to view
Multi-Device Alerts
When user exceeds device limit:
1. User gets warning email
2. Admin gets notification email
3. Logged in security_logs
Actions for Abuse
| Abuse Type | Action |
|------------|--------|
| License sharing | Suspend license |
| Multiple devices | Warn user |
| API abuse | Block IP |
| Repeated violations | Delete account |
---
🔧 Maintenance
Backup Database
`bashmysqldump -u username -p database_name > backup_$(date +%Y%m%d).sql
`Update Server Files
1. Backup current files
2. Upload new files (except config.php)
3. Run any database migrations
Clear Expired Data
`sql-- Delete old activity logs (older than 90 days)
DELETE FROM user_activity WHERE created_at < DATE_SUB(NOW(), INTERVAL 90 DAY);
-- Delete old security logs (older than 30 days)
DELETE FROM security_logs WHERE created_at < DATE_SUB(NOW(), INTERVAL 30 DAY);
`Monitor Usage
Check daily:
Reset Daily Usage (Automatic)
The system auto-resets
usage_today at midnight.If not working, check cron or add:
`sqlUPDATE licenses SET usage_today = 0, last_usage_reset = CURDATE()
WHERE last_usage_reset < CURDATE();
`---
📊 Database Tables Reference
| Table | Purpose |
|-------|---------|
|
users | User accounts ||
licenses | License keys & limits ||
payments | Payment records ||
admins | Admin accounts ||
settings | System settings ||
user_settings | Per-user cloud settings ||
user_devices | Device tracking ||
user_activity | Activity history ||
user_youtube_accounts | YouTube integrations ||
security_logs | Security events |---
🆘 Troubleshooting
| Problem | Solution |
|---------|----------|
| Install wizard won't start | Check folder permissions |
| Database connection fails | Verify credentials |
| Emails not sending | Check SMTP settings |
| Payments not processing | Verify PipraPay webhook URL |
| Users can't login | Check email verification |
| Extension not validating | Check API URL in extension |
---