ecom_backend

E-Commerce Backend + Frontend

Simple e-commerce project built with Django, Django REST Framework, and React.

Features

Tech Stack

Project Structure

backend/
  products/
  users/
  cart/
  orders/

frontend/
  index.html
  app.js

Setup (Backend)

git clone <repo>
cd backend

python -m venv venv
venv\Scripts\activate  # Windows

pip install -r requirements.txt

python manage.py migrate
python manage.py runserver

Setup (Frontend)

Just open the HTML file:

ecom_frontend/index.html

(make sure backend is running)

Basic Flow

  1. User registers / logs in
  2. Fetch products
  3. Add items to cart
  4. View cart
  5. Checkout → creates order + clears cart
  6. Stock is reduced

Notes

Authorization: Bearer <token>

Future Improvements