How pratik0192/college-major-project works
OptiVerse is an online shopping system with a customer storefront, an admin console, and an Express/MongoDB backend. The customer workflow spans product discovery, cart and wishlist management, checkout/payment, order tracking, and post-delivery reviews; account registration, email verification, and password recovery are also supported. The admin console covers product and coupon management, users, dashboards, and order-status operations. The backend entry point mounts feature routes, while controllers perform domain operations against models and external services. Some unsampled route/controller links are omitted where the excerpts do not establish them.
Main entry points: src/App.jsx Storefront routes · src/App.jsx Admin routes · ShopContext.jsx Shop state and API · orderController.js Order and payment
Components 33
Customer storefront
- Storefront routes
frontend/src/App.jsx - Shop state and API
frontend/src/context/ShopContext.jsx - Product browsing
frontend/src/pages/Products.jsx - Product detail
frontend/src/pages/SinglePage.jsx - Cart and checkout
frontend/src/pages/Checkout.jsx - Order history
frontend/src/pages/Order.jsx - Wishlist
frontend/src/pages/Wishlist.jsx - Account access
frontend/src/pages/Login.jsx - Store navigation
frontend/src/components/Navbar.jsx - Localization
frontend/src/i18n.js
Admin console
- Admin routes
admin/src/App.jsx - Admin login
admin/src/components/Login.jsx - Admin navigation
admin/src/components/Sidebar.jsx - Dashboard
admin/src/pages/Dashboard.jsx - Product management
admin/src/pages/AddProducts.jsx - Order management
admin/src/pages/Orders.jsx - User management
admin/src/pages/Users.jsx - Coupon management
admin/src/pages/AddCoupons.jsx
Commerce API
- API entry and routes
backend/index.js - Account routes
backend/routes/userRoutes.js - Product routes
backend/routes/productRoutes.js - Account operations
backend/controllers/userController.js - Catalog operations
backend/controllers/productController.js - Order and payment
backend/controllers/orderController.js - Review operations
backend/controllers/reviewController.js
Domain persistence
- User records
backend/models/userModel.js - Product records
backend/models/productModel.js - Order records
backend/models/orderModel.js - Review records
backend/models/reviewModel.js
External services
- MongoDB
- Email provider
backend/config/sendEmail.js - Stripe and Razorpay
backend/controllers/orderController.js
Other components
- Shopper
Connections 39
- Shopper → Storefront routes: uses
frontend/src/App.jsx - Storefront routes → Product browsing: routes to
frontend/src/App.jsx - Storefront routes → Product detail: routes to
frontend/src/App.jsx - Storefront routes → Cart and checkout: routes to
frontend/src/App.jsx - Storefront routes → Order history: routes to
frontend/src/App.jsx - Storefront routes → Wishlist: routes to
frontend/src/App.jsx - Storefront routes → Account access: routes to
frontend/src/App.jsx - Storefront routes → Store navigation: renders
frontend/src/App.jsx - Shop state and API → API entry and routes: calls API
frontend/src/context/ShopContext.jsx - Shop state and API → Product records: fetches catalog
- Product browsing → Shop state and API: uses state
- Order history → Shop state and API: uses state
frontend/src/pages/Order.jsx - Wishlist → Shop state and API: uses state
frontend/src/pages/Wishlist.jsx - Admin routes → Admin login: renders when logged out
admin/src/App.jsx - Admin routes → Admin navigation: renders
admin/src/App.jsx - Admin routes → Dashboard: routes to
admin/src/App.jsx - Admin routes → Product management: routes to
admin/src/App.jsx - Admin routes → Order management: routes to
admin/src/App.jsx - Admin routes → User management: routes to
admin/src/App.jsx - Admin routes → Coupon management: routes to
admin/src/App.jsx - API entry and routes → Account routes: mounts
backend/index.js - API entry and routes → Product routes: mounts
backend/index.js - API entry and routes → MongoDB: connects
backend/index.js - Account routes → Account operations: dispatches
backend/routes/userRoutes.js - Product routes → Catalog operations: dispatches
backend/routes/productRoutes.js - Account operations → User records: reads/writes
backend/controllers/userController.js - Account operations → Email provider: sends messages
backend/controllers/userController.js - Catalog operations → Product records: reads/writes
backend/controllers/productController.js - Order and payment → Order records: reads/writes
backend/controllers/orderController.js - Order and payment → User records: reads/writes
backend/controllers/orderController.js - Order and payment → Email provider: sends messages
backend/controllers/orderController.js - Order and payment → Stripe and Razorpay: creates/verifies
backend/controllers/orderController.js - Review operations → Order records: checks delivery
backend/controllers/reviewController.js - Review operations → Review records: reads/writes
backend/controllers/reviewController.js - Review operations → Product records: updates rating
backend/controllers/reviewController.js - User records → MongoDB: persists
- Product records → MongoDB: persists
- Order records → MongoDB: persists
- Review records → MongoDB: persists