How mahesh09s/ecommerce-platform works
ShopSphere is a full-stack commerce platform. A customer browses and searches products, manages a cart and wishlist, checks out, pays, and tracks orders; customers can also review products. Admins manage catalog, orders, users, coupons, and analytics. The README documents the React client, Spring service/repository layers, MySQL transactions, MongoDB reviews and analytics, and Razorpay. Some subsystem implementations were not sampled, so their internal links are documented at the product level rather than inferred from filenames.
Main entry points: api.js API client · ReviewService.java Reviews and ratings · OrderService.java Checkout and orders · AuthService.java Authentication
Components 24
Customer experience
- Storefront pages
frontend/src/pages - Route composition
frontend/src/App.jsx - API client
frontend/src/services/api.js - Auth pages
frontend/src/pages/auth - Auth state
frontend/src/context/AuthContext.jsx - Cart state
frontend/src/context/CartContext.jsx
Identity and access
- Auth endpoints
backend/src/main/java/com/shopsphere/controller/AuthController.java - Authentication
backend/src/main/java/com/shopsphere/service/AuthService.java - JWT security
backend/src/main/java/com/shopsphere/security
Catalog and discovery
- Product discovery
backend/src/main/java/com/shopsphere/controller/ProductController.java - Product services
backend/src/main/java/com/shopsphere/service/ProductService.java - Product data
backend/src/main/java/com/shopsphere/entity/Product.java - Reviews and ratings
backend/src/main/java/com/shopsphere/service/ReviewService.java - Review documents
backend/src/main/java/com/shopsphere/document/Review.java
Commerce operations
- Cart management
backend/src/main/java/com/shopsphere/service/CartService.java - Checkout and orders
backend/src/main/java/com/shopsphere/service/OrderService.java - Payment processing
backend/src/main/java/com/shopsphere/service/PaymentService.java - Admin operations
backend/src/main/java/com/shopsphere/service/AdminService.java
Backend and data
- Transactional store
- Analytics store
- Email delivery
backend/src/main/java/com/shopsphere/service/EmailService.java
Other components
- Shopper
- Administrator
- Razorpay
Connections 23
- Shopper → Storefront pages: browses and shops
- Administrator → Admin operations: manages commerce
- Storefront pages → Route composition: uses routes
frontend/src/App.jsx - Auth pages → Auth state: authenticates through
- Auth state → API client: requests API
- Cart state → API client: requests API
- API client → Auth endpoints: calls REST API
- API client → Product discovery: calls REST API
- Product discovery → Product services: delegates to
backend/src/main/java/com/shopsphere/controller/ProductController.java - Product services → Product data: reads products
backend/src/main/java/com/shopsphere/service/ProductService.java - Auth endpoints → Authentication: delegates to
- Authentication → JWT security: issues tokens
backend/src/main/java/com/shopsphere/service/AuthService.java - Authentication → Email delivery: sends account email
backend/src/main/java/com/shopsphere/service/AuthService.java - Reviews and ratings → Review documents: stores reviews
backend/src/main/java/com/shopsphere/service/ReviewService.java - Reviews and ratings → Product data: updates ratings
backend/src/main/java/com/shopsphere/service/ReviewService.java - Cart management → Product data: checks stock
backend/src/main/java/com/shopsphere/service/CartService.java - Checkout and orders → Cart management: uses cart
backend/src/main/java/com/shopsphere/service/OrderService.java - Checkout and orders → Payment processing: coordinates payment
- Payment processing → Razorpay: processes payment
- Product services → Transactional store: persists catalog
- Checkout and orders → Transactional store: persists transactions
- Reviews and ratings → Analytics store: stores review data
- Admin operations → Transactional store: manages records