A scalable e-commerce backend built with Django REST Framework (DRF).
This project provides a clean and modular API for managing products, categories, users, carts, and orders — with JWT authentication and admin-level permissions.
-
Environment Variables (.env)
-
API Endpoints (Examples)
-
Authentication (JWT)
-
Testing & CI
-
Deployment Notes
-
Contribution Guide
-
License & Contact
#Overview
This is a backend-only RESTful API for an online store. It’s built for scalability, clean separation of logic — supporting both admin and regular user roles.
-
Product management (CRUD)
-
Category system
-
Filtering, sorting & pagination
-
Shopping cart & order creation
-
JWT-based authentication (access / refresh)
-
Admin permissions & restricted routes
-
API documentation (Swagger or Redoc if enabled)
| Component | Technology |
|---|---|
| Backend | Django REST Framework |
| Database | SQLite |
| Auth | JWT (SimpleJWT) |
| Optional | Redis, Celery (for async tasks) |
| Deployment | Docker & docker-compose |
| Testing | pytest or Django’s built-in test suite |
-
Python 3.10+
-
pip
-
Docker & docker-compose
-
virtual environment
#1. Clone the repository
git clone <repo-url>
cd <project-folder>
# 2. Create & activate virtual environment
# macOS/Linux: source .venv/bin/activate
# Windows: .venv\Scripts\activate
python -m venv .venv
# 3. Install dependencies
pip install -r requirements.txt
# 4. Setup environment variables
cp .env.example .env # then edit .env as needed
# 5. Apply database migrations
python manage.py migrate
# 6. Create a superuser
python manage.py createsuperuser
# 7. Run development server
python manage.py runserverpy manage.py testpython manage.py makemigrations
python manage.py migrate