Skip to content
EstodaPublic

About

Django API Project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

🚀 Creator Commerce SaaS Platform

A production-grade backend system built with Django & Django REST Framework that enables content creators to sell digital products (courses, ebooks, services) with secure payments, role-based access control, and scalable architecture.


📌 Overview

This project is a SaaS (Software as a Service) platform designed to:

  • Empower creators to monetize their content
  • Allow users to purchase and access digital products
  • Provide a scalable backend architecture for future web/mobile apps
  • Simulate real-world production systems (payments, RBAC, orders, etc.)

🎯 Key Features

👤 User Management

  • Custom User Model (email-based authentication)
  • JWT Authentication
  • Role-Based Access Control (RBAC)
  • User verification system

🛍️ Product Management

  • Create and manage digital products (courses, ebooks, services)
  • Categories & hierarchical structure
  • Lessons inside products

🧾 Order System

  • Order creation & tracking
  • Order items system
  • Status management (pending, paid, failed, refunded)

💳 Payment Integration

  • PayMob integration (planned)
  • Payment tracking
  • Transaction audit system

🎓 Enrollment System

  • Grant access after successful payment
  • Track user progress

⭐ Reviews & Ratings

  • Product rating system
  • Moderation support

🧠 System Architecture

This project follows a production-style Django architecture (HackSoft Style Guide):

  • Views → Thin (no business logic)
  • Services → Business logic (write operations)
  • Selectors → Read/query logic
  • Models → Data only (no heavy logic)
View → Service → Model
      ↘ Selector ↗

🗂️ Project Structure

MyEdu/
│
├── config/                 # Django project settings
│   ├── settings/
│   │   ├── base.py
│   │   ├── dev.py
│   │   └── prod.py
│
├── apps/
│   ├── users/               # Custom user & auth
│   ├── roles/                # RBAC system
│   ├── products/            # Products & lessons
│   ├── orders/                # Orders & items
│   ├── payments/            # Payments & transactions
│   ├── enrollments/         # Access control
│   ├── reviews/               # Ratings system
│   └── dashboard/           # Analytics
│
├── core/                       # Shared utilities
├── docker/                    # Docker setup (planned)
├── requirements/           # Dependencies
└── manage.py

🔄 Core Flow

User → Browse Products
     → Create Order
     → Make Payment
     → Get Enrollment
     → Access Content

🗃️ Database Design

Main entities:

  • Users
  • Roles & Permissions
  • Products & Categories
  • Lessons
  • Orders & Order Items
  • Payments & Transactions
  • Enrollments
  • Reviews
  • Coupons

Key Design Decisions

  • UUID as primary keys
  • RBAC using many-to-many tables
  • Separate Payments & Transactions (audit-friendly)
  • Currency stored in minor units

⚙️ Tech Stack

  • Backend: Django, Django REST Framework
  • Auth: JWT (SimpleJWT)
  • Database: PostgreSQL
  • Environment: Docker (planned)
  • Config: django-environ

🚀 Getting Started

1. Clone the repo

git clone https://github.com/your-username/your-repo.git
cd your-repo

2. Create virtual environment

python -m venv .venv
source .venv/bin/activate

3. Install dependencies

pip install -r requirements/base.txt

4. Setup environment variables

Create a .env file:

DEBUG=True
SECRET_KEY=your-secret-key

POSTGRES_DB=your_db
POSTGRES_USER=your_user
POSTGRES_PASSWORD=your_password
POSTGRES_HOST=localhost
POSTGRES_PORT=5432

5. Run migrations

python manage.py migrate

6. Create superuser

python manage.py createsuperuser

7. Run server

python manage.py runserver

📡 API Endpoints (Planned)

POST   /api/auth/register
POST   /api/auth/login
GET    /api/products
POST   /api/products
POST   /api/orders
POST   /api/payments/initiate
POST   /api/payments/webhook
GET    /api/dashboard

🧪 Development Status

✅ Completed

  • Django setup
  • Custom User Model
  • Project structure
  • Environment configuration
  • Initial migrations

🚧 In Progress

  • Authentication APIs
  • RBAC system
  • Product module

⏳ Planned

  • Payments integration (PayMob)
  • Docker setup
  • Testing & CI/CD

🎯 Project Goal

This project is built as:

💡 Interview preparation project — focused on mastering real-world backend architecture using Django.


👨‍💻 Author

Ahmed Abdulrahman Mohamed Amin Backend Developer (Django / DRF) GitHub: @Estoda


⭐ Notes

  • This is a learning-focused, production-style project
  • Architecture is prioritized over speed
  • Designed to scale and evolve

About

Django API Project

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages