A full-featured OnlyFans clone Β· Content subscriptions Β· PPV messaging Β· Live tipping Β· Shop Β· PWA
- Overview
- Live Demo
- Features
- Tech Stack
- Architecture
- Project Structure
- Database Schema
- Installation
- Environment Configuration
- Payment Integration
- Media Storage
- PWA Support
- Localization
- Creator Earnings Model
- Screenshots
- Contributing
MoonFansPro is a production-ready, white-label creator monetization platform β a fully functional OnlyFans-style clone built on the Laravel + MySQL stack. It allows content creators to monetize their work through subscriptions, pay-per-view posts, tips, and a digital shop, while giving fans an immersive browsing and messaging experience.
It ships as a Progressive Web App (PWA), supports multi-language (English, Spanish, Persian), and integrates with Stripe for payment processing and AWS S3 for scalable media storage.
π― Perfect for launching your own creator economy platform β fully customizable, self-hosted, and white-label ready.
| URL | Description |
|---|---|
| moonfanspro.goodcoderz.com | Full live platform demo |
| /creators | Browse creator profiles |
| /shop | Digital product shop |
| /signup | Register as a creator or fan |
- Creator profiles with custom bios, cover images, and avatar
- Subscription tiers β set a monthly subscription price or offer free access
- Post types β photos, videos, text posts, and audio
- Pay-Per-View (PPV) β lock individual posts behind a one-time payment
- Stories β ephemeral content visible to subscribers
- Digital Shop β sell physical or digital products directly from your profile
- Live earnings dashboard β real-time revenue tracking and payout management
- Earnings simulator β estimate monthly income based on follower count and subscription price
- Referral system β earn commissions by referring new creators
- Subscription management β subscribe/unsubscribe from creators
- Direct messaging β chat with creators including PPV message unlocks
- Tipping β send tips to creators on posts and in messages
- Bookmarks & likes β save and interact with content
- Discovery β browse creators by category (Animation, Art, Design, Developer, and more)
- Two-factor authentication (2FA) β email-based OTP on login
- Admin dashboard β manage users, creators, payouts, and reported content
- Platform fee β configurable percentage cut (default 5%) on all transactions
- Multi-language support β English, EspaΓ±ol, Persian (RTL ready)
- Blog system β built-in CMS for platform news and articles
- Static pages β Terms, Privacy, About, How It Works, Cookies Policy
- Cookie consent β GDPR-compliant cookie banner
- PWA β installable web app with offline caching
- SEO-ready β clean URLs, meta tags, sitemap support
| Layer | Technology | Purpose |
|---|---|---|
| Backend | PHP 8.x | Core language |
| Framework | Laravel 10.x | MVC framework, routing, ORM, queues |
| Database | MySQL 8.0 | Relational data store |
| ORM | Eloquent (Laravel) | Model relationships, migrations |
| Frontend | Bootstrap 5.x | Responsive UI grid and components |
| JS Layer | jQuery 3.x | DOM manipulation, AJAX calls |
| Templating | Blade (Laravel) | Server-side view rendering |
| Payments | Stripe (Checkout + Connect) | Subscriptions, PPV, tips, payouts |
| Media Storage | AWS S3 | Scalable image and video storage |
| Auth | Laravel Breeze / Sanctum | Session auth, 2FA via email OTP |
| Queue / Jobs | Laravel Queues | Async notifications, email dispatch |
| PWA | Web App Manifest + Service Worker | Installable mobile-first experience |
| SMTP / Mailgun | Transactional email delivery | |
| Server | Nginx / Apache | Web server |
| OS | Ubuntu 22.04 LTS | Recommended deployment OS |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Layer β
β Browser / PWA ββ Bootstrap 5 + jQuery 3 β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β HTTP / HTTPS
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β Web Server (Nginx) β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββ
β Laravel Application (PHP 8.x) β
β β
β ββββββββββββ ββββββββββββ ββββββββββββ βββββββββββββ β
β β Routes β βControllersβ β Models β β Blade β β
β β web.php ββ β Creator ββ βEloquent β β Views β β
β β api.php β β Post β β ORM β βTemplates β β
β ββββββββββββ β Payment β ββββββ¬ββββββ βββββββββββββ β
β β Auth β β β
β ββββββββββββ β β
βββββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββΌβββββββββββββββββββββββ
β β β
βββββββββββΌβββββββ ββββββββββββΌβββββββ ββββββββββββΌβββββββ
β MySQL 8.0 β β AWS S3 β β Stripe API β
β Relational DB β β Media Storage β β Payments & β
β (Users, Posts β β (Images, Videos β β Connect Payouts β
β Subs, Orders) β β Audio files) β β β
ββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
moonfanspro/
βββ app/
β βββ Http/
β β βββ Controllers/
β β β βββ Auth/ # Login, register, 2FA, password reset
β β β βββ CreatorController.php # Creator profile, settings, earnings
β β β βββ PostController.php # Post CRUD, PPV locking, media upload
β β β βββ SubscriptionController.php # Subscribe/unsubscribe, billing
β β β βββ MessageController.php # DM threads, PPV message unlock
β β β βββ PaymentController.php # Stripe webhooks, tip processing
β β β βββ ShopController.php # Product listings, orders
β β β βββ AdminController.php # Admin panel, user management
β β β βββ PageController.php # Static pages, blog
β β βββ Middleware/
β β βββ CreatorMiddleware.php # Restrict routes to creators
β β βββ AdminMiddleware.php # Restrict routes to admins
β βββ Models/
β β βββ User.php # Users (fans & creators)
β β βββ Post.php # Posts (photo/video/text/audio)
β β βββ Subscription.php # Fan β Creator subscriptions
β β βββ Message.php # DM messages
β β βββ Tip.php # Tips on posts and in DMs
β β βββ Order.php # Shop orders
β β βββ Product.php # Shop products
β β βββ Story.php # 24h ephemeral stories
β β βββ Payout.php # Creator payout records
β β βββ Bookmark.php # Fan bookmarks
β βββ Services/
β βββ StripeService.php # Stripe API abstraction
β βββ MediaService.php # S3 upload/delete helpers
β βββ EarningsService.php # Revenue calculation logic
β
βββ database/
β βββ migrations/ # All table migrations
β βββ seeders/ # Demo data seeders
β
βββ resources/
β βββ views/
β β βββ layouts/ # app.blade.php, admin.blade.php
β β βββ auth/ # Login, register, 2FA views
β β βββ creator/ # Profile, dashboard, settings
β β βββ post/ # Feed, single post, create post
β β βββ messages/ # DM inbox and thread views
β β βββ shop/ # Product list and checkout
β β βββ admin/ # Admin panel views
β β βββ pages/ # Terms, Privacy, Blog, etc.
β βββ lang/
β β βββ en/ # English strings
β β βββ es/ # Spanish strings
β β βββ pe/ # Persian strings (RTL)
β βββ js/
β βββ app.js # Main JS entrypoint
β βββ service-worker.js # PWA offline caching
β
βββ public/
β βββ img/ # Logo, home illustrations
β βββ uploads/ # Local upload fallback
β βββ manifest.json # PWA manifest
β βββ index.php
β
βββ routes/
β βββ web.php # Web routes (authenticated + public)
β βββ api.php # API routes (future mobile app)
β
βββ config/
β βββ filesystems.php # S3 disk configuration
β βββ services.php # Stripe keys configuration
β βββ app.php # App locale, timezone
β
βββ .env.example # Environment variable template
βββ composer.json
βββ package.json
βββ README.md
-- Users table (fans and creators share this table)
CREATE TABLE users (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
username VARCHAR(100) UNIQUE NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
role ENUM('user','creator','admin') DEFAULT 'user',
bio TEXT,
avatar VARCHAR(500),
cover_image VARCHAR(500),
subscription_price DECIMAL(8,2) DEFAULT 0.00,
is_verified BOOLEAN DEFAULT FALSE,
two_fa_enabled BOOLEAN DEFAULT FALSE,
stripe_account_id VARCHAR(255),
created_at TIMESTAMP,
updated_at TIMESTAMP
);
-- Posts table
CREATE TABLE posts (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
user_id BIGINT UNSIGNED NOT NULL REFERENCES users(id),
type ENUM('photo','video','text','audio') NOT NULL,
body TEXT,
media_url VARCHAR(500),
is_ppv BOOLEAN DEFAULT FALSE,
ppv_price DECIMAL(8,2) DEFAULT 0.00,
likes_count INT DEFAULT 0,
created_at TIMESTAMP,
updated_at TIMESTAMP
);
-- Subscriptions table
CREATE TABLE subscriptions (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
fan_id BIGINT UNSIGNED NOT NULL REFERENCES users(id),
creator_id BIGINT UNSIGNED NOT NULL REFERENCES users(id),
stripe_sub_id VARCHAR(255),
status ENUM('active','cancelled','past_due') DEFAULT 'active',
current_period_end TIMESTAMP,
created_at TIMESTAMP,
updated_at TIMESTAMP
);
-- Messages table
CREATE TABLE messages (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
sender_id BIGINT UNSIGNED NOT NULL REFERENCES users(id),
receiver_id BIGINT UNSIGNED NOT NULL REFERENCES users(id),
body TEXT,
media_url VARCHAR(500),
is_ppv BOOLEAN DEFAULT FALSE,
ppv_price DECIMAL(8,2) DEFAULT 0.00,
is_read BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP
);
-- Tips table
CREATE TABLE tips (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
fan_id BIGINT UNSIGNED NOT NULL REFERENCES users(id),
creator_id BIGINT UNSIGNED NOT NULL REFERENCES users(id),
post_id BIGINT UNSIGNED REFERENCES posts(id),
message_id BIGINT UNSIGNED REFERENCES messages(id),
amount DECIMAL(8,2) NOT NULL,
stripe_charge_id VARCHAR(255),
created_at TIMESTAMP
);
-- Products (Shop) table
CREATE TABLE products (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
creator_id BIGINT UNSIGNED NOT NULL REFERENCES users(id),
name VARCHAR(255) NOT NULL,
description TEXT,
price DECIMAL(8,2) NOT NULL,
media_url VARCHAR(500),
stock INT DEFAULT NULL,
created_at TIMESTAMP,
updated_at TIMESTAMP
);- PHP >= 8.1
- Composer
- Node.js >= 18 & npm
- MySQL 8.0
- An AWS account (S3 bucket)
- A Stripe account
# 1. Clone the repository
git clone https://github.com/your-username/moonfanspro.git
cd moonfanspro
# 2. Install PHP dependencies
composer install
# 3. Install JS dependencies
npm install && npm run build
# 4. Copy and configure environment
cp .env.example .env
php artisan key:generate
# 5. Set up the database
php artisan migrate --seed
# 6. Create storage symlink
php artisan storage:link
# 7. Start the development server
php artisan serveVisit http://localhost:8000 in your browser.
APP_NAME=MoonFansPro
APP_ENV=production
APP_URL=https://yourdomain.com
APP_LOCALE=en
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=moonfanspro
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password
# AWS S3 β Media storage
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=your-bucket-name
# Stripe β Payments
STRIPE_KEY=pk_live_...
STRIPE_SECRET=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Platform fee (percentage taken from creator earnings)
PLATFORM_FEE_PERCENT=5
# Mail
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailgun.org
MAIL_PORT=587
MAIL_USERNAME=your_mail_user
MAIL_PASSWORD=your_mail_password
MAIL_FROM_ADDRESS=hello@yourdomain.com
MAIL_FROM_NAME="MoonFansPro"MoonFansPro uses Stripe for all monetary flows:
| Flow | Stripe Feature Used |
|---|---|
| Monthly subscriptions | Stripe Billing (Subscriptions API) |
| Pay-per-view posts | Stripe Checkout / Payment Intents |
| Tips on posts & DMs | Stripe Payment Intents |
| Shop purchases | Stripe Checkout |
| Creator payouts | Stripe Connect (Express accounts) |
customer.subscription.created
customer.subscription.updated
customer.subscription.deleted
invoice.payment_succeeded
invoice.payment_failed
payment_intent.succeeded
account.updated β Creator Connect onboarding
Configure your webhook endpoint in Stripe Dashboard to point to:
https://yourdomain.com/webhook/stripe
All user-uploaded content (profile avatars, cover images, post photos/videos, product images) is stored on AWS S3.
The MediaService handles:
- Streaming uploads directly to S3
- Generating signed URLs for private/PPV content
- Deleting media when posts or accounts are removed
Configure your S3 bucket with the following CORS policy:
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "PUT", "POST", "DELETE"],
"AllowedOrigins": ["https://yourdomain.com"],
"ExposeHeaders": ["ETag"]
}
]MoonFansPro ships as a Progressive Web App. Users on Chrome/Safari will be prompted to install it to their home screen.
Key files:
public/manifest.jsonβ App name, icons, theme color, display modepublic/js/service-worker.jsβ Offline caching strategy (cache-first for static assets, network-first for API)
The platform supports 3 languages out of the box, switchable from any page via the footer language picker:
| Code | Language |
|---|---|
en |
English (default) |
es |
EspaΓ±ol |
pe |
Persian (RTL layout) |
Translation strings live in resources/lang/{code}/. To add a new language, create a new folder matching the ISO code and translate the string files.
Fan pays $10/month subscription
ββ Stripe fee: ~$0.59 (2.9% + $0.30)
ββ Platform fee: $0.47 (5% of net)
ββ Creator receives: ~$8.94
The earnings simulator on the homepage lets prospective creators estimate income:
Estimated monthly earnings = (followers Γ 0.05 Γ subscription_price) Γ (1 - platform_fee)
| Page | Preview |
|---|
| Homepage | moonfanspro.goodcoderz.com
| Creator Discovery | /creators |
| Shop | /shop |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch:
git checkout -b feature/your-feature-name - Commit your changes:
git commit -m 'Add: your feature description' - Push to the branch:
git push origin feature/your-feature-name - Open a Pull Request
Please make sure your code follows PSR-12 coding standards and includes relevant tests where applicable.
Built with β€οΈ Β· Live Demo Β· Report an Issue