Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌟 MLM Network Marketing System

Professional Multi-Level Marketing Platform with Advanced Analytics, Real-time Updates, and Modern UI

Version Django Python License


πŸš€ Features

πŸ’Ό Core MLM Features

  • βœ… 11 Wallet Types: Income, Self Income, Booster, Star, Trading Level, Salary, Reward, Growth, Sponsor Growth, USDT, Topup
  • βœ… 9 Income Streams: Direct, Level 1-10, Binary, Matching, Reward, Rank Achievement
  • βœ… Genealogy System: Interactive tree view, direct team, level-wise team, whole tree visualization
  • βœ… Rank System: Silver, Gold, Diamond, Crown with auto-upgrade
  • βœ… Fund Management: Deposit, Withdrawal, Transfer with complete history
  • βœ… Referral System: Unique referral codes, tracking, and commission distribution
  • βœ… OTP Verification: Secure wallet transfers with OTP authentication

🎨 Advanced UI/UX

  • ✨ Modern Landing Page: Animated hero section, gradient backgrounds, floating elements
  • πŸ”” Toast Notifications: Real-time feedback for all actions
  • πŸ”„ Loading States: Professional loading overlays and skeleton screens
  • πŸ“Š Data Visualization: Chart.js integration for income and team analytics
  • 🎭 Animations: Smooth transitions, hover effects, entrance animations
  • πŸ“± Fully Responsive: Mobile-first design, works on all devices
  • 🌐 Dynamic Content: Admin-editable landing page content

πŸ›‘οΈ Support System

  • πŸ“ž Help Center: Searchable FAQ with categories
  • πŸ“§ Contact Us: Working contact form with multiple subjects
  • 🎫 Support Tickets: Create and track support tickets
  • πŸ“œ Privacy Policy: Comprehensive privacy information
  • πŸ“‹ Terms of Service: Complete terms and conditions

πŸ” Security & Performance

  • πŸ›‘οΈ Security: CSRF protection, XSS prevention, secure sessions, password encryption
  • ⚑ Performance: Caching, lazy loading, optimized queries
  • πŸ“§ Email System: Automated reports, notifications, welcome emails
  • πŸ” Global Search: Real-time search across users, transactions, and pages
  • 🚫 Error Handling: Custom 404/500 pages, user-friendly error messages

πŸ› οΈ Developer Features

  • πŸ“ Management Commands: Automated daily reports, data seeding
  • πŸ§ͺ Testing Ready: Structure prepared for unit and integration tests
  • πŸ“š Documentation: Comprehensive docs for all features
  • πŸ”Œ API Ready: RESTful structure for future mobile apps
  • πŸ”΄ Real-time Ready: WebSocket infrastructure with Channels

πŸ“¦ Tech Stack

Technology Version Purpose
Django 4.2.16 Backend Framework
Python 3.8+ Programming Language
SQLite 3.x Database (Dev)
Bootstrap 5.3 CSS Framework
Chart.js 4.4 Data Visualization
Channels 4.0 WebSocket Support
Pillow 11.1.0 Image Processing
Crispy Forms 2.3 Form Rendering

πŸ—οΈ Project Structure

mlm_project/
β”œβ”€β”€ apps/                       # Django Applications
β”‚   β”œβ”€β”€ users/                  # User management & authentication
β”‚   β”‚   β”œβ”€β”€ management/         # Custom management commands
β”‚   β”‚   β”œβ”€β”€ templatetags/       # Custom template tags
β”‚   β”‚   β”œβ”€β”€ activity_helpers.py # Activity tracking helpers
β”‚   β”‚   β”œβ”€β”€ activity_models.py  # Activity models
β”‚   β”‚   β”œβ”€β”€ api_views.py        # API endpoints
β”‚   β”‚   β”œβ”€β”€ context_processors.py # Global context
β”‚   β”‚   β”œβ”€β”€ models_landing.py   # Landing page models
β”‚   β”‚   β”œβ”€β”€ models.py           # User models
β”‚   β”‚   β”œβ”€β”€ signals.py          # Django signals
β”‚   β”‚   └── views.py            # User views
β”‚   β”‚
β”‚   β”œβ”€β”€ wallets/                # 11 wallet types management
β”‚   β”‚   β”œβ”€β”€ otp_helpers.py      # OTP generation & validation
β”‚   β”‚   β”œβ”€β”€ otp_models.py       # OTP models
β”‚   β”‚   β”œβ”€β”€ models.py           # Wallet models
β”‚   β”‚   └── views.py            # Wallet operations
β”‚   β”‚
β”‚   β”œβ”€β”€ incomes/                # Income distribution logic
β”‚   β”‚   β”œβ”€β”€ tasks.py            # Celery tasks for income
β”‚   β”‚   β”œβ”€β”€ models.py           # Income models
β”‚   β”‚   └── views.py            # Income views
β”‚   β”‚
β”‚   β”œβ”€β”€ genealogy/              # Team tree and hierarchy
β”‚   β”‚   β”œβ”€β”€ models.py           # Genealogy models
β”‚   β”‚   └── views.py            # Tree views
β”‚   β”‚
β”‚   β”œβ”€β”€ transactions/           # Fund deposits, withdrawals
β”‚   β”‚   β”œβ”€β”€ forms.py            # Transaction forms
β”‚   β”‚   β”œβ”€β”€ models.py           # Transaction models
β”‚   β”‚   └── views.py            # Transaction views
β”‚   β”‚
β”‚   β”œβ”€β”€ ranks/                  # Rank system and rewards
β”‚   β”‚   β”œβ”€β”€ models.py           # Rank models
β”‚   β”‚   └── views.py            # Rank views
β”‚   β”‚
β”‚   β”œβ”€β”€ support/                # Support ticket system
β”‚   β”‚   β”œβ”€β”€ forms.py            # Support forms
β”‚   β”‚   β”œβ”€β”€ models.py           # Support models
β”‚   β”‚   └── views.py            # Support views (tickets, help, contact)
β”‚   β”‚
β”‚   └── reports/                # PDF reports generation
β”‚       β”œβ”€β”€ models.py           # Report models
β”‚       └── views.py            # Report generation
β”‚
β”œβ”€β”€ core/                       # Business Logic Layer
β”‚   └── services/               # Service classes
β”‚       β”œβ”€β”€ wallet_service.py   # Wallet operations
β”‚       β”œβ”€β”€ income_service.py   # Income calculations
β”‚       β”œβ”€β”€ tree_service.py     # Genealogy operations
β”‚       └── rank_service.py     # Rank management
β”‚
β”œβ”€β”€ config/                     # Django Configuration
β”‚   β”œβ”€β”€ settings.py             # Project settings
β”‚   β”œβ”€β”€ urls.py                 # URL routing
β”‚   β”œβ”€β”€ wsgi.py                 # WSGI config
β”‚   └── celery.py               # Celery config
β”‚
β”œβ”€β”€ templates/                  # HTML Templates
β”‚   β”œβ”€β”€ users/                  # User templates
β”‚   β”‚   β”œβ”€β”€ landing.html        # Modern landing page
β”‚   β”‚   β”œβ”€β”€ dashboard.html      # User dashboard
β”‚   β”‚   β”œβ”€β”€ login.html          # Login page
β”‚   β”‚   β”œβ”€β”€ register.html       # Registration page
β”‚   β”‚   β”œβ”€β”€ profile.html        # User profile
β”‚   β”‚   └── change_password.html # Password change
β”‚   β”‚
β”‚   β”œβ”€β”€ wallets/                # Wallet templates
β”‚   β”‚   β”œβ”€β”€ overview.html       # All wallets view
β”‚   β”‚   β”œβ”€β”€ transfer.html       # Transfer funds
β”‚   β”‚   └── history.html        # Transaction history
β”‚   β”‚
β”‚   β”œβ”€β”€ genealogy/              # Team templates
β”‚   β”‚   β”œβ”€β”€ direct.html         # Direct team
β”‚   β”‚   β”œβ”€β”€ level.html          # Level-wise team
β”‚   β”‚   β”œβ”€β”€ tree.html           # Genealogy tree
β”‚   β”‚   └── whole_tree.html     # Complete tree
β”‚   β”‚
β”‚   β”œβ”€β”€ transactions/           # Transaction templates
β”‚   β”‚   β”œβ”€β”€ deposit.html        # Deposit request
β”‚   β”‚   β”œβ”€β”€ withdrawal.html     # Withdrawal request
β”‚   β”‚   └── history.html        # Transaction history
β”‚   β”‚
β”‚   β”œβ”€β”€ support/                # Support templates
β”‚   β”‚   β”œβ”€β”€ help_center.html    # Help center with FAQ
β”‚   β”‚   β”œβ”€β”€ contact_us.html     # Contact form
β”‚   β”‚   β”œβ”€β”€ privacy_policy.html # Privacy policy
β”‚   β”‚   β”œβ”€β”€ terms_of_service.html # Terms of service
β”‚   β”‚   β”œβ”€β”€ list.html           # Support tickets list
β”‚   β”‚   β”œβ”€β”€ create.html         # Create ticket
β”‚   β”‚   └── detail.html         # Ticket details
β”‚   β”‚
β”‚   β”œβ”€β”€ incomes/                # Income templates
β”‚   β”‚   └── summary.html        # Income summary
β”‚   β”‚
β”‚   β”œβ”€β”€ ranks/                  # Rank templates
β”‚   β”‚   └── rank.html           # Rank & rewards
β”‚   β”‚
β”‚   β”œβ”€β”€ reports/                # Report templates
β”‚   β”‚   β”œβ”€β”€ income_report.html  # Income report
β”‚   β”‚   └── report_preview.html # Report preview
β”‚   β”‚
β”‚   β”œβ”€β”€ base.html               # Base template
β”‚   β”œβ”€β”€ 404.html                # Custom 404 page
β”‚   └── 500.html                # Custom 500 page
β”‚
β”œβ”€β”€ static/                     # Static Files (CSS, JS, Images)
β”œβ”€β”€ media/                      # User Uploads
β”‚   └── deposits/               # Deposit screenshots
β”œβ”€β”€ templatetags/               # Global Template Tags
β”œβ”€β”€ db.sqlite3                  # SQLite Database
β”œβ”€β”€ manage.py                   # Django Management Script
β”œβ”€β”€ requirements.txt            # Python Dependencies
β”œβ”€β”€ README.md                   # This file
└── SETUP.md                    # Quick setup guide

πŸš€ Quick Start

1️⃣ Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Git (optional)

2️⃣ Installation

# Navigate to project directory
cd mlm_project

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run migrations
python manage.py makemigrations
python manage.py migrate

# Create superuser (admin)
python manage.py createsuperuser

# Run development server
python manage.py runserver

3️⃣ Access the Application


πŸ“– Complete URL Structure

🏠 Public Pages

URL Page Description
/ Landing Page Modern animated landing page
/auth/login/ Login User login
/auth/register/ Register User registration with referral
/support/help/ Help Center FAQ and help articles
/support/contact/ Contact Us Contact form
/support/privacy/ Privacy Policy Privacy information
/support/terms/ Terms of Service Terms and conditions

πŸ‘€ User Dashboard

URL Page Description
/dashboard/ Dashboard Main user dashboard
/profile/ Profile User profile management
/auth/change-password/ Change Password Password update
/auth/logout/ Logout User logout

πŸ’° Wallets

URL Page Description
/wallets/ All Wallets View all 11 wallets
/wallets/transfer/ Transfer Transfer between wallets
/wallets/history/ History Wallet transaction history

πŸ‘₯ Team Management

URL Page Description
/team/direct/ Direct Team View direct referrals
/team/level/ Level Team Level-wise team view
/team/tree/ Genealogy Tree Interactive tree view
/team/whole/ Whole Tree Complete downline

πŸ’Έ Fund Management

URL Page Description
/fund/deposit/ Deposit Request deposit
/fund/withdrawal/ Withdrawal Request withdrawal
/fund/history/ History Transaction history

πŸ“Š Income & Reports

URL Page Description
/income/summary/ Income Summary All income details
/reports/pdf/ PDF Report Generate income report

πŸ† Ranks & Rewards

URL Page Description
/rank/ Rank System View rank & rewards

🎫 Support System

URL Page Description
/support/ Support Tickets View all tickets
/support/create/ Create Ticket Submit new ticket
/support/<id>/ Ticket Detail View ticket details

πŸ” API Endpoints

URL Method Description
/api/search/ GET Global search API

πŸ”§ Admin Panel

URL Page Description
/admin/ Admin Dashboard Django admin panel

πŸ“– Usage Guide

For Users

1. Registration

  1. Visit /auth/register/
  2. Fill in your details:
    • Username (unique)
    • Email address
    • Phone number
    • Password (strong password required)
    • Sponsor's referral code (optional)
  3. Click "Register Now"
  4. You'll be redirected to login page

2. Dashboard Overview

After login, you'll see:

  • Total Income: Sum of all wallet balances
  • Team Statistics: Direct team, total team, active members
  • Quick Actions: Add member, deposit, withdraw, transfer
  • Activity Timeline: Recent activities
  • Income Chart: Visual income trends
  • Wallet Grid: All 11 wallets at a glance

3. Add New Member

  1. Click "Add New Member" on dashboard
  2. Share your unique referral link via:
    • WhatsApp (one-click share)
    • Email (one-click share)
    • Copy link manually
  3. New members register using your link
  4. They automatically join your team

4. Fund Management

Deposit:

  1. Go to Fund Management > Deposit
  2. Enter amount
  3. Upload payment screenshot
  4. Submit request
  5. Wait for admin approval
  6. Funds credited to Topup Wallet

Withdraw:

  1. Go to Fund Management > Withdraw
  2. Enter amount (from Income Wallet)
  3. Select payment method
  4. Enter payment details
  5. Submit request
  6. Admin processes within 24-48 hours

Transfer:

  1. Go to Wallets > Transfer
  2. Select source wallet
  3. Select destination wallet
  4. Enter amount
  5. Enter OTP (sent to email/phone)
  6. Confirm transfer

5. Team Management

Direct Team:

  • View all direct referrals
  • See their joining date, status, business

Level Team:

  • View team by levels (1-10)
  • See level-wise statistics
  • Track team growth

Genealogy Tree:

  • Interactive visual tree
  • Click to expand/collapse
  • See complete hierarchy

6. Income Tracking

  • View income summary
  • See all income types
  • Download PDF reports
  • Track commission history

7. Support System

Help Center:

  • Browse FAQ categories
  • Search for answers
  • View help articles

Contact Us:

  • Fill contact form
  • Select subject
  • Get response via email

Support Tickets:

  • Create support ticket
  • Track ticket status
  • View admin replies

For Admins

1. Admin Panel Access

  • URL: /admin/
  • Login with superuser credentials
  • Access all management features

2. User Management

  • View all users
  • Edit user details
  • Activate/deactivate accounts
  • View user statistics

3. Deposit Management

  1. Go to Transactions > Deposits
  2. View pending deposits
  3. Check payment screenshot
  4. Actions:
    • Approve: Auto-credits Topup Wallet
    • Reject: Marks as rejected

4. Withdrawal Management

  1. Go to Transactions > Withdrawals
  2. View pending withdrawals
  3. Verify user details
  4. Actions:
    • Mark as Paid: Completes withdrawal
    • Reject & Refund: Returns to Income Wallet

5. Support Ticket Management

  1. View all support tickets
  2. Add admin reply
  3. Change ticket status
  4. Close resolved tickets

6. Rank Management

  1. View all user ranks
  2. See rank criteria
  3. Mark rewards as given
  4. Track rank achievements

7. Landing Page Management

  1. Edit hero section content
  2. Update statistics
  3. Manage testimonials
  4. Update contact information

🎨 Design Features

Landing Page

  • Animated Hero Section: Gradient backgrounds, floating elements
  • Feature Cards: Hover effects, icon animations
  • Wallet Showcase: 11 wallet types display
  • Rank System: Visual rank cards
  • Testimonials: User success stories
  • FAQ Section: Expandable accordion
  • Modern Footer: Social links, quick links

Dashboard

  • Performance Metrics: Animated gradient cards
  • Quick Actions: One-click access
  • Activity Timeline: Real-time feed
  • Income Chart: Line chart with Chart.js
  • Wallet Grid: All wallets overview

Responsive Design

  • Desktop: Full sidebar navigation
  • Tablet: Collapsible sidebar
  • Mobile: Bottom navigation, optimized cards

πŸ’° Income Distribution

Commission Structure

Level Commission Description
Direct 10% Direct referral commission
Level 1 5% First level team
Level 2 3% Second level team
Level 3 2% Third level team
Level 4-7 1% each Mid-level team
Level 8-10 0.5% each Deep level team

Income Types

  1. Direct Income: From direct referrals
  2. Level Income: From team levels 1-10
  3. Binary Income: From binary tree
  4. Matching Income: Matching bonus
  5. Reward Income: Achievement rewards
  6. Rank Income: Rank achievement bonus
  7. Salary Income: Monthly salary
  8. Growth Income: Team growth bonus
  9. Sponsor Growth: Sponsor team growth

πŸ† Rank System

Rank Team Size Team Business Reward
πŸ₯ˆ Silver 10+ members β‚Ή50,000+ β‚Ή5,000
πŸ₯‡ Gold 25+ members β‚Ή1,50,000+ β‚Ή15,000
πŸ’Ž Diamond 50+ members β‚Ή5,00,000+ β‚Ή50,000
πŸ‘‘ Crown 100+ members β‚Ή10,00,000+ β‚Ή1,00,000

Rank Benefits

  • Silver: Basic benefits, 5K reward
  • Gold: Enhanced benefits, 15K reward
  • Diamond: Premium benefits, 50K reward
  • Crown: Elite benefits, 1L reward

πŸ”§ Configuration

Email Setup (Production)

Edit config/settings.py:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your-email@gmail.com'
EMAIL_HOST_PASSWORD = 'your-app-password'
DEFAULT_FROM_EMAIL = 'MLM Network <noreply@mlmnetwork.com>'

Database (Production)

Switch to PostgreSQL:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'mlm_db',
        'USER': 'postgres',
        'PASSWORD': 'your-password',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}

Security (Production)

DEBUG = False
ALLOWED_HOSTS = ['yourdomain.com', 'www.yourdomain.com']
SECRET_KEY = 'your-secret-key-here'  # Generate new key
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True

Celery Setup (Optional)

For async income processing:

# Install Redis
pip install redis

# Start Redis server
redis-server

# Start Celery worker
celery -A config worker -l info

# Start Celery beat (for scheduled tasks)
celery -A config beat -l info

πŸ› Troubleshooting

Common Issues

1. Module not found error

pip install -r requirements.txt

2. Database error

python manage.py makemigrations
python manage.py migrate

3. Static files not loading

python manage.py collectstatic

4. Port already in use

python manage.py runserver 8001

5. Permission denied (Linux/Mac)

chmod +x manage.py

6. Migration conflicts

python manage.py migrate --fake
python manage.py migrate

πŸ”’ Security Features

  • βœ… CSRF Protection on all forms
  • βœ… XSS Prevention with Django templates
  • βœ… SQL Injection Protection with ORM
  • βœ… Password Hashing with PBKDF2
  • βœ… Secure Session Management
  • βœ… OTP Verification for transfers
  • βœ… Admin-only access controls
  • βœ… Input Validation & Sanitization
  • βœ… Atomic Database Transactions
  • βœ… Rate Limiting (configurable)

πŸ“± Mobile Responsiveness

Breakpoints

  • Mobile: < 768px
  • Tablet: 768px - 1024px
  • Desktop: > 1024px

Mobile Features

  • Touch-optimized buttons
  • Swipe gestures
  • Bottom navigation
  • Optimized images
  • Fast loading times

🎯 Roadmap

Phase 1 (Current)

  • User Management
  • Wallet System
  • Income Distribution
  • Team Management
  • Support System
  • Landing Page

Phase 2 (Upcoming)

  • Mobile App (React Native)
  • Real-time Notifications (WebSocket)
  • Dark Mode Toggle
  • Multi-language Support
  • Advanced Analytics Dashboard

Phase 3 (Future)

  • Blockchain Integration
  • AI-powered Recommendations
  • Video KYC Integration
  • Payment Gateway Integration
  • SMS Notifications
  • Social Media Integration

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

πŸ‘¨πŸ’» Developer Information

Project: MLM Network Marketing System
Version: 2.0
Status: Production Ready πŸš€
Last Updated: May 2026
Framework: Django 4.2.16
Python: 3.8+


πŸ“ž Support & Contact

  • πŸ“§ Email: softbenderai@gmail.com
  • πŸ“± Phone: +91-9454680972
  • 🌐 Website: https://softbenderai.cloud
  • πŸ’¬ Support: Create ticket in support section
  • πŸ“š Documentation: See ENHANCEMENTS.md and USER_REGISTRATION_GUIDE.md

πŸ™ Acknowledgments

  • Django Framework Team
  • Bootstrap Team
  • Chart.js Team
  • All Contributors

πŸ“Š Project Statistics

  • Total Apps: 8 Django apps
  • Total Models: 20+ models
  • Total Views: 50+ views
  • Total Templates: 30+ templates
  • Total URLs: 40+ endpoints
  • Lines of Code: 10,000+ lines
  • Development Time: 3+ months

Made with ❀️ for MLM Network Community

πŸš€ Ready for Production | πŸ“± Mobile Responsive | πŸ”’ Secure | ⚑ Fast

About

🌟 Professional MLM Network Marketing Platform built with Django 4.2 | 11 Wallet Types | 9 Income Streams | Interactive Genealogy Tree | Rank System | OTP Security | Modern UI with Animations | Production Ready πŸš€

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages