A comprehensive multi-vendor e-commerce platform built with Django REST Framework and React, specifically designed for clothing retailers in Bangladesh.
- Multi-vendor marketplace with seller onboarding
- Product management with variants (size, color), custom sizing
- Order management with real-time tracking
- User authentication with JWT tokens
- Shopping cart and checkout system
- Review and rating system
- Promotional codes and featured products
- Analytics dashboard for sellers and admins
- Real-time notifications with Celery
- API documentation with Swagger/ReDoc
- RESTful API with Django REST Framework
- PostgreSQL database with optimized queries
- Redis for caching and session management
- Celery for background tasks
- Docker containerization for easy deployment
- Nginx reverse proxy for production
- Health checks and monitoring
- Comprehensive logging
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β React Frontend β β Django Backend β β PostgreSQL β
β (Port 3000) βββββΊβ (Port 8000) βββββΊβ Database β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββ
β Redis β β Celery β
β (Port 6379) βββββΊβ Workers β
βββββββββββββββββββ βββββββββββββββββββ
- Django 4.2.9 - Web framework
- Django REST Framework - API framework
- PostgreSQL - Primary database
- Redis - Caching and message broker
- Celery - Background task processing
- JWT - Authentication
- Swagger/ReDoc - API documentation
- React 18 - UI framework
- TailwindCSS - Styling
- React Router - Navigation
- Axios - HTTP client
- Docker & Docker Compose - Containerization
- Nginx - Reverse proxy
- Gunicorn - WSGI server
- Docker and Docker Compose
- Git
-
Clone the repository
git clone <repository-url> cd JustClothing
-
Start the application
docker-compose up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/swagger/
- Django Admin: http://localhost:8000/admin/
-
Navigate to backend directory
cd backend -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp config.env .env # Edit .env with your local settings -
Run migrations
python manage.py migrate
-
Create superuser
python manage.py createsuperuser
-
Start development server
python manage.py runserver
-
Navigate to frontend directory
cd frontend -
Install dependencies
npm install
-
Start development server
npm start
# Start all services
docker-compose up
# Start in background
docker-compose up -d
# Rebuild and start
docker-compose up --build
# Stop all services
docker-compose down
# View logs
docker-compose logs -f [service_name]# Start with nginx proxy
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d- User - Custom user model with roles (customer, seller, admin)
- Store - Seller stores with business information
- Product - Products with variants and customization options
- Order - Order management with multi-vendor support
- Review - Product reviews and ratings
- PromoCode - Promotional codes and discounts
- Users can be customers or sellers
- Sellers own stores
- Stores have multiple products
- Products have variants (size/color combinations)
- Orders contain items from multiple stores
- Reviews are linked to verified purchases
POST /api/v1/auth/register/- User registrationPOST /api/v1/auth/login/- User loginPOST /api/v1/auth/refresh/- Token refreshPOST /api/v1/auth/logout/- User logout
GET /api/v1/products/products/- List productsPOST /api/v1/products/products/- Create productGET /api/v1/products/products/{id}/- Product detailsGET /api/v1/products/search/?q=query- Search products
GET /api/v1/orders/orders/- List user ordersPOST /api/v1/orders/orders/- Create orderGET /api/v1/orders/cart/- Get user cartPOST /api/v1/orders/cart/add/- Add to cart
GET /api/v1/stores/- List storesPOST /api/v1/stores/- Create storePOST /api/v1/stores/{id}/follow/- Follow store
DEBUG=True
SECRET_KEY=your-secret-key
ALLOWED_HOSTS=localhost,127.0.0.1
# Database
DB_ENGINE=django.db.backends.postgresql
DB_NAME=justclothing_db
DB_USER=justclothing_user
DB_PASSWORD=justclothing_password
DB_HOST=localhost
DB_PORT=5432
# Redis
REDIS_URL=redis://localhost:6379/0
# Celery
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0REACT_APP_API_URL=http://localhost:8000/api/v1cd backend
python manage.py testcd frontend
npm test- Database indexing on frequently queried fields
- Redis caching for session management and frequent queries
- Celery for background tasks (email sending, report generation)
- Nginx for static file serving and load balancing
- Database connection pooling
- Query optimization with select_related and prefetch_related
- JWT authentication with refresh tokens
- CORS configuration for frontend-backend communication
- Rate limiting on API endpoints
- Input validation and sanitization
- SQL injection protection with Django ORM
- XSS protection with Django security middleware
The frontend is built with mobile-first design principles using TailwindCSS, ensuring optimal experience across all device sizes.
- Set up production environment variables
- Configure domain and SSL certificates
- Use production Docker Compose configuration
- Set up monitoring and logging
- Configure backup strategies
- Load balancing with multiple backend instances
- Database read replicas for improved performance
- CDN integration for static assets
- Horizontal scaling with Kubernetes
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is licensed under the MIT License.
For support and questions, please open an issue in the GitHub repository.
Built with β€οΈ for the Bangladesh clothing industry