MyShop is a full-featured E-Commerce web application for online clothing shopping, built with Django. It allows users to browse products, add items to a cart, apply coupons, place orders, and pay securely. The project demonstrates advanced Django concepts, asynchronous task processing with Celery, PDF generation, and integration with payment gateways.
- Product catalog with categories
- Shopping cart with session management
- Order placement and checkout
- Coupon/discount system
- Payment gateway integration (Zibal)
- PDF invoice generation
- Asynchronous task processing (Celery, RabbitMQ)
- Redis caching
- Admin dashboard
- Responsive UI (Bootstrap)
- Backend: Django 4.2
- Frontend: HTML, CSS (Bootstrap), JavaScript
- Database: SQLite (default, can be changed)
- Task Queue: Celery, RabbitMQ
- Cache/Session: Redis
- PDF Generation: WeasyPrint
- Containerization: Docker, Docker Compose
MyShop/
├── cart/ # Cart management
├── contact/ # Contact form
├── coupon/ # Coupon/discount system
├── order/ # Order and checkout
├── shop/ # Product catalog
├── zibal/ # Payment gateway integration
├── Shop-core/ # Project settings and core config
├── static/ # Static files (CSS, JS, images)
├── templates/ # Base and shared templates
├── media/ # Uploaded product images
├── requirements.txt
├── docker-compose.yml
└── Dockerfile
- Docker & Docker Compose (recommended)
- Python 3.10+ (if running locally)
- Clone the repository:
git clone <repo-url> cd MyShop
- Build and start the services:
docker-compose up --build
- Access the app:
- Web: http://localhost:8000
- Admin: http://localhost:8000/admin/
- Install dependencies:
pip install -r requirements.txt
- Set environment variables:
- Create a
.envfile in the root directory (seeShop-core/settings.pyfor required variables likeDJANGO_SECRET_KEY,REDIS_HOST).
- Create a
- Apply migrations:
python manage.py migrate
- Run development server:
python manage.py runserver
- Start Celery worker (in a new terminal):
celery --app=Shop-core worker -l INFO
/- Home page/shop/- Product listing/cart/- Shopping cart/order/- Checkout and orders/zibal/- Payment processing/coupon/- Apply coupons/contact/- Contact form/admin/- Admin dashboard
- shop:
Product,Category - cart: Session-based cart logic
- order:
Order,OrderItem - coupon: Coupon codes and discounts
- zibal: Payment gateway integration
- Building a shopping cart from scratch
- Session management in Django
- Asynchronous tasks with Celery & RabbitMQ
- PDF generation with WeasyPrint
- Payment gateway integration
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is for educational purposes.