BigBrother Platform

Invite-only music promotion platform with mobile app, admin dashboard, and backend API

Architecture Overview

Mobile App:
React Native (iOS & Android)
Backend API:
Node.js with Express
Admin Dashboard:
React with Next.js
Database:
MongoDB
Real-time:
Socket.io
Push Notifications:
Firebase Cloud Messaging (FCM)
Payment:
Paystack
File Storage:
AWS S3 or Firebase Storage

Project Structure

bigbrother-platform/
├── mobile/              # React Native app
├── admin-dashboard/     # Next.js admin web app
├── backend/             # Node.js/Express API
├── shared/              # Shared types/utilities
└── docs/                # Documentation

Core Features

1. Authentication & User Management

  • Invite-only registration system (admin generates invite codes)
  • JWT-based authentication
  • User profiles with referral codes
  • Admin authentication and role management

2. Task System

  • Admin creates daily tasks (expire at midnight)
  • Tasks include: play song X times (5-7 configurable), bonus plays (max configurable), share song
  • Task completion tracking with stream counting
  • Mandatory review submission after task completion
  • Past expired tasks viewable by users

3. Music Integration

  • Spotify Web API integration (embed player)
  • YouTube API integration (embed videos)
  • Stream counting when songs are played
  • Background music for social media posts (TikTok, Instagram, Facebook)

4. Rewards & Earnings

  • Task-based rewards (configurable per task)
  • Weekly earnings view
  • 30-day cashout cycle
  • Minimum withdrawal: NGN 1,000
  • Referral bonuses (7-day bonus on referred user's tasks)

5. Gamification

  • 30-day perfect streak tracking
  • Weekly/monthly leaderboards
  • Badge system (time-limited and permanent)
  • Monthly rewards for most active users
  • Achievement-based incentives (concert tickets, private events)

6. Admin Dashboard

  • Task creation and management
  • User management and invite code generation
  • Real-time analytics and reports
  • Export reports as PDF/CSV
  • Comprehensive monitoring dashboard

7. Real-time Features

  • Push notifications for new tasks
  • Live leaderboard updates
  • Real-time task completion tracking
  • Socket.io for real-time updates

Database Schema (MongoDB)

users - User profiles, referral codes, earnings, streaks
tasks - Daily tasks with config, rewards, expiration
taskCompletions - User task completions with reviews
streams - Stream tracking per user/song
invites - Invite codes and usage
referrals - Referral relationships and bonuses
badges - Badge definitions and user badge assignments
leaderboards - Weekly/monthly leaderboard snapshots
withdrawals - Cashout requests and history
notifications - Push notification records
adminUsers - Admin accounts

Key Integrations

1. Spotify Web API - Song playback, embed player
2. YouTube API - Video playback, embed player
3. Instagram Basic Display API - Post sharing verification
4. TikTok API - Post sharing verification
5. Facebook Graph API - Post sharing verification
6. Paystack API - Payment processing for cashouts
7. Firebase FCM - Push notifications

Implementation Phases

1

Foundation

  • Project setup and structure
  • Database schema and models
  • Authentication system (JWT)
  • Basic API endpoints
  • Admin invite code generation
2

Core Features

  • Task creation and management
  • Music player integration (Spotify, YouTube)
  • Stream counting
  • Task completion flow
  • Review submission
3

Rewards & Payments

  • Earnings calculation
  • Referral system
  • Cashout system (30-day cycle)
  • Paystack integration
  • Weekly earnings view
4

Gamification

  • Streak tracking
  • Leaderboard system
  • Badge system
  • Achievement tracking
5

Social Media Integration

  • Instagram embed and sharing verification
  • TikTok sharing verification
  • Facebook sharing verification
  • Background music feature
6

Real-time & Notifications

  • Socket.io setup
  • Push notifications (FCM)
  • Real-time leaderboard updates
  • Task notification system
7

Admin Dashboard

  • Dashboard UI
  • Task management interface
  • User management
  • Analytics and reports
  • PDF/CSV export functionality
8

Polish & Testing

  • UI/UX refinement
  • Error handling
  • Performance optimization
  • Testing and bug fixes

Security Considerations

Invite-only registration (no public signup)
JWT token expiration and refresh
Rate limiting on API endpoints
Input validation and sanitization
Secure payment processing
Admin role-based access control

Key Files to Create

Backend

  • backend/src/models/ - MongoDB models
  • backend/src/routes/ - API routes
  • backend/src/controllers/ - Business logic
  • backend/src/middleware/ - Auth, validation
  • backend/src/services/ - External API integrations
  • backend/src/utils/ - Helpers and utilities

Mobile

  • mobile/src/screens/ - App screens
  • mobile/src/components/ - Reusable components
  • mobile/src/services/ - API client, FCM
  • mobile/src/navigation/ - Navigation setup
  • mobile/src/context/ - State management

Admin Dashboard

  • admin-dashboard/src/pages/ - Next.js pages
  • admin-dashboard/src/components/ - UI components
  • admin-dashboard/src/lib/ - API client, utilities
  • admin-dashboard/src/hooks/ - Custom React hooks

Environment Variables Needed

MongoDB connection string
JWT secrets
Firebase credentials (FCM)
Spotify API credentials
YouTube API key
Instagram/Facebook/TikTok API credentials
Paystack secret key
AWS S3 credentials (if using)

Admin Dashboard Reports & Analytics

The admin dashboard provides comprehensive reporting and analytics capabilities. All reports can be exported as PDF or CSV files for further analysis or sharing.

👥 User Reports

  • User Activity Report

    Daily/weekly/monthly user engagement, task completion rates, and active user counts

  • User Earnings Report

    Total earnings per user, pending withdrawals, and payment history

  • User Growth Report

    New user registrations, referral statistics, and user retention metrics

  • User Streak Report

    Perfect streak tracking, streak distribution, and streak leaderboard

  • User Profile Report

    Complete user profiles, account status, and user verification status

📋 Task Reports

  • Task Performance Report

    Task completion rates, average completion time, and task popularity

  • Task Analytics Report

    Platform breakdown (Spotify/YouTube/Instagram/TikTok), success rates per platform

  • Task Review Report

    Review submissions, review quality metrics, and pending reviews

  • Daily Task Summary

    Daily task creation, completion statistics, and expiration tracking

  • Task Reward Report

    Total rewards distributed per task, reward distribution breakdown

💰 Financial Reports

  • Earnings Summary Report

    Total platform earnings, earnings by period, and earnings trends

  • Withdrawal Report

    Pending withdrawals, processed withdrawals, withdrawal history, and payment status

  • Payment Processing Report

    Paystack transaction logs, failed payments, and payment reconciliation

  • Reward Distribution Report

    Total rewards paid out, rewards by task type, and reward trends

  • Referral Bonus Report

    Referral bonuses paid, top referrers, and referral conversion rates

📊 Engagement Reports

  • Stream Analytics Report

    Total streams per song, stream sources (Spotify/YouTube), and stream trends

  • Social Media Engagement Report

    Instagram/TikTok post submissions, approval rates, and engagement metrics

  • Leaderboard Report

    Weekly/monthly leaderboards, top performers, and ranking changes

  • Badge Distribution Report

    Badges awarded, badge types, and user badge achievements

  • Platform Usage Report

    App usage statistics, session duration, and feature usage patterns

⚙️ Operational Reports

  • Invite Code Report

    Generated invite codes, usage statistics, and unused codes

  • Notification Report

    Push notification delivery rates, notification types, and engagement

  • System Health Report

    API performance, error logs, system uptime, and technical metrics

  • Admin Activity Log

    Admin actions, task creation history, and system changes

  • Review Queue Report

    Pending Instagram/TikTok reviews, review processing time, and approval rates

🔍 Custom & Advanced Reports

  • Custom Date Range Report

    Generate reports for any custom date range with filtered data

  • Comparative Analysis Report

    Compare performance across different time periods or user segments

  • Export All Data Report

    Complete data export with all user, task, and financial information

  • Real-time Dashboard Export

    Export current dashboard view as PDF or CSV snapshot

Export Options

📄 PDF Export

  • • Formatted reports with charts and graphs
  • • Professional layout suitable for presentations
  • • Includes branding and date stamps
  • • Multi-page support for large datasets

📊 CSV Export

  • • Raw data in spreadsheet format
  • • Compatible with Excel, Google Sheets, etc.
  • • Suitable for further analysis and manipulation
  • • Includes all data fields and timestamps

Platform Integration & Verification Logic

This section explains how we verify that users actually complete their tasks on Spotify, YouTube, and Instagram.

🎵 Spotify - Music Playback Verification

How It Works:

  • We embed a Spotify music player directly in the app
  • The system tracks when the user clicks play and monitors playback progress
  • Task is marked complete when user listens to at least 50% of the song (or minimum 30 seconds)
  • Optional: Users can connect their Spotify account for more reliable verification

Verification Algorithm:

  1. User opens the task and sees the embedded Spotify player
  2. User clicks play button to start the song
  3. System starts tracking playback time
  4. System monitors progress every few seconds
  5. When 50% of song is played (or 30 seconds minimum), task is automatically completed
  6. User can then submit their review

✅ Advantages:

  • • Fully automated verification - no manual review needed
  • • Real-time tracking of playback progress
  • • Good user experience - native Spotify player
  • • Works on web browsers and mobile web

📺 YouTube - Video Watch Verification

How It Works:

  • We embed a YouTube video player directly in the app
  • The system tracks when video starts playing and monitors watch time
  • Task is marked complete when user watches at least 50% of the video
  • System detects if user switches tabs or minimizes window to prevent cheating

Verification Algorithm:

  1. User opens the task and sees the embedded YouTube video
  2. User clicks play button to start the video
  3. System starts tracking watch time and monitors if tab is active
  4. System checks video progress every 5 seconds
  5. When 50% of video is watched (with tab visible), task is automatically completed
  6. If user switches tabs too early, watch time pauses until they return
  7. User can then submit their review

✅ Advantages:

  • • Fully automated verification - no manual review needed
  • • Tracks actual watch time, not just video load
  • • Prevents users from cheating by switching tabs
  • • Good user experience - native YouTube player

📱 Instagram - Post/Reel Verification

The Challenge:

Instagram's platform does not allow third-party apps to automatically verify if a user posted a reel/video with specific background music. This is a limitation set by Instagram, not our platform.

How It Works:

  • User posts a reel or video with the required song as background music
  • User submits the link to their Instagram post in the app
  • System automatically verifies: post exists, is a video/reel, and was created recently
  • Post is queued for admin review to verify the music is present
  • Admin reviews the post visually to confirm music matches the task requirement
  • Once approved, task is marked complete and user receives reward

Verification Algorithm:

  1. User creates and posts reel/video with required song on Instagram
  2. User copies the Instagram post URL and submits it in the app
  3. System automatically checks:
    • ✓ Post URL is valid
    • ✓ Post is a video or reel (not just a photo)
    • ✓ Post was created within the task timeframe
    • ✓ Post belongs to the user's Instagram account
  4. If automatic checks pass, post is added to admin review queue
  5. Admin reviews post to visually confirm:
    • ✓ Music sticker/tag is visible
    • ✓ Correct song is being used
    • ✓ Video/reel is properly formatted
  6. Admin approves or rejects the submission
  7. If approved, task is marked complete and user receives reward
  8. If rejected, user receives feedback and can resubmit

⚠️ Important Notes:

  • Why manual review? Instagram's API doesn't provide access to music/audio data from posts. This is an Instagram platform limitation, not a limitation of our system.
  • Review time: Admin reviews are typically completed within 24-48 hours
  • Future improvement: We can implement AI-based image recognition to automatically detect music stickers/tags, reducing manual review time
  • User experience: Users receive immediate confirmation that their post was submitted, and notification when review is complete

🎬 TikTok - Video Post Verification

The Challenge:

Similar to Instagram, TikTok's platform has limited API access for third-party apps to automatically verify if a user posted a video with specific background music. TikTok's API is primarily designed for content creators and businesses, not for verifying user-generated content with music.

How It Works:

  • User creates and posts a TikTok video with the required song as background music
  • User submits the link to their TikTok video in the app
  • System automatically verifies: video exists, is accessible, and was created recently
  • Video is queued for admin review to verify the music is present
  • Admin reviews the video to visually confirm music matches the task requirement
  • Once approved, task is marked complete and user receives reward

Verification Algorithm:

  1. User creates and posts TikTok video with required song
  2. User copies the TikTok video URL and submits it in the app
  3. System automatically checks:
    • ✓ Video URL is valid and accessible
    • ✓ Video exists and is public (or user has access)
    • ✓ Video was created within the task timeframe
    • ✓ Video belongs to the user's TikTok account
  4. If automatic checks pass, video is added to admin review queue
  5. Admin reviews video to visually confirm:
    • ✓ Music/sound is audible in the video
    • ✓ Correct song is being used as background music
    • ✓ Video is properly formatted and meets quality standards
    • ✓ Video content is appropriate
  6. Admin approves or rejects the submission
  7. If approved, task is marked complete and user receives reward
  8. If rejected, user receives feedback and can resubmit

⚠️ Important Notes:

  • Why manual review? TikTok's API doesn't provide easy access to verify music/audio in user videos. TikTok's API is mainly for content creators to manage their own content, not for third-party verification of user posts.
  • Review time: Admin reviews are typically completed within 24-48 hours
  • Video accessibility: Videos must be public or the user must grant access for admin review
  • Future improvement: We can implement AI-based audio recognition to automatically detect if the correct song is playing in the video, reducing manual review time
  • User experience: Users receive immediate confirmation that their video was submitted, and notification when review is complete

🛡️ Anti-Fraud & Security Measures

For Spotify & YouTube:

  • • Minimum play/watch duration required
  • • Tab visibility detection (prevents background playback)
  • • User must manually click play (no autoplay)
  • • Rate limiting (prevents rapid task completion)
  • • Time validation (tasks expire at midnight)

For Instagram & TikTok:

  • • Post/video timestamp verification (must be recent)
  • • Account ownership verification
  • • Content type validation (must be video)
  • • Manual admin review for music verification
  • • One submission per task (prevents spam)
  • • Video accessibility check (must be viewable)

Summary

Spotify: Fully automated - system tracks playback and verifies completion automatically
YouTube: Fully automated - system tracks watch time and verifies completion automatically
Instagram: Semi-automated - automatic checks + manual admin review (due to Instagram platform limitations)
TikTok: Semi-automated - automatic checks + manual admin review (due to TikTok platform limitations)