This is a comprehensive eCommerce platform built with Django and Django REST Framework. The platform includes essential features for managing products, orders, users, and more.
- Features
- Installation
- Usage
- API Documentation
- Models Overview
- Project Structure
- Data Generation
- Contributing
- License
- User Authentication (JWT)
- Product Management
- Order Management
- Cart Functionality
- Product Reviews
- Admin Panel for Managing Data
- Swagger API Documentation
- Comprehensive Querysets and Business Logic Layers
- OTP Service for Authentication
- payment(compatible with all PSP in Iran)
- Clone the repository:
git clone https://github.com/sajadfallahdoost/eCommerce.git
cd eCommerce
-
Install dependencies:
-
Using Poetry (Recommended):
poetry install
-
Using pip:
pip install -r requirements.txt
-
-
Apply migrations:
python manage.py migrate
- Create a superuser:
python manage.py createsuperuser
- Run the development server:
python manage.py runserver
- Access the admin panel at
http://127.0.0.1:8000/admin/
- Access the API documentation at
http://127.0.0.1:8000/swagger/
This project uses Swagger for API documentation. Visit the /swagger/
endpoint to explore and test the available API endpoints.
- Product: Represents a product in the store.
- ProductGallery: Manages product images.
- Pack: Represents a product pack.
- Tag: Tags for products.
- Brand: Brand information.
- Category: Product categories.
- AttributeValue: Values for product attributes.
- User: User authentication and management.
- PersonalProfile: Personal profile for users.
- CorporateProfile: Corporate profile for companies.
- Address: User addresses.
- Cart: Shopping cart management.
- CartItem: Items within a shopping cart.
- OrderAddresses: Addresses associated with orders.
- Orders: Order management.
eCommerce/
├── account/
│ ├── api/
│ │ └── views.py
│ ├── models/
│ │ └── user_profile.py
│ └── serializers
├── basket/
│ ├── api/
│ │ └── views.py
│ ├── models/
│ │ └── cart.py
│ └── serializers
├── services/
│ ├── otp/
│ │ ├── api/
│ │ │ └── views.py
│ │ ├── logic.py
│ │ └── serializers
│ ├── payment/
│ │ ├── api/
│ │ ├── payment_idpay/
│ │ ├── payment_sep/
│ │ ├── payment_zarinpal/
│ │ └── serializers
├── shop/
│ ├── models/
│ │ └── order.py
│ ├── api/
│ │ └── views.py
│ └── serializers
├── warehouse/
│ ├── api/
│ │ └── views.py
│ ├── models/
│ │ └── product.py
│ ├── repository/
│ │ ├── manager/
│ │ │ └── warehouse.py
│ │ └── queryset/
│ │ └── warehouse.py
│ └── serializers
├── eCommerce/
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
└── manage.py
To generate sample data for the database, run the following command:
python manage.py generate_all_data
This command will fill the database with sample data for testing and development purposes.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch-name
. - Make your changes and commit them:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-branch-name
. - Create a pull request.
This project is open source and available under the sjd-developer License.