MRPYWEB

Website, Web Application & Business Systems Development
Back to Portfolios
فروشگاه اینترنتی تربچه + سیستم بازاریابی چندنقشه

Torobche Online Store + Multi-Role Marketing System

A comprehensive Django-based e-commerce platform with a multi-role architecture including admin panels, middle managers, marketers, lawyers, and regular users. The system features a complete online store with shopping c…

Overview

About the Project

A comprehensive Django-based e-commerce platform with a multi-role architecture including admin panels, middle managers, marketers, lawyers, and regular users. The system features a complete online store with shopping cart, ZarinPal payment gateway, wallet and income system, product management with color/size/scent variations, per-user inventory system, SMS-based OTP login, SEO section (articles, Q&A, legal experiences, videos), and online consultation and expert Q&A system.

Case Study

Project Case Study

Challenges, solutions, outcomes, technical highlights, architecture, and project scale.

⚡

Challenges

1. Implementing multi-role architecture with different access levels for admin, manager, marketer, lawyer, and regular user.
2. Designing a wallet and income system with automatic calculation for each role at purchase time.
3. Managing inventory per owner (each user has their own inventory).
4. Integrating ZarinPal payment gateway with automatic profit allocation among different roles.
5. Implementing SMS OTP login for users.
6. Designing dedicated admin panels for each role (managers, marketers, lawyers) with different capabilities.
7. Managing multi-section content (articles, questions, legal experiences, videos) with a unified structure in the Seo model.
8. Implementing a chat-like consultation system between user and lawyer.

💡

Solutions

1. Building CustomUser with separate boolean fields (admin_access, manager_access, agent_access, response_access) for access control.
2. Automatic calculation of marketer and product owner profit in the ZarinPal verify function and deposit to wallet.
3. Creating Owners model for per-user inventory and ManyToMany relation with products.
4. Using dynamic Callback URL for gateway return and cart update.
5. Using ghasedak service for SMS and storing random code in random_pass field.
6. Designing role-specific panel templates with different menus based on access fields.
7. Using a single Seo model with type field (articles/questions/experiences/video) for content management.
8. Creating Counseling and Conversation models for user-lawyer chat.

📚

Outcomes

- Creating a complete e-commerce ecosystem with 5 different roles.
- Increasing revenue through a multi-level marketing system.
- Unified content and product management in one panel.
- Full automation of profit calculation and wallet deposits.
- Reducing support costs with online consultation system.
- Increasing conversion rate with quick SMS login.

🔧

Technical Highlights

- Using CustomUser inheriting AbstractUser with 10+ custom fields.
- Using persiantools for Gregorian to Jalali date conversion.
- Using ghasedak package for SMS sending.
- Implementing AJAX for all cart and panel operations.
- Using DRF Permissions for access control.
- Secure file upload management with timestamp and ID naming.
- Using pymysql for MySQL connection.

🏗️

Architecture

The project is built on Django's MVT architecture with 7 main apps:
1. account: User management and SMS authentication.
2. site_profile: User panel, dashboard, managers, and consultations.
3. seo: Articles, questions, legal experiences, and videos management.
4. product: Products, brands, categories, inventory, and variations management.
5. cart: Shopping cart and order management.
6. zarinpal: Payment gateway integration.
7. marketing: Marketer withdrawal request management.

Apps communicate via ForeignKey and ManyToMany and share a common CustomUser.

📐

Project Scale

The project is designed at the level of a large application with 7 independent apps. It currently uses SQLite but has been upgraded to MySQL for production. The codebase exceeds 5,000 lines of Python and 50+ HTML templates.

Stack

Technologies

Django HTML/CSS JavaScript MySQL Python
Categories

Categories

Admin Panel / Dashboard Office Automation CRM System E-commerce Website
Industry

Industry

E-Commerce, Digital Marketing, Legal Services, Retail
Scope

Scope

Web Development, E-Commerce Systems, Multi-Role Platform, Payment Gateway
Statistics

Project Statistics

7
👁️ Views
0
❤️ Likes
0
⬇️ Downloads
0
⭐ Rating
Metrics

Custom Metrics

Key performance indicators of the project

500+ Registered Users
7 Modular Apps
Team

Project Team

People who collaborated on this project

حسن کاظمی
Hasan Kazemi
Full Stack Developer

Have a similar project in mind?

If you need collaboration for developing a website, CRM, ERP, or a custom system, I'd be happy to discuss your project.

Start a Project