This repository contains the backend API for a simple e-commerce store, built using Django and Django Rest Framework.
- Checkout the cart which freezes the prices for 10 mins
- Get total price which calculates cart value with frozen prices after checkout
- Place order considering checked out prices
- Proceed with payment which means order is placed and payment is attached to it later
Item: Represents a product.Cart: User's shopping cart.CartItem: Items within a cart.Order: Completed order.OrderItem: Items within an order.
- Clone the repository:
git clone <repository_url>
- Create a virtual environment:
python -m venv venv source venv/bin/activate # On macOS and Linux venv\Scripts\activate # On Windows
- Install dependencies:
pip install -r requirements.txt
- Run migrations:
python manage.py migrate
- Start the development server:
python manage.py runserver
- Use an API client (e.g., Postman, Insomnia) to interact with the API endpoints.
- Set the
HTTP_USER_IDheader in your requests to identify the user.