How architmahajann/e-commerce works
ClickMart is a Django REST e-commerce backend with a React storefront. The main shopper flow is account/JWT access, active catalog browsing, authenticated cart changes, then checkout that snapshots prices, validates and reduces stock, clears the cart, and queues an email notification. The graph separates those domain stages from persistence, API routing, and asynchronous notification. Checkout internals and URL wiring were not excerpted, so those links rely on README documentation; the shown task implementation confirms notification loading and dispatch to its mail utility.
Main entry points: urls.py Versioned API router · orders/views.py Checkout and order history · models.py Product data and inventory · carts/views.py Cart management
Components 20
Storefront
- React storefront
frontend/src/main.jsx - Frontend API client
frontend/src/api.js
API and identity
- Versioned API router
api/urls.py - Accounts and JWT
users/views.py - User serializers
users/serializers.py
Shopping domains
- Product catalog
products/views.py - Product data and inventory
products/models.py - Product serializers
products/serializers.py - Cart management
carts/views.py - Cart models
carts/models.py - Cart serializers
carts/serializers.py - Checkout and order history
orders/views.py - Order snapshots
orders/models.py
Notifications
- Notification task
orders/tasks.py - Order email utility
orders/utils.py - Celery broker
- SMTP service
Persistence
- Application database
- Product media storage
Other components
- Shopper
Connections 27
- Shopper → React storefront: shops through
README.md - React storefront → Frontend API client: uses
- Frontend API client → Versioned API router: sends JSON and JWT
README.md - Versioned API router → Accounts and JWT: routes account requests
README.md - Versioned API router → Product catalog: routes catalog requests
README.md - Versioned API router → Cart management: routes cart requests
README.md - Versioned API router → Checkout and order history: routes order requests
README.md - Accounts and JWT → User serializers: serializes accounts
users/views.py - Accounts and JWT → Application database: persists users
README.md - Product catalog → Product serializers: serializes products
products/views.py - Product catalog → Product data and inventory: reads active products
products/views.py - Product data and inventory → Application database: stores inventory
README.md - Product data and inventory → Product media storage: stores images
README.md - Cart management → Cart serializers: serializes carts
carts/views.py - Cart management → Cart models: reads and updates
carts/views.py - Cart management → Product data and inventory: checks stock
carts/views.py - Cart models → Application database: stores cart state
README.md - Checkout and order history → Cart models: checks and clears cart
README.md - Checkout and order history → Product data and inventory: validates and reduces stock
README.md - Checkout and order history → Order snapshots: creates order snapshot
README.md - Checkout and order history → Notification task: queues notification
README.md - Order snapshots → Application database: stores orders
README.md - Notification task → Order snapshots: loads order
orders/tasks.py - Notification task → Order email utility: calls mail utility
orders/tasks.py - Notification task → Celery broker: runs as Celery task
orders/tasks.py - Order email utility → SMTP service: sends notification
README.md - Celery broker → SMTP service: delivers email task
README.md