๐ฌ Bouflix โ Movies & TV Shows
A premium, full-stack streaming platform with an Android app and a powerful admin panel.
What's Included
๐ฑ Android App
Beautiful Jetpack Compose UI with built-in mpv player, subtitle support, background playback, PiP mode, multi-language (EN/AR), Google Sign-In, and subscription billing.
๐ฅ๏ธ Admin Panel
Full dashboard to manage movies, TV shows, episodes, streaming sources, slideshows, users, subscriptions, ads, and all app settings โ powered by Next.js + Prisma + MySQL.
๐ License Protection
Built-in CodeCanyon license verification system with multi-layer protection (server-side + encrypted device storage).
๐ฐ Monetization Ready
AdMob, AppLovin MAX, Meta Audience Network, Stripe checkout, and Google Play Billing โ all configurable from the dashboard.
Features
Requirements
Admin Panel (Server)
| Requirement | Details |
|---|---|
| Node.js | v18+ (recommended v20 LTS) |
| MySQL | 8.0+ or MariaDB 10.5+ |
| RAM | Minimum 1 GB (2 GB recommended) |
| Disk | 500 MB+ free space |
| OS | Ubuntu 20.04+, CentOS 7+, or any cPanel hosting with Node.js |
Android App (Development)
| Requirement | Details |
|---|---|
| Android Studio | Latest stable (Ladybug or newer) |
| JDK | 17 |
| Compile SDK | 35 (Android 15) |
| Min SDK | 26 (Android 8.0) |
| Gradle | AGP 9.0+ |
Accounts Needed
| Service | Why | Link |
|---|---|---|
| TMDB | Movie & TV database API | Get API Key |
| Firebase | Google Sign-In & Auth | Firebase Console |
| Stripe | Web subscriptions (optional) | Stripe Dashboard |
| Google Play Console | Publish app + in-app billing | Play Console |
| AdMob | Ads monetization (optional) | AdMob |
Admin Panel โ Database Setup
Option A: cPanel (Shared Hosting)
Create MySQL Database
In cPanel โ MySQLยฎ Databases โ create a new database (e.g. bouflix).
Create Database User
Create a user with a strong password and grant ALL PRIVILEGES on the database.
Note Your Credentials
Host: localhost
Database: your_cpanel_user_bouflix
Username: your_cpanel_user_dbuser
Password: your_password
Port: 3306
Option B: VPS / Dedicated Server
Install MySQL
sudo apt update
sudo apt install mysql-server -y
sudo mysql_secure_installationCreate Database & User
sudo mysql -u root -p
CREATE DATABASE bouflix CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'bouflix_user'@'localhost' IDENTIFIED BY 'StrongP@ssw0rd';
GRANT ALL PRIVILEGES ON bouflix.* TO 'bouflix_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;Admin Panel โ Environment Configuration
.env file publicly. It contains sensitive credentials.Rename .env.example to .env in the Admin Panel root, then fill in each variable:
| Variable | Description | Example |
|---|---|---|
DATABASE_URL | MySQL connection string | mysql://user:pass@localhost:3306/bouflix |
JWT_SECRET | Random 32+ char string for auth tokens | my-super-secret-random-string-here-123 |
JWT_EXPIRES_IN | Access token lifetime | 7d |
JWT_REFRESH_EXPIRES_IN | Refresh token lifetime | 30d |
TMDB_API_KEY | Your TMDB API key | 55bd1c1e128ecf... |
TMDB_BASE_URL | TMDB API base (don't change) | https://api.themoviedb.org/3 |
TMDB_IMAGE_BASE_URL | TMDB images (don't change) | https://image.tmdb.org/t/p |
SUPER_ADMIN_EMAIL | Email auto-promoted to superadmin | admin@yoursite.com |
STRIPE_SECRET_KEY | Stripe secret key (optional) | sk_live_... or sk_test_... |
NEXT_PUBLIC_BASE_URL | Public URL of your panel | https://panel.yoursite.com |
V1_HMAC_SECRET | HMAC key for API signing (generate random 64-char hex) | be44ce8449b504... |
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"Admin Panel โ Deploy on cPanel
Part 1 โ Extract the ZIP
Extract the downloaded ZIP
Right-click the Bouflix ZIP file and click Extract Here (or Extract filesโฆ). You'll get a folder containing WebPanel inside.

Part 2 โ Upload to cPanel File Manager
Open File Manager
In cPanel, click File Manager to open the file browser.

Create a new folder
Click + Folder to create a new directory for the panel.

Name the folder
Enter the folder name (e.g. bouflix) and click Create New Folder.

Enter the new folder
Double-click the folder to open it.

Upload the WebPanel ZIP
Click the Upload button in the top toolbar.

Drag & drop the WebPanel ZIP
Before uploading, compress the WebPanel folder on your PC into a ZIP file (right-click โ Send to โ Compressed folder, or use 7-Zip/WinRAR). Then drag and drop the ZIP into the upload area.

Go back when upload is complete
Wait for the upload to finish, then click the back link to return to the folder.

Extract the WebPanel ZIP
Right-click the uploaded ZIP file and click Extract. This will extract all files into the current directory.

Part 3 โ Create MySQL Database
Open MySQL Databases
Go back to cPanel home and click MySQLยฎ Databases (or Manage My Databases).

Create a new database
Enter a database name (e.g. bouflix_db) and click Create Database.

Create a database user
Scroll down and create a new MySQL user with a strong password.

Add user to database
Link the user to the database you just created.

Grant ALL PRIVILEGES
Check ALL PRIVILEGES and click Make Changes.

Part 4 โ Setup Node.js Application
Open Node.js App Manager
Go back to cPanel home โ click Setup Node.js App.

Create Application
Click CREATE APPLICATION.

Fill out the form
Configure the application with these settings:
- Node.js version: 18 or higher
- Application mode: Production
- Application root: path to your WebPanel folder (e.g.
bouflix/WebPanel) - Application URL: your domain/subdomain
- Application startup file:
app.js
Click CREATE.

Run NPM Install
After creating the application, click Run NPM Install and wait for the dependencies to install.

Part 5 โ Run the Setup Wizard
Open your panel URL
Open the application URL in your browser. You'll be automatically redirected to the Setup Wizard.

Fill the database form & Install
Enter your MySQL credentials from Part 3 and set your admin email/password, then click Install Bouflix.
- Host: localhost
- Port: 3306
- Database Name: your database name
- Database Username: your database user
- Database Password: your database password
- Admin Email: your admin email
- Admin Password: your desired password

Part 6 โ Login & Activate License
Sign in
After the automatic restart, you'll see the login page. Sign in with the admin email and password you created in Step 20.

Enter your license & package name
After login, you'll be redirected to the License Activation page. Enter:
- Envato Purchase Code: Your CodeCanyon purchase code (find it in CodeCanyon โ Downloads โ License certificate)
- Android Package Name: Your app's package name from
build.gradle.kts(e.g.com.bouflix.app)
Click Activate License.

Done! ๐
You're now in the Bouflix Admin Panel dashboard. Your panel is fully set up and ready to use!

Admin Panel โ Deploy on VPS
Install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
node -v # should show v20.xUpload & Install
# Upload files via SCP/SFTP to /var/www/bouflix-panel
cd /var/www/bouflix-panel
npm installConfigure .env & Setup DB
cp .env.example .env
nano .env # Fill in your credentials
npm run setup
npm run create-adminBuild Production
npm run buildInstall PM2 & Start
sudo npm install -g pm2
pm2 start app.js --name bouflix-panel
pm2 save
pm2 startup # auto-start on rebootNginx Reverse Proxy
sudo nano /etc/nginx/sites-available/bouflix
# Paste this config:
server {
listen 80;
server_name panel.yoursite.com;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_cache_bypass $http_upgrade;
}
}
sudo ln -s /etc/nginx/sites-available/bouflix /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxSSL Certificate (Let's Encrypt)
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d panel.yoursite.comAdmin Panel โ Deploy on Vercel
Push to Git
Push the Admin Panel to a GitHub/GitLab repository (exclude node_modules, .next, .env).
Import on Vercel
Go to vercel.com/new โ Import your repo โ Select the Admin Panel directory as root.
Environment Variables
In Vercel project settings โ Environment Variables, add all variables from the .env configuration section.
Deploy
Vercel builds automatically. After deployment, run the setup commands via Vercel CLI or connect to your DB manually and run:
npx prisma db push --accept-data-loss
node create-admin.jsAdmin Panel โ First Run
Open your panel URL
Navigate to your panel URL in a browser. The Setup Wizard will appear automatically if the database hasn't been configured yet.
Database & Admin Setup
The wizard will ask for your MySQL credentials and let you create an admin account โ all from the browser. No SSH or terminal needed.
Login & Activate License
After setup, log in with your admin credentials. You'll be prompted to enter your CodeCanyon purchase code and Android package name to activate the license.
Post-Deploy Checklist
- โ Go to Settings โ API Keys and add your TMDB API key
- โ Add your first movie or TV show from Content
- โ Configure Slideshow for the app home screen
- โ Set up Embed Sources for streaming
- โ Configure V1_HMAC_SECRET in Settings for mobile app API security
Android App โ Prerequisites
| Tool | Version | Download |
|---|---|---|
| Android Studio | Latest stable | Download |
| JDK | 17 | Bundled with Android Studio |
| Android SDK | API 35 | SDK Manager in Android Studio |
Open the Project
Open the bouflix-Android Source folder in Android Studio. Wait for Gradle sync to complete.
Gradle Sync
If prompted, accept SDK licenses. Let Android Studio download all dependencies (first time may take 5-10 minutes).
Android App โ Change Package Name
com.bouflix.app is a placeholder.Open build.gradle.kts
In Android Studio, open app/build.gradle.kts. You'll see the default package name com.bouflix.app in both the namespace and applicationId fields.
Rename the package folder
In the Project panel (left side), expand app โ src โ main โ java โ com. Right-click the bouflix folder โ Refactor โ Rename.

Enter the new name
In the Rename dialog, type your new company/app name (e.g. bouflix1, netfinity, etc.). Make sure "Search for text occurrences" is checked, then click Refactor.

Review and apply refactoring
Android Studio will show a Refactoring Preview with all affected files (imports, package declarations, references, etc.). Review the changes, then click Do Refactor.

Update namespace & applicationId
After the refactor, open app/build.gradle.kts and verify that both values match your new package name:
android {
namespace = "com.yourcompany.app" // โ Must match your new package
...
defaultConfig {
applicationId = "com.yourcompany.app" // โ Must match your new package
...
}
}
If Android Studio didn't update them automatically, change them manually.

Set your Admin Panel URL
In the same build.gradle.kts file, scroll down to the Buyer Configuration section and set ADMIN_PANEL_URL to your deployed admin panel URL:
buildConfigField("String", "ADMIN_PANEL_URL", "\"https://your-panel-url.com/\"")
https:// and ends with a trailing slash /.
Update google-services.json & Rebuild
You must re-download google-services.json from Firebase after changing the package name (see Firebase Setup section).
Then rebuild the project:
Build โ Clean Project
Build โ Rebuild Project
Android App โ Firebase Setup
Create Firebase Project
Go to Firebase Console โ Add Project โ Name it (e.g., "MyStreamApp").
Add Android App
Click Add App โ Android. Enter your new package name (e.g., com.yourcompany.yourapp).
SHA-1 Certificate
Required for Google Sign-In. Get it from Android Studio:
Gradle panel (right side) โ app โ Tasks โ android โ signingReport
Copy the SHA-1 value and paste it in Firebase.
Download google-services.json
Download the file and replace the existing one at:
app/google-services.jsonEnable Authentication
In Firebase Console โ Authentication โ Sign-in method:
- Enable Email/Password
- Enable Google (add your Web Client ID)
Android App โ Connect to Admin Panel
The ADMIN_PANEL_URL is configured in Step 6 of the Change Package Name section. Make sure your URL is correct and accessible via HTTPS before building the app.
Android App โ App Icon & Splash
Change App Name
Open app/src/main/res/values/strings.xml and change:
<string name="app_name">YourAppName</string>Replace App Icon
Right-click res โ New โ Image Asset. Select your icon image (512ร512 recommended). Android Studio generates all density variants automatically.
Splash Screen
The splash uses Android 12+ Splash API. Customize in res/values/themes.xml under Theme.Bouflix: change windowSplashScreenBackground and windowSplashScreenAnimatedIcon.
Android App โ Ads Configuration
AdMob App ID
The only thing you need to update in the app code is the AdMob App ID in AndroidManifest.xml:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-XXXXXXXXXXXXXXXX~XXXXXXXXXX" />
Replace with your real AdMob App ID from admob.google.com.
Configure in Dashboard
Go to Admin Panel โ Settings โ Ads to set up:
- Banner, Interstitial, Rewarded ad unit IDs
- AppLovin MAX SDK Key & Unit IDs
- Meta Audience Network Placement IDs
- Ad frequency and placement rules
Android App โ Google Play Billing
Create Subscriptions in Play Console
In Google Play Console โ Your App โ Monetize โ Products โ Subscriptions. Create your plans (e.g., monthly, yearly) matching the plan IDs configured in the Admin Panel.
Configure in Admin Panel
Go to Settings โ Subscriptions in the admin dashboard and set up matching plan IDs, prices, and features.
Android App โ Build APK / AAB
Debug APK (Testing)
In Android Studio: Build โ Build Bundle(s) / APK(s) โ Build APK(s)
Output: app/build/outputs/apk/debug/app-debug.apk
Signed Release APK/AAB (Production)
Generate Signing Key
In Android Studio: Build โ Generate Signed Bundle / APK โ Create new keystore:
- Choose a safe location for the
.jksfile - Set a strong password
- Fill in the certificate details
Build Release
Select APK or Android App Bundle (AAB) (recommended for Play Store). Choose release build variant.
Output locations:
APK: app/build/outputs/apk/release/app-release.apk
AAB: app/build/outputs/bundle/release/app-release.aabDashboard โ Content Management
Navigate to Content in the sidebar to manage movies and TV shows.
Adding a Movie
Click "Add Movie" โ Search by TMDB title or ID โ Select โ The movie metadata (poster, overview, genres, etc.) is auto-filled from TMDB.
Add Streams โ click the streams tab and add direct video URLs or embed sources with quality/language tags.
Toggle Active to make it visible in the app.
Adding a TV Show
Same as movies, but after adding the show, you can manage Seasons โ Episodes โ Streams per episode.
Dashboard โ Embed Sources
Embed sources are global streaming providers that automatically generate stream URLs for all content using TMDB IDs.
Go to Settings โ Sources
Add a source with:
- Name: Display name
- Movie URL: URL template with
{tmdbId}placeholder - TV URL: URL template with
{tmdbId},{season},{episode}placeholders
Drag & drop to reorder. The app tries sources in order until one works.
Dashboard โ Slideshow
Configure the home screen slideshow/banner from Slideshow in the sidebar.
- Manual mode: Hand-pick movies/shows to feature
- Auto mode: Automatically populate from trending/popular content
- Configure interval, sticky mode, and poster style
Dashboard โ User Management
View and manage registered users from Users:
- View user profiles, subscription status, devices
- Disable/enable accounts
- Assign roles (user, moderator, admin, superadmin)
Dashboard โ Subscriptions
Configure subscription plans from Settings โ Subscriptions:
- Enable/disable subscription system
- Define plans (monthly, yearly, lifetime)
- Set pricing and features per plan
- Manage coupons with discount percentages and expiry
Dashboard โ Ads Settings
All ad configuration is centralized in Settings โ Ads:
- Choose ad provider: AdMob, AppLovin MAX, or Meta
- Set ad unit IDs for each format (banner, interstitial, rewarded)
- Configure ad frequency and placement
- Subscribers can be set to ad-free automatically
Dashboard โ App Settings
Configure app behavior from Settings:
๐ฌ Content
Content mode, maintenance mode, force update
โถ๏ธ Player
Default quality, autoplay, auto-resume
๐ Security
Block VPN, ADB, developer options
๐ Restrictions
Region blocking, auth requirements
๐ Contact
Support email, Telegram link
๐ Legal
Privacy Policy & Terms of Service editor
FAQ & Troubleshooting
Build fails with "Cannot find module '@prisma/client'"
Run npx prisma generate before building. The setup script does this automatically, but if you skipped it, run it manually.
App shows "Connection failed" on launch
Verify that ADMIN_PANEL_URL in build.gradle.kts points to your deployed Admin Panel and the URL is accessible with HTTPS.
Google Sign-In not working
Ensure you added the correct SHA-1 fingerprint in Firebase Console matching your signing key. For debug builds, use the debug SHA-1.
Streams not playing in the app
Check that embed sources are configured in the dashboard and the URLs are valid. Test the source URL directly in a browser first.
Database connection fails on cPanel
cPanel prefixes database names and users. Use the full prefixed name: cpaneluser_dbname and cpaneluser_dbuser.
"Prisma db push" fails with timeout
Your MySQL server may be slow or remote. Add ?connect_timeout=30 to your DATABASE_URL.
How to update the app later?
Replace the source files, keep your .env, google-services.json, and keystore. Run npm install && npm run build for the panel. For the app, just rebuild in Android Studio.
Changelog
v1.0 โ Initial Release
- Full Android app with Jetpack Compose UI
- Admin Panel with Next.js 16 + Prisma + MySQL
- TMDB integration for movies & TV shows
- Multi-language support (English + Arabic)
- Subscription system (Stripe + Google Play Billing)
- Ad monetization (AdMob, AppLovin, Meta)
- Built-in mpv video player with subtitle support
- License protection system
Support
Need Help?
If you have questions or need assistance, please reach out through CodeCanyon comments or our support channels.
๐ง Email: your-support@email.com
๐ฌ Telegram: @yourusername