INTERNAL — DO NOT INDEX

FFM Platform Blueprint

Complete technical reference for FansFollow.me — every URL, every feature, every setting. Share this with your design/development team to ensure nothing is missed.

Platform: Sponzy v7.9.2  |  Framework: Laravel 12.46 / PHP 8.5  |  Database: MySQL 8.4  |  Hosting: Laravel Cloud  |  Updated: August 30, 2026

Table of Contents

1. Infrastructure & Access

Staging Environment
URLhttps://staging.fansfollowme.com
PlatformLaravel Cloud
Environment IDenv-a295cd63-356e-4f25-94f8-0961fd2a539e
R2 Bucketfls-a29b3308-b261-4645-bd9d-d1b983bd9cba
R2 Public URLhttps://fls-a29b3308-b261-4645-bd9d-d1b983bd9cba.laravel.cloud
PHP Version8.5
Laravel Version12.46
MySQL Version8.4
Node Version24
Source Code & Deployment
GitHub RepoFansFollow-me/staging.fansfollowme.com
Branchmain
Auto-DeployOn push to main
Build Commandcomposer install && php fix-laravel-cloud.php && php artisan view:clear
Deploy Scriptbash deploy.sh (migrate, schema fixes, seed, cache clear)
StorageCloudflare R2 (S3 driver)
Users17,546
Posts239

2. Public Pages No Login Required

URLPagePurposeStatus
/HomepageHero section, featured creators, CTA buttons✅ 200
/exploreExploreBrowse all public posts✅ 200
/creatorsCreatorsCreator directory with filters✅ 200
/fansFans MarketingLanding page for fans✅ 200
/celebritiesCelebritiesCelebrity creator showcase✅ 200
/castingCastingCasting call page✅ 200
/businessBusinessBusiness/brand partnerships✅ 200
/for-creatorsFor CreatorsCreator recruitment landing✅ 200
/supportSupportSupport center with contact form✅ 200
/faqFAQFrequently asked questions✅ 200
/contactContactContact form (Usebasin)✅ 200
/blogBlogBlog listing✅ 200
/privacyPrivacy PolicyPrivacy policy page✅ 200
/termsTerms of ServiceTerms page✅ 200
/cookiesCookie PolicyCookie policy page✅ 200
/sitemap.xmlSitemapXML sitemap for search engines✅ 200
/robots.txtRobotsSearch engine crawl rules✅ 200

3. Auth Pages Guest Only

URLPageNotesStatus
/loginLoginAJAX form, supports username or email✅ 200
/signupRegisterFan or Creator registration✅ 200
/password/resetPassword ResetEmail-based password reset✅ 200
/oauth/googleGoogle OAuthSocial login (needs config)
/oauth/facebookFacebook OAuthSocial login (needs config)

4. Profile Pages Public

URL PatternDescriptionFeatures
/{username}User profileAvatar, cover, bio, posts, subscribe button, tip button
/{username}/photosPhoto galleryFiltered photo posts
/{username}/videosVideo galleryFiltered video posts
/{username}/audioAudio galleryFiltered audio posts
/{username}/shopShopCreator's products
/{username}/reelsReelsCreator's short videos
/{username}/post/{id}Single postPost detail view

5. Fan Backend Login Required

URLPageDescriptionStatus
/dashboardDashboardFan home — feed, subscriptions✅ 200
/exploreExploreBrowse creators and posts✅ 200
/notificationsNotificationsActivity notifications✅ 200
/messagesMessagesDirect message inbox✅ 200
/messages/{id}ChatIndividual conversation✅ 200
/settings/pageEdit ProfileName, bio, avatar, cover, categories⚠️ 500
/settings/passwordChange PasswordPassword update form✅ 200
/settings/subscriptionSubscriptionManage subscription settings✅ 200
/privacy/securityPrivacy & Security2FA, sessions, blocked users✅ 200
/my/bookmarksBookmarksSaved posts✅ 200
/my/subscriptionsMy SubscriptionsCreators you follow✅ 200
/my/purchasesMy PurchasesPurchased content✅ 200
/my/walletWalletBalance, add funds✅ 200
/my/likesMy LikesLiked posts✅ 200
/reelsReelsShort-form video feed⚠️ 302
/shopShopBrowse all products✅ 200

6. Creator Backend Login Required

URLPageDescriptionStatus
/dashboardCreator DashboardEarnings chart, stats, quick actions✅ 200
/my/postsMy PostsAll creator posts with stats✅ 200
/my/subscribersMy SubscribersList of paying subscribers✅ 200
/my/productsMy ProductsShop products management✅ 200
/my/salesMy SalesSales history and orders✅ 200
/my/storiesMy StoriesManage 24-hour stories✅ 200
/my/reelsMy ReelsManage short videos✅ 200
/my/vaultMy VaultPrivate file storage⚠️ 500
/settings/pageEdit ProfileCreator profile settings⚠️ 500
/settings/payout/methodPayout MethodBank/PayPal/Stripe payout setup✅ 200
/settings/withdrawalsWithdrawalsRequest withdrawals✅ 200
/my/referralsReferralsReferral links and earnings✅ 200
/settings/subscriptionSubscription SettingsSet subscription price✅ 200
/privacy/securityPrivacy & Security2FA, sessions, blocked users✅ 200
/messagesMessagesDirect messages✅ 200
/notificationsNotificationsActivity notifications✅ 200
/create/storyCreate StoryUpload image/text story✅ 200
/settings/video-callVideo Call SettingsSet pricing for video calls⚠️ 404
/settings/audio-callAudio Call SettingsSet pricing for audio calls⚠️ 404
/create/reelCreate ReelUpload short video
/add/productAdd ProductCreate digital product
/live/{username}Live StreamStart/view live stream

7. Admin Panel Admin Only

All admin pages are under /panel/admin/. Requires admin role.

Settings & Configuration
/panel/adminDashboard
/panel/admin/settingsGeneral Settings
/panel/admin/settings/limitsLimits & Restrictions
/panel/admin/settings/emailEmail/SMTP Settings
/panel/admin/settings/cron-jobCron Job Config
/panel/admin/themeTheme & Colors
/panel/admin/custom-css-jsCustom CSS/JS
/panel/admin/pwaPWA Settings
/panel/admin/websocketsWebSocket Config
/panel/admin/video/encodingVideo Encoding
/panel/admin/storageStorage Settings
/panel/admin/billingBilling Info
/panel/admin/maintenance/modeMaintenance Mode
Users & Content
/panel/admin/membersMembers List
/panel/admin/members/edit/{id}Edit Member
/panel/admin/postsAll Posts
/panel/admin/commentsComments
/panel/admin/repliesReplies
/panel/admin/reelsReels Management
/panel/admin/stories/postsStories
/panel/admin/stories/settingsStories Settings
/panel/admin/stories/backgroundsStory Backgrounds
/panel/admin/stories/fontsStory Fonts
/panel/admin/reportsReports
/panel/admin/verification/membersVerification Requests
/panel/admin/moderation-image-videoContent Moderation
Monetization
/panel/admin/paymentsPayment Settings
/panel/admin/payments/{id}Payment Gateway Config (1-12)
/panel/admin/subscriptionsSubscriptions
/panel/admin/transactionsTransactions
/panel/admin/depositsDeposits
/panel/admin/withdrawalsWithdrawals
/panel/admin/salesSales
/panel/admin/productsProducts
/panel/admin/shopShop Settings
/panel/admin/shop-categoriesShop Categories
/panel/admin/tax-ratesTax Rates
/panel/admin/referralsReferral Settings
/panel/admin/advertisingAdvertising
/panel/admin/giftsGifts Management
Communication & Features
/panel/admin/video-callsVideo Call Settings
/panel/admin/audio-callsAudio Call Settings
/panel/admin/live-streamingLive Streaming Settings
/panel/admin/live-streaming-private-requestsPrivate Live Requests
/panel/admin/messagesMessages Settings
/panel/admin/push-notificationsPush Notifications
/panel/admin/announcementsAnnouncements
/panel/admin/age-verificationAge Verification
/panel/admin/social-loginSocial Login Config
/panel/admin/googleGoogle Settings
/panel/admin/giphy-apiGIPHY Integration
/panel/admin/stickersStickers
/panel/admin/blogBlog Management
/panel/admin/pagesCustom Pages
/panel/admin/categoriesCategories
/panel/admin/languagesLanguages
/panel/admin/countriesCountries
/panel/admin/names-reservedReserved Usernames
/panel/admin/profiles-socialSocial Profiles

8. Feature Inventory

Content & Creator Tools
Reels✅ Enabled
Stories (Image + Text)✅ Enabled
Vault (File Storage)✅ Enabled
Scheduled Posts✅ Enabled
EPUB Files✅ Enabled
ZIP Files✅ Enabled
Watermark✅ Enabled
QR Codes✅ Enabled
Monetization
Subscriptions✅ Enabled
Tips✅ Enabled
Pay-Per-View✅ Enabled
Gifts✅ Enabled
Shop (Digital + Physical)✅ Enabled
Earnings Simulator✅ Enabled
Referral System✅ Enabled
Wallet✅ Enabled
Communication
Video Calls (Agora)✅ Enabled
Audio Calls (Agora)✅ Enabled
Live Streaming✅ Enabled
Private Live Streaming✅ Enabled
Direct Messages✅ Enabled
Welcome Messages✅ Enabled
Push Notifications✅ Enabled
GIFs (GIPHY)✅ Enabled

9. New in Sponzy v7.9.2 Not in Old fansfollow.me

FeatureOld Sponzyv7.9.2FFM Use Case
ReelsWorkout clips, technique demos, fight highlights
Video Calls1-on-1 coaching, VIP sessions
Audio CallsCoaching calls, consultations
Private Live StreamingPaid private training sessions
VaultStore workout plans, meal prep PDFs
GiftsFan engagement, additional revenue
EPUB SupportSell training ebooks
Scheduled PostsContent planning across time zones
Age VerificationLegal compliance (Yoti/Didit)
PWAMobile app-like experience
Push NotificationsRe-engagement
Earnings SimulatorCreator revenue education
Stories (Enhanced)BasicImage + text stories with backgrounds/fonts
Advertising SystemPromoted posts/creators
Role & PermissionsFine-grained admin access control

10. Admin Settings Map

General Settings — All Toggles
SettingCurrentWhat It Does
who_can_see_contentallPublic access to profiles (vs logged-in only)
email_verification✅ OnRequire email verification on signup
account_verification✅ OnAllow creator verification requests
registration_active✅ OnAllow new registrations
show_counter✅ OnShow post/like/view counts
widget_creators_featured✅ OnShow featured creators widget
earnings_simulator✅ OnShow earnings calculator to creators
requests_verify_account✅ OnAllow verification requests
watermark✅ OnAuto-watermark uploaded content
users_can_edit_post✅ OnAllow post editing after publish
referral_system✅ OnEnable referral program
search_creators_genders✅ OnGender filter in creator search
generate_qr_code✅ OnQR code generation for profiles
allow_zip_files✅ OnAllow ZIP file uploads
allow_scheduled_posts✅ OnPost scheduling feature
allow_creators_deactivate_profile✅ OnTemporary profile deactivation
allow_epub_files✅ OnEPUB ebook uploads
gifts✅ OnVirtual gift system
allow_reels✅ OnShort-form video feature
allow_vault✅ OnPrivate file storage
users_can_delete_messages✅ OnAllow message deletion
allow_delete_account✅ OnAllow account deletion
send_welcome_email_new_users✅ OnWelcome email on registration
captcha_contact✅ OnCAPTCHA on contact form
disable_tips❌ OffTips are enabled (off = enabled)
disable_free_post❌ OffFree posts are enabled
disable_explore_section❌ OffExplore is enabled
disable_creators_section❌ OffCreators section is enabled
disable_contact❌ OffContact form is enabled
captcha❌ OffGlobal CAPTCHA (off for testing)
alert_adult❌ OffAdult content warning (not needed)
hide_admin_profile❌ OffAdmin profile visible

11. Payment Gateways

GatewayIDStatusNotes
Stripe1Needs API keysPrimary recommended
PayPal2Needs API keysWide reach
CCBill3Needs API keysAdult-friendly
Paystack4Needs API keysAfrica focus
Instamojo5Needs API keysIndia focus
Flutterwave6Needs API keysAfrica focus
Razorpay7Needs API keysIndia focus
MercadoPago8Needs API keysLatin America
Mollie9Needs API keysEurope focus
Coinbase10Needs API keysCrypto
CoinPayments11Needs API keysCrypto
Cardinity12Needs API keysEurope focus

12. Design Tokens

Colors & Typography
Background#0B0F1A
Card Background#111827
Border#1f2937
Primary/CTA#f97316 (Orange)
Text Primary#e5e7eb
Text Muted#9ca3af
Font FamilyInter, system-ui, sans-serif
Navbar Height72px
ThemeDark (default)
Branding Assets
Logo/fans-foloow-me-logo-final-file--png-version.png
Logo (480px)/fans-foloow-me-logo-final-file--png-version-480.png
Logo (960px)/fans-foloow-me-logo-final-file--png-version-960.png
Logo (1440px)/fans-foloow-me-logo-final-file--png-version-1440.png
Hero Background/ffmherobackground.jpg
Hero Background (1280)/ffmherobackground-1280.jpg
Creators Hero BG/creators-hero-bg.jpg
Favicon/img/favicon.png
Custom CSS/css/ffm-brand.css (53KB)

13. SEO & Tracking

Analytics & Tracking
GA4G-SZRL69LXXS
Microsoft Clarityxk78rrb386
Usebasin (Forms)954d0d6e30da
Conversion Eventssign_up, login, generate_lead
SEO
robots.txt
sitemap.xml
Open Graph Tags
Twitter Cards
Canonical URLs
JSON-LD Schema
Bing Webmaster83E04AABA8CC0BC0618D1849666A133A

14. Database Schema

Key Tables (stg_ prefix)

Users & Auth

  • stg_users — 17,546 records
  • stg_login_sessions
  • stg_password_resets
  • stg_personal_access_tokens

Content

  • stg_updates — 239 posts
  • stg_media — Post media files
  • stg_comments
  • stg_comment_replies
  • stg_reels — Short videos
  • stg_media_reels
  • stg_stories
  • stg_media_stories

Monetization

  • stg_subscriptions
  • stg_transactions
  • stg_deposits
  • stg_withdrawals
  • stg_products
  • stg_sales
  • stg_tips
  • stg_gifts
  • stg_advertising

Communication

  • stg_messages
  • stg_conversations
  • stg_notifications
  • video_calls
  • audio_calls

Categories & Taxonomy

  • stg_categories
  • stg_shop_categories
  • stg_countries
  • stg_states
  • stg_languages

Settings & Config

  • admin_settings — Global settings
  • stg_pages — Custom pages
  • stg_blog
  • stg_stickers
  • stg_gifts
  • vaults — Creator file storage

15. Deployment Pipeline

Git Push (main)
    ↓
Laravel Cloud Auto-Deploy
    ↓
Build: composer install --no-dev && php fix-laravel-cloud.php && php artisan view:clear
    ↓
Deploy: bash deploy.sh
    ├── Create storage directories
    ├── Create public/public symlink
    ├── Run pending migrations (php artisan migrate --force)
    ├── Fix missing database columns (idempotent)
    ├── Create missing tables (video_calls, audio_calls, vaults)
    ├── Seed test accounts (testfan, testcreator)
    ├── Clear caches (config, view, route)
    └── Done
    ↓
Live at https://staging.fansfollowme.com

16. Test Accounts

AccountUsernameRoleFeatures
AdminAdminAdminFull admin panel access
Test FantestfanFan (Normal)Subscribe, tip, message, purchase
Test CreatortestcreatorCreatorPost, sell, receive tips, go live

Password for all: TestPass123!

17. Known Issues

IssuePageStatusRoot Cause
Settings Page 500/settings/page⚠️ InvestigatingCategories model table prefix fix deployed, may need cache clear
Vault 500/my/vault⚠️ Investigatingvaults table created in deploy, may need cache clear
Video/Audio Call 404/settings/video-call⚠️ Config NeededEnabled in admin but needs valid Agora credentials
Reels 302/reels✅ ExpectedNo reels exist yet, redirects to home
Age VerificationAll auth pages✅ DisabledDisabled for testing, enable for production

18. Design Checklist for Martin

Every page below needs a FFM-branded design. Check off as designed:

Public Pages (17)

Backend Pages (Fan + Creator)

Admin Panel (20 key pages)

19. Workflow & Team Collaboration

Bolt.new → Sponzy Conversion Pipeline

Martin is redesigning fansfollowme.com using bolt.new (AI-powered web builder). The output gets converted to Sponzy Blade templates for Laravel Cloud deployment.

Flow: Martin designs in bolt.new → Claude reviews output → Converts to Blade templates → Deploys to staging → Martin reviews → Sign-off

Bolt.new → Sponzy Conversion Guide

For Martin & Bolt.new

  • Use these exact colors: #0B0F1A (bg), #111827 (cards), #f97316 (CTA orange)
  • Use Inter font — matches FFM brand
  • Dark theme onlydata-bs-theme="dark"
  • Bootstrap 5 classes — bolt.new should use Bootstrap, not Tailwind
  • Navbar height: 72px
  • Mobile-first — responsive design is critical
  • No React/Vue — output must be plain HTML/CSS/JS
  • Include all states: empty, loading, error, success
  • Include all roles: logged out, fan, creator, admin

For Claude (Conversion)

  • Wrap in Blade: @extends('layouts.app') + @section('content')
  • Use Sponzy variables: $settings->title, auth()->user(), etc.
  • Use Sponzy routes: url('login'), route('profile', $user)
  • Use Sponzy helpers: Helper::getFile(), __() for translations
  • Preserve Sponzy functionality: AJAX forms, modals, real-time features
  • Test all 3 roles: fan, creator, admin after conversion
  • Run QA tests: bash tests/qa-auth-test.sh

Bolt.new Output Structure (Expected)

bolt-output/
├── index.html          # Homepage design
├── css/
│   └── styles.css      # Custom styles (will merge into ffm-brand.css)
├── js/
│   └── main.js         # Custom JS (will merge into app JS)
└── pages/
    ├── explore.html    # Explore page
    ├── creators.html   # Creators listing
    ├── profile.html    # Profile page
    ├── dashboard.html  # User dashboard
    ├── messages.html   # Messages
    ├── settings.html   # Settings
    └── admin.html      # Admin panel

Conversion Checklist

Suggestions for Bolt.new & Claude

Bolt.new Best Practices

  • Design all 54 pages — use the URL map in Section 2-7 above
  • Include empty states — "No posts yet", "No subscribers", etc.
  • Include error states — 404, 500, network error
  • Include loading states — skeleton screens, spinners
  • Mobile-first — design for phone, then tablet, then desktop
  • Use Bootstrap gridcol-md-6, col-lg-4, etc.
  • Use Bootstrap components — cards, modals, navs, forms
  • Match Sponzy modals — tip, subscribe, report, share
  • Include all form fields — login, signup, settings, post creation
  • Design for dark theme — no light backgrounds

Claude Conversion Best Practices

  • Don't rewrite Sponzy logic — only replace the HTML/CSS layer
  • Preserve AJAX endpoints — Sponzy uses fetch() for forms
  • Preserve modal system — Sponzy has specific modal patterns
  • Preserve notification system — real-time via WebSocket
  • Preserve payment flow — Sponzy handles all payment gateways
  • Use Sponzy's Helper classHelper::getFile(), Helper::userCountry()
  • Use Sponzy's translation system__('general.key')
  • Use Sponzy's settingsconfig('settings.key')
  • Test incrementally — convert one page, test, then next
  • Document changes — note what was converted from bolt.new
Key Constraint: Bolt.new designs the visual layer only. All backend logic (auth, payments, messaging, notifications, file uploads) stays in Sponzy. Claude's job is to merge bolt.new's HTML/CSS into Sponzy's Blade templates without breaking existing functionality.
Who Does What
Martin

Role: Product Owner / Designer

  • ✅ Creates tasks in Highrise
  • ✅ Provides design feedback
  • ✅ Approves/rejects changes
  • ✅ Writes notes and emails (BCC'd to Highrise)
  • ✅ Signs off on features before build
  • ❌ Does NOT write code
  • ❌ Does NOT deploy
Claude (AI)

Role: Developer / QA

  • ✅ Monitors Highrise every 5-30 min
  • ✅ Reads Martin's tasks and feedback
  • ✅ Writes code and fixes bugs
  • ✅ Runs QA tests (automated)
  • ✅ Commits, pushes, deploys
  • ✅ Verifies in browser
  • ✅ Replies to Martin in Highrise
System

Role: Infrastructure

  • GitHub: Source code, version control
  • Laravel Cloud: Hosting, auto-deploy
  • Cloudflare R2: File storage
  • Highrise: Task management
  • GA4/Clarity: Analytics
  • Usebasin: Form handling
Development Workflow
Martin designs in bolt.new (visual design, all 54 pages)
    ↓
Martin creates task in Highrise with bolt.new output
    ↓
Claude monitors Highrise (every 5-30 minutes)
    ↓
Claude reads task, downloads bolt.new output
    ↓
Claude converts bolt.new HTML → Sponzy Blade templates
    ├── Wraps in @extends('layouts.app')
    ├── Replaces static text with Sponzy variables
    ├── Replaces hardcoded URLs with url()/route()
    ├── Merges CSS into ffm-brand.css
    ├── Adds auth checks (@auth/@guest)
    ├── Adds feature flags (config('settings.*'))
    └── Preserves Sponzy AJAX/modal/payment logic
    ↓
Claude runs QA tests (automated browser tests)
    ├── Public pages (17 URLs) — HTTP status + screenshots
    ├── Auth pages (3 URLs) — Login flow verification
    ├── Fan backend (15 URLs) — Logged-in user flow
    ├── Creator backend (19 URLs) — Creator-specific pages
    └── Admin panel (20 URLs) — Admin-only pages
    ↓
Claude commits to GitHub (main branch)
    ↓
Laravel Cloud auto-deploys to staging.fansfollowme.comClaude verifies in browser (screenshots, behavior check)
    ↓
Claude replies to Martin in Highrise with results
    ↓
Martin reviews on staging, approves or requests changes
    ↓
Martin signs off → Feature complete ✅
QA Testing Scripts
ScriptPurposeWhat It TestsOutput
tests/qa-browser-test.sh Public page smoke test All 17 public pages, auth pages, profiles, backend redirects, admin redirects, static assets tests/qa-results.md + screenshots
tests/qa-auth-test.sh Authenticated user flow test Login as testfan/testcreator/Admin, test every backend page with real sessions tests/qa-auth-results.md + screenshots
tests/FFM-FEATURE-AUDIT.md Feature inventory Every Sponzy feature, what's enabled, what it does for FFM Markdown document
Highrise Integration

How Martin Communicates

  • Highrise Tasks: Creates tasks with descriptions, priorities, and deadlines
  • Highrise Notes: Adds feedback and context to existing tasks
  • Emails: BCC'd to Highrise so all communication is tracked
  • Design Sign-off: Martin must approve designs before code changes

How Claude Responds

  • Monitors: Checks Highrise every 5-30 minutes for new tasks/feedback
  • Implements: Reads task, writes code, runs tests
  • Deploys: Pushes to GitHub → auto-deploys to staging
  • Verifies: Tests in browser, takes screenshots
  • Reports: Replies in Highrise with results and screenshots
Important Rule: Claude does NOT touch the site or build anything until Martin provides design sign-off. Martin controls the "what" — Claude handles the "how".

20. Current Status & Next Steps

Completed
Staging environment live and operational
All 17 public pages returning 200
Login/signup/password reset working
Fan backend (13/15 pages) working
Creator backend (16/19 pages) working
Admin panel (20/20 pages) working
All Sponzy v7.9.2 features enabled
GA4, Clarity, Usebasin tracking active
SEO (sitemap, robots, OG tags, JSON-LD)
Automated QA test scripts created
Platform Blueprint page created
Test accounts seeded (testfan, testcreator)
Waiting On
Martin's design sign-off — before any UI/template work
Settings page 500 fix (cache issue)
Vault page 500 fix (table created, needs verification)
Agora API credentials for video/audio calls
Payment gateway API keys (Stripe, PayPal, etc.)
SMTP/email configuration
Age verification decision (enable for production?)
Content seeding (sample posts, reels, products)

21. Full Technical Documentation For Claude / Developers

Complete source documentation. Click each section to expand. These are the actual files from the repository — Claude can review, enhance, and follow these conventions.

AGENTS.md — Project Architecture, Conventions & Rules MUST READ
# AGENTS.md — FFM Sponzy Project Instructions

## Project Overview
FansFollow.me (FFM) is a creator platform for fitness, bodybuilding, and martial arts creators. Built on **Sponzy v7.9.2** (a commercial PHP/Laravel script), hosted on **Laravel Cloud**, with **Cloudflare R2** for file storage.

**This is NOT a greenfield project.** Sponzy is a purchased script with its own conventions. Respect them.

## Architecture

### Stack
- **Framework:** Laravel 12.46 / PHP 8.5
- **Database:** MySQL 8.4 (tables use `stg_` prefix)
- **Frontend:** Blade templates + Bootstrap 5 + vanilla JS (no React/Vue)
- **Storage:** Cloudflare R2 (S3-compatible)
- **Hosting:** Laravel Cloud (auto-deploy on push to main)
- **Video/Audio:** Agora SDK
- **Analytics:** GA4, Microsoft Clarity, Usebasin

### Directory Structure
app/
├── Http/Controllers/    # All controllers (80+ files)
├── Models/              # Eloquent models (66 files)
├── Services/            # External service integrations
├── Jobs/                # Queue jobs (video encoding, moderation)
├── Events/              # Laravel events
├── Listeners/           # Event listeners
├── Notifications/       # Email/push notifications
└── Helper.php           # Global helper class

resources/views/
├── index/               # Public pages (home, explore, creators, etc.)
├── users/               # Authenticated user pages (dashboard, settings, etc.)
├── admin/               # Admin panel pages (100+ files)
├── includes/            # Shared partials (navbar, footer, modals)
├── layouts/             # Master layouts (app.blade.php, appnew.blade.php)
├── reels/               # Reels views
├── shop/                # Shop views
└── emails/              # Email templates

routes/
├── web.php              # ALL routes (public, auth, admin)
├── api.php              # API routes (minimal)
└── console.php          # Artisan commands

### Key Patterns

#### Table Prefix: `stg_`
ALL database tables use the `stg_` prefix. When creating Eloquent models, ALWAYS set:
  protected $table = 'stg_tablename';

**Exception:** Some tables like `admin_settings`, `video_calls`, `audio_calls`, `vaults` do NOT have the prefix. Check the schema before assuming.

#### Model Convention
class ExampleModel extends Model
{
    protected $table = 'stg_examples';  // ALWAYS set this
    protected $guarded = [];            // Sponzy uses guarded=[], not fillable
    public $timestamps = false;         // Most Sponzy tables don't use timestamps
}

#### Controller Convention
class ExampleController extends Controller
{
    protected $settings;  // Admin settings singleton
    public function __construct()
    {
        $this->settings = config('settings');  // Always available
    }
}

#### View Convention
@extends('layouts.app')
@section('title')Page Title @endsection
@section('content')
    {{-- Page content here --}}
@endsection

#### Route Convention
// Public routes (no auth)
Route::get('page', [Controller::class, 'method']);

// Authenticated routes
Route::group(['middleware' => ['auth']], function () {
    Route::get('dashboard', [UserController::class, 'dashboard']);
});

// Admin routes (role middleware)
Route::group(['middleware' => ['role', 'nocache']], function () {
    Route::prefix('panel/admin')->group(function () {
        Route::get('/', [AdminController::class, 'admin']);
    });
});

## Critical Rules

### DO NOT
1. DO NOT create new tables without the `stg_` prefix (unless it's a system table like `admin_settings`)
2. DO NOT use React, Vue, or any SPA framework — this is Blade + vanilla JS
3. DO NOT modify the Sponzy core files without documenting why
4. DO NOT add Composer packages without checking if Sponzy already has the functionality
5. DO NOT use `$fillable` — Sponzy uses `$guarded = []`
6. DO NOT assume table names — always check `database/schema.sql` or the model
7. DO NOT create new CSS files — use `public/css/ffm-brand.css` for FFM customizations
8. DO NOT modify `public/css/core.min.css` or `public/css/bootstrap.min.css` — these are Sponzy vendor files
9. DO NOT hardcode URLs — use `url()`, `route()`, or `asset()` helpers
10. DO NOT skip the `stg_` prefix on joins — this caused the Reels 500 bug

### ALWAYS
1. ALWAYS check if a feature already exists in Sponzy before building it
2. ALWAYS use `ffm-brand.css` for FFM-specific styling (53KB of overrides already exist)
3. ALWAYS test with all 3 user roles: fan (testfan), creator (testcreator), admin (Admin)
4. ALWAYS run `tests/qa-auth-test.sh` after changes
5. ALWAYS commit to `main` branch (auto-deploys to staging)
6. ALWAYS check `database/schema.sql` for table structure before writing queries
7. ALWAYS use the dark theme (`data-bs-theme="dark"`) — FFM is dark by default
8. ALWAYS use Inter font family — FFM brand font
9. ALWAYS check `config('settings.*')` for feature flags before showing UI elements
10. ALWAYS preserve existing Sponzy functionality when adding FFM branding

## Design Tokens
--ffm-bg: #0B0F1A;           /* Main background */
--ffm-card: #111827;         /* Card/panel background */
--ffm-border: #1f2937;       /* Borders */
--ffm-orange: #f97316;       /* Primary CTA / brand color */
--ffm-text: #e5e7eb;         /* Primary text */
--ffm-muted: #9ca3af;        /* Secondary text */
font-family: 'Inter', system-ui, sans-serif;
navbar-height: 72px;

## File Editing Rules
- CSS: ONLY edit `public/css/ffm-brand.css`
- Blade: index/ (public), users/ (auth), admin/ (admin), includes/ (partials)
- PHP: Controllers in app/Http/Controllers/, Models in app/Models/
- Routes: ALL in routes/web.php
- Database: Schema in database/schema.sql, fixes in deploy.sh

## Test Accounts
| Admin | Admin | TestPass123! | Admin (full access) |
| Fan | testfan | TestPass123! | Normal user |
| Creator | testcreator | TestPass123! | Creator (verified) |

## QA Scripts
bash tests/qa-browser-test.sh    # Public page smoke test
bash tests/qa-auth-test.sh       # Authenticated user flow test

## Deployment
git push origin main → Laravel Cloud auto-deploys → Live at staging.fansfollowme.com

## Feature Flags
@if(config('settings.allow_reels'))    {{-- Reels --}}
@if(config('settings.allow_vault'))    {{-- Vault --}}
@if(config('settings.gifts'))          {{-- Gifts --}}
@if(config('settings.video_call_status'))  {{-- Video calls --}}
@if(config('settings.audio_call_status'))  {{-- Audio calls --}}

## Common Pitfalls
1. Table prefix: The #1 bug source. Always use `stg_` prefix.
2. CSRF tokens: Login uses AJAX with `X-Requested-With: XMLHttpRequest`
3. Age verification: Redirects to `/age/verification` if `user->age_verification !== 1`
4. Admin routes: Under `/panel/admin/`, NOT `/admin/`
5. User routes: Under `/settings/`, `/my/`, etc. — NOT `/user/`
6. View cache: Run `php artisan view:clear` after Blade changes
7. Config cache: Run `php artisan config:clear` after settings changes

## What Martin Needs
Martin is the product owner. He creates tasks in Highrise, provides design feedback, signs off on designs BEFORE code changes. He does NOT write code.

**Rule:** Do NOT touch the site or build anything until Martin provides design sign-off.
tests/qa-browser-test.sh — Public Page Smoke Test (No Auth) 56 tests
#!/bin/bash
# FFM Staging Comprehensive Browser Test
# Tests public, backend, admin, fan, and creator pages

BASE_URL="https://staging.fansfollowme.com"

# PUBLIC PAGES (17 tests)
# Homepage, Explore, Creators, Fans, Celebrities, Casting, Business,
# Support, FAQ, Privacy, Terms, Cookies, Contact, Blog, For Creators,
# Sitemap, Robots

# AUTH PAGES (3 tests)
# Login, Signup, Password Reset

# PROFILE PAGES (3 tests)
# VikingSamurai, Ronsmoorenburg, TongPo

# BACKEND PAGES (10 tests - should redirect to login)
# /dashboard, /messages, /notifications, /settings/page, /my/posts,
# /my/subscribers, /my/subscriptions, /my/wallet, /settings/withdrawals,
# /my/referrals

# ADMIN PAGES (15 tests - should redirect to login)
# /panel/admin, /panel/admin/settings, /panel/admin/members,
# /panel/admin/posts, /panel/admin/categories, /panel/admin/pages,
# /panel/admin/blog, /panel/admin/subscriptions, /panel/admin/transactions,
# /panel/admin/withdrawals, /panel/admin/reports,
# /panel/admin/verification/members, /panel/admin/theme,
# /panel/admin/billing, /panel/admin/storage

# STATIC ASSETS (5 tests)
# /css/ffm-brand.css, /css/bootstrap.min.css, /js/app.js,
# /img/favicon.png, /fans-foloow-me-logo-final-file--png-version.png

# Run: bash tests/qa-browser-test.sh
# Output: tests/qa-results.md + tests/screenshots/
tests/qa-auth-test.sh — Authenticated User Flow Test 54 tests
#!/bin/bash
# FFM Staging Authenticated User Flow Test
# Tests actual login + navigation for fan, creator, and admin

BASE_URL="https://staging.fansfollowme.com"

# FAN FLOW (15 tests - logs in as testfan)
# Dashboard, Explore, Notifications, Messages, Settings, Password,
# Bookmarks, Subscriptions, Purchases, Wallet, Likes,
# Creator Profile, Creators, Reels, Shop

# CREATOR FLOW (19 tests - logs in as testcreator)
# Dashboard, Posts, Subscribers, Products, Sales, Stories, Reels,
# Vault, Settings, Payout, Withdrawals, Referrals, Subscription,
# Privacy, Messages, Notifications, Create Story,
# Video Call Settings, Audio Call Settings

# ADMIN FLOW (20 tests - logs in as Admin)
# Dashboard, Settings, Members, Posts, Categories, Pages, Blog,
# Subscriptions, Transactions, Withdrawals, Reports, Verification,
# Theme, Billing, Storage, Payments, Social Login, Google,
# Languages, Maintenance Mode

# Login method: AJAX with X-Requested-With: XMLHttpRequest
# Field name: username_email (NOT username)
# Session: Cookie-based (fansfollowme_session)

# Run: bash tests/qa-auth-test.sh
# Output: tests/qa-auth-results.md + tests/screenshots/auth/
tests/FFM-FEATURE-AUDIT.md — Complete Feature Inventory All Features
# FFM Staging — Sponzy v7.9.2 Feature Audit

## ENABLED FEATURES

### Content & Creator Tools
- Reels (short-form video)
- Stories (24-hour disappearing content)
- Vault (private file storage)
- Scheduled Posts
- EPUB Files
- ZIP Files
- Watermark
- QR Codes

### Monetization
- Tips
- Subscriptions
- Pay-Per-View
- Gifts
- Earnings Simulator
- Referral System
- Wallet
- Shop (physical + digital)

### Communication
- Video Calls (Agora)
- Audio Calls (Agora)
- Live Streaming
- Private Live Streaming
- Messages
- Welcome Messages

### User Experience
- Dark Mode (default)
- Featured Creators
- Search by Gender
- Creator Badges
- Post Counters
- Edit Posts
- Delete Messages
- Delete Account
- Deactivate Profile

### Security & Verification
- Email Verification
- Account Verification
- Age Verification (disabled for testing)
- 2FA
- QR Code Login

### Marketing & Growth
- Blog
- Custom Pages
- Social Login
- Push Notifications
- PWA
- Welcome Email

## NEW IN SPONZY v7.9.2 (Not in old fansfollow.me)
- Reels (TikTok-style)
- Video/Audio Calls
- Private Live Streaming
- Vault (file storage)
- Gifts
- EPUB Support
- Scheduled Posts
- Age Verification
- PWA
- Push Notifications
- Earnings Simulator
- Stories (Enhanced)
- Advertising System
- Role & Permissions

## NEEDS CONFIGURATION
- Video/Audio Calls: Needs valid Agora credentials
- Payment Gateways: Stripe, PayPal, etc. need API keys
- Email/SMTP: For sending verification emails
- Age Verification: Enable for production with Yoti/Didit
deploy.sh — Deployment Script Runs on every push
#!/bin/bash
# FFM Staging Deploy Script
# Runs on the persistent app container after each deploy

set -e
echo "=== FFM Deploy ==="

# 1. Create storage directories
mkdir -p storage/logs storage/framework/views storage/framework/cache storage/framework/sessions
chmod -R 777 storage bootstrap/cache

# 2. Create public/public symlink (for /public/uploads/ URLs)
cd public && ln -sf . public && cd ..

# 3. Uploads are on R2 (S3 driver)
echo "Uploads: using R2 storage (FILESYSTEM_DRIVER=s3)"

# 3b. Run pending migrations
php artisan migrate --force 2>&1 | tail -3

# 4. Fix missing database columns (idempotent)
# Adds: post_views, scheduled_date, likes_extras, crowdfund_goal, etc.
# Adds: captcha=off, disable_contact=0 to admin_settings

# 4b. Create missing tables and columns
# Creates: video_calls, audio_calls, vaults tables
# Adds: allow_vault, allow_crowdfund, video_call_status, audio_call_status, etc.

# 4c. Seed test accounts (idempotent)
# Creates: testfan, testcreator (if not exist)
# Sets: age_verification=1 for both

# 5. Clear caches
php artisan config:clear
php artisan view:clear
php artisan route:clear

echo "=== Deploy complete ==="
STATUS.md — Live System Status All Systems Operational
# FFM Staging Status Report

## ALL SYSTEMS OPERATIONAL

### Infrastructure
- URL: https://staging.fansfollowme.com
- Platform: Laravel Cloud (Sponzy v7.9.2)
- PHP 8.5, Laravel 12.46, MySQL 8.4
- R2 Object Storage: 2131+ files, 6.08GB uploaded
- Deploy: Auto on push to main
- Zero 500 errors

### All Pages (19/19 = 200)
- /, /explore, /fans, /celebrities, /casting, /business
- /support, /faq, /privacy, /terms, /cookies, /contact
- /blog, /for-creators, /login, /signup, /password/reset
- /sitemap.xml, /robots.txt

### Profile Pages
- All profile pages working
- Avatar: 128px (CSS override)
- Cover: 80px height
- Tabs: Posts/About (tab switching working)

### Logged-In Experience
- Login: Admin / TestPass123!
- Dashboard, Messages, Notifications, Settings, Explore: All working

### Analytics & Tracking
- GA4: G-SZRL69LXXS
- Microsoft Clarity: xk78rrb386
- Usebasin: 954d0d6e30da
- Conversion Events: sign_up, login, generate_lead

### Design Matching
- Background: #0B0F1A
- Font: Inter, system-ui
- Branding: FansFollow.me
- Navbar: 72px

### Database
- 17,546 users, 239 posts
- All Sponzy v7.9.2 tables created
- 53+ missing admin_settings columns added

FansFollow.me — Creator Platform for Fitness & Sports

This document is auto-generated from the staging environment. Last updated: August 30, 2026.

Share this URL with your design/development team. Do not index this page.