This is an E-Commerce API built with Django and Django REST framework. It provides endpoints for managing users and products.
- User management (registration, login, wishlist, cart, etc.)
- Product management (CRUD operations - product details, reviews)
- Order management (CRUD operations)
- Payment gateway integration (Stripe)
- Authentication and Authorization (using Django's built-in auth system)
- API documentation with Swagger UI and ReDoc
- Python 3.6+
- Django 3.0+
- Django REST framework
drf_yasg
for API documentation
-
Clone the repository:
git clone https://github.com/SubhojitGuin/Ecommerce_Django_API.git cd Ecommerce_Django_API
-
Create a virtual environment
python -m venv .venv .\.venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Change the directory
cd Ecommerce
-
Apply migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
Now add your credentials and save it.
-
Create the .env file Create a .env file in Ecommerce\Ecommerce folder an copy the format from .env.sample i.e.:
STRIPE_SECRET_KEY=your_stripe_secret_key STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key TAX=tax_rate
To get your stripe keys, click here.
-
Run the development server:
python manage.py runserver 8080
Access the admin panel at http://localhost:8000/admin/
using the superuser credentials.
- Swagger UI:
http://localhost:8000/swagger/
- ReDoc:
http://localhost:8000/redoc/
For more details, check the API documentation.
This project is licensed under the MIT License. See the 🎗️LICENSE file for details.