How vedantgonbare/ecommerce-platform works
This is a full-stack e-commerce platform: shoppers browse products, manage a persistent cart, place orders, complete checkout, and view order outcomes; accounts and reviews support that journey. The React UI calls a modular FastAPI backend, whose domain services use PostgreSQL, Redis caching, Stripe, and Celery. The graph preserves the documented categories, search, reviews, and background-job capabilities. Some subsystem links rely on README statements or the SOURCE INDEX because their implementation files were not excerpted.
Main entry points: main.py FastAPI application · orders/service.py Orders · router.py Auth routes · products/service.py Product catalog
Components 22
Shopper interface
- React application
frontend/src/App.jsx - Shopper pages
frontend/src/pages - Auth context
frontend/src/context/AuthContext.jsx - API client
frontend/src/api/client.js
Identity
- Auth routes
backend/app/modules/auth/router.py - Auth service
backend/app/modules/auth/service.py - JWT security
backend/app/modules/auth/security.py - Token revocation
backend/app/modules/auth/token_revocation.py - User records
backend/app/modules/users/models.py
Catalog
- Product routes
backend/app/modules/products/router.py - Product catalog
backend/app/modules/products/service.py - Categories
backend/app/modules/categories
Commerce
Runtime services
- FastAPI application
backend/app/main.py - PostgreSQL
backend/app/db/session.py - Redis cache
backend/app/core/redis.py - Celery jobs
backend/app/core/celery_app.py
Other components
- Shopper
- Stripe
Connections 33
- Shopper → React application: uses
README.md - React application → Shopper pages: routes to
frontend/src/App.jsx - React application → Auth context: reads session
frontend/src/App.jsx - Auth context → API client: requests user
frontend/src/context/AuthContext.jsx - Shopper pages → API client: requests data
frontend/src/pages/Cart.jsx - API client → FastAPI application: calls API
README.md - FastAPI application → Auth routes: registers
backend/app/main.py - FastAPI application → Product routes: registers
backend/app/main.py - FastAPI application → Categories: registers routes
backend/app/main.py - FastAPI application → Cart: registers routes
backend/app/main.py - FastAPI application → Orders: registers routes
backend/app/main.py - FastAPI application → Payments: registers routes
backend/app/main.py - FastAPI application → Reviews: registers routes
backend/app/main.py - Auth routes → Auth service: calls
backend/app/modules/auth/router.py - Auth routes → JWT security: creates tokens
backend/app/modules/auth/router.py - Auth routes → Token revocation: checks or revokes
backend/app/modules/auth/router.py - Auth service → User records: creates or authenticates
backend/app/modules/auth/service.py - Auth routes → User records: loads current user
backend/app/modules/auth/router.py - Product routes → Product catalog: calls
backend/app/modules/products/router.py - Product catalog → Categories: checks category
backend/app/modules/products/service.py - Product catalog → Redis cache: invalidates cache
backend/app/modules/products/service.py - Cart → Product catalog: checks products
backend/app/modules/cart/service.py - Orders → Cart: loads cart
backend/app/modules/orders/service.py - Payments → Orders: uses order service
backend/app/modules/payments/service.py - Orders → Celery jobs: dispatches confirmation
backend/app/modules/orders/service.py - Payments → Stripe: creates checkout
README.md - Stripe → Payments: notifies webhook
README.md - FastAPI application → PostgreSQL: provides sessions
backend/app/main.py - Product catalog → PostgreSQL: reads and writes
backend/app/modules/products/service.py - Cart → PostgreSQL: reads and writes
backend/app/modules/cart/service.py - Orders → PostgreSQL: locks and persists
backend/app/modules/orders/service.py - Reviews → Orders: verifies purchase
README.md - Celery jobs → Orders: runs confirmation task
README.md