Version 1.1.0
Copyright Β© 2025 Wigley Studios LLC
Welcome to Bravura Admin Pro! This guide will help you get started with your production-ready licensing infrastructure.
---
Bravura Admin Pro is a complete, production-ready licensing infrastructure that includes:
β Beautiful Admin Panel - Manage licenses, customers, and subscriptions
β Customer Self-Service Portal - Let customers manage their own licenses
β Stripe Integration - Accept payments and manage subscriptions
β Email Automation - Automatic license delivery and notifications
β System Health Monitoring - Real-time diagnostics and performance tracking
β Audit Logging - Complete activity tracking for compliance
β Version Management - Control software releases and downloads
This is not a framework or libraryβit's a complete web application ready to deploy.
---
Your purchase includes:
bravura-admin-pro/
βββ admin_panel/ # Admin dashboard (web interface)
βββ core/ # Core business logic
β βββ auth.py # Authentication & JWT
β βββ database.py # Database connection
β βββ email_service.py # Email automation
β βββ licensing_service.py # License management
β βββ models.py # Database models
β βββ schemas.py # API schemas
βββ database/
β βββ migrations/ # Database setup scripts
βββ deployment/ # Server configuration files
βββ docs/ # This documentation
βββ examples/ # Sample configuration
βββ main.py # Application entry point
βββ requirements.txt # Python dependencies
βββ .env.example # Configuration template
βββ README.md # Quick reference
---
# Navigate to your Bravura Admin Pro directory
cd bravura-admin-pro
# Install Python dependencies
pip install -r requirements.txt
# Login to MySQL
mysql -u root -p
# Run the setup script
source database/migrations/001_initial_schema.sql
source database/migrations/002_add_license_types.sql
# ... (run all migration files in order)
Or use the consolidated setup script:
mysql -u root -p < database/migrations/complete_setup.sql
# Copy the example environment file
cp .env.example .env
# Edit with your settings
nano .env
Required Configuration:
# Database
DB_HOST=localhost
DB_NAME=bravura_licensing
DB_USER=bravura_api
DB_PASSWORD=your_secure_password_here
# JWT Secret (generate with: python -c "import secrets; print(secrets.token_hex(32))")
JWT_SECRET_KEY=your_secret_key_here
# Admin Password (generate hash with: python -c "import bcrypt; print(bcrypt.hashpw(b'your_password', bcrypt.gensalt()).decode())")
ADMIN_PASS=$2b$12$...
# Stripe
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_PUBLISHABLE_KEY=pk_live_...
# Email
EMAIL_HOST=smtp.yourprovider.com
EMAIL_PORT=587
EMAIL_USER=noreply@yourdomain.com
EMAIL_PASSWORD=your_email_password
EMAIL_FROM=noreply@yourdomain.com
# Development mode (testing)
python main.py
# Production mode (see deployment docs)
gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker
http://localhost:8000/admin/loginadmin and the password you set in .env---
- Standard Edition
- Professional Edition
- Enterprise Edition
- One-time payment (perpetual)
- Monthly subscription (optional)
- Annual subscription (optional)
.env:
# Perpetual License Price IDs
STRIPE_PRICE_STANDARD_PERPETUAL=price_xxx
STRIPE_PRICE_PROFESSIONAL_PERPETUAL=price_xxx
STRIPE_PRICE_ENTERPRISE_PERPETUAL=price_xxx
# Monthly Subscription Price IDs
STRIPE_PRICE_STANDARD_MONTHLY=price_xxx
STRIPE_PRICE_PROFESSIONAL_MONTHLY=price_xxx
STRIPE_PRICE_ENTERPRISE_MONTHLY=price_xxx
# Annual Subscription Price IDs
STRIPE_PRICE_STANDARD_ANNUAL=price_xxx
STRIPE_PRICE_PROFESSIONAL_ANNUAL=price_xxx
STRIPE_PRICE_ENTERPRISE_ANNUAL=price_xxx
https://yourdomain.com/api/webhooks/stripe - payment_intent.succeeded
- charge.refunded
- customer.subscription.created
- customer.subscription.updated
- customer.subscription.deleted
- invoice.payment_succeeded
- invoice.payment_failed
.env:
STRIPE_WEBHOOK_SECRET=whsec_...
---
Edit core/config_base.py:
# Application Branding
app_name: str = "Your App Name"
company_name: str = "Your Company"
logo_url: str = "/static/logo.png"
# Colors (hex codes)
primary_color: str = "#2c3e50"
secondary_color: str = "#0d6efd"
accent_color: str = "#20C6B7"
Email templates are in core/email_service.py. You can customize:
Define your tiers in core/config_base.py:
tier_names: dict = {
"STANDARD": "Starter",
"PROFESSIONAL": "Professional",
"ENTERPRISE": "Enterprise"
}
tier_max_activations: dict = {
"STANDARD": 1,
"PROFESSIONAL": 5,
"ENTERPRISE": -1 # unlimited
}
---
The dashboard shows:
View Licenses: /admin/licenses
Create License: Click "Create License"
Edit License: Click "Edit" on any license
Revoke License: Click "Revoke"
Resend Email: Click "Resend Email"
View Customers: /admin/customers
Customer Details: Click on any customer
Audit Logs: /admin/logs
Health Dashboard: /admin/health
Versions: /admin/versions
---
Your customers can access their portal at: https://yourdomain.com/subscription-portal
Login Options:
Self-Service:
Customers receive a password setup link in their welcome email. They can also:
---
secrets.token_hex(32)
# Security
HASH_ROUNDS=12 # bcrypt rounds
MAX_LOGIN_ATTEMPTS=5
LOCKOUT_DURATION_MINUTES=30
# CORS (adjust for your domains)
ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
# Rate Limiting
API_RATE_PER_MIN=60
API_RATE_BURST=10
---
# Update system
sudo apt update && sudo apt upgrade -y
# Install dependencies
sudo apt install python3.10 python3-pip mysql-server nginx certbot -y
# Copy nginx configuration
sudo cp deployment/nginx_template.conf /etc/nginx/sites-available/bravura
sudo ln -s /etc/nginx/sites-available/bravura /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
# Copy service file
sudo cp deployment/systemd_template.service /etc/systemd/system/bravura.service
sudo systemctl enable bravura
sudo systemctl start bravura
# Get Let's Encrypt certificate
sudo certbot --nginx -d yourdomain.com
sudo ufw allow 'Nginx Full'
sudo ufw enable
Complete deployment instructions: See INSTALLATION_GUIDE.md
---
Database Connection Errors
Error: Can't connect to MySQL server
Solution: Check database credentials in .env and ensure MySQL is running
Stripe Webhook Failures
Error: Webhook signature verification failed
Solution: Verify STRIPE_WEBHOOK_SECRET matches Stripe dashboard
Email Not Sending
Error: SMTP authentication failed
Solution: Check email credentials and ensure SMTP port is correct
License Validation Fails
Error: Invalid license key
Solution: Check license status in admin panel, verify database connection
Enable debug mode for detailed error messages:
DEBUG=true
ENVIRONMENT=development
β οΈ Never enable debug mode in production!
Check application logs:
# View real-time logs
tail -f /opt/bravura/logs/api.log
# View systemd service logs
sudo journalctl -u bravura -f
---
Product: Bravura Admin Pro
Tier: [Your Tier - Starter/Professional/Enterprise]
License Key: [Your License Key]
Support Period: [Your Support Period]
---
.envPlease provide:
---
Now that you have Admin Pro installed:
---
Congratulations on your purchase of Bravura Admin Pro!
We're excited to see what you build with it. If you have any questions or need help, don't hesitate to reach out to our support team.
Happy Building!
The Wigley Studios Team
---
Bravura Admin Pro v1.0.0
Copyright Β© 2025 Wigley Studios LLC. All rights reserved.