How linganand-04/forever_full_stack works
Forever is a MERN e-commerce application with a shopper storefront, a separate admin dashboard, and an Express API. Shoppers browse/search products, manage a cart, authenticate, and place orders; administrators manage products and order status. The backend routes requests through authentication middleware to controllers and MongoDB models, with Cloudinary used for product images and payment providers supported by the order controller. Several UI capabilities are documented but their implementation was not sampled, so those links are shown only where the source index or README supports them.
Main entry points: App.jsx Store routes · orderRoute.js Order routes · server.js API server · ShopContext.jsx Shop context
Components 31
Shopper storefront
- Store routes
frontend/src/App.jsx - Shop context
frontend/src/context/ShopContext.jsx - Browse catalog
frontend/src/pages/Collection.jsx - Product details
frontend/src/pages/Product.jsx - Shopping cart
frontend/src/pages/Cart.jsx - Checkout
frontend/src/pages/PlaceOrder.jsx - Order history
frontend/src/pages/Orders.jsx - Product search
frontend/src/components/SearchBar.jsx
Admin dashboard
- Admin routes
admin/src/App.jsx - Product management
admin/src/pages/Add.jsx - Order management
admin/src/pages/Orders.jsx
Backend API
- API server
backend/server.js - User routes
backend/routes/userRoute.js - Product routes
backend/routes/productRoute.js - Cart routes
backend/routes/cartRoute.js - Order routes
backend/routes/orderRoute.js - Accounts and auth
backend/controllers/userController.js - Catalog operations
backend/controllers/productController.js - Cart operations
backend/controllers/cartController.js - Order and payment
backend/controllers/orderController.js - User authorization
backend/middleware/auth.js - Admin authorization
backend/middleware/adminAuth.js
Data and services
- User records
backend/models/userModel.js - Product records
backend/models/productModel.js - Order records
backend/models/orderModel.js - MongoDB
backend/config/mongodb.js - Cloudinary images
backend/config/cloudnary.js - Email delivery
backend/utils/sendEmail.js
Other components
- Shopper
- Administrator
- Payment gateways
Connections 39
- Shopper → Store routes: uses
README.md - Store routes → Shop context: renders within
frontend/src/main.jsx - Store routes → Browse catalog: routes to
frontend/src/App.jsx - Store routes → Shopping cart: routes to
frontend/src/App.jsx - Store routes → Product details: routes to
frontend/src/App.jsx - Store routes → Checkout: routes to
frontend/src/App.jsx - Store routes → Order history: routes to
frontend/src/App.jsx - Store routes → Product search: renders
frontend/src/App.jsx - Browse catalog → Shop context: reads catalog
frontend/src/pages/Collection.jsx - Product search → Shop context: uses search state
frontend/src/components/SearchBar.jsx - Shop context → Product routes: requests catalog
frontend/src/context/ShopContext.jsx - Shop context → Cart routes: requests cart
frontend/src/context/ShopContext.jsx - Checkout → Order routes: submits order
- Order history → Order routes: requests orders
- Administrator → Admin routes: uses
README.md - Admin routes → Product management: routes to
admin/src/App.jsx - Admin routes → Order management: routes to
admin/src/App.jsx - Product management → Product routes: manages products
- Order management → Order routes: manages orders
- API server → User routes: mounts
backend/server.js - API server → Product routes: mounts
backend/server.js - API server → Cart routes: mounts
backend/server.js - API server → Order routes: mounts
backend/server.js - User routes → Accounts and auth: dispatches
backend/routes/userRoute.js - Product routes → Catalog operations: dispatches
backend/routes/productRoute.js - Cart routes → Cart operations: dispatches
backend/routes/cartRoute.js - Order routes → Order and payment: dispatches
backend/routes/orderRoute.js - Order routes → User authorization: protects user routes
backend/routes/orderRoute.js - Order routes → Admin authorization: protects admin routes
backend/routes/orderRoute.js - Accounts and auth → User records: reads and writes
backend/controllers/userController.js - Accounts and auth → Email delivery: sends reset mail
backend/controllers/userController.js - Catalog operations → Product records: reads and writes
backend/controllers/productController.js - Catalog operations → Cloudinary images: uploads images
backend/controllers/productController.js - Cart operations → User records: updates cart
backend/controllers/cartController.js - Order and payment → Order records: reads and writes
backend/controllers/orderController.js - Order and payment → User records: updates user cart
backend/controllers/orderController.js - Order and payment → Payment gateways: creates and verifies payments
backend/controllers/orderController.js - API server → MongoDB: connects on startup
backend/server.js - API server → Cloudinary images: initializes on startup
backend/server.js