How guna02826/delishmonde-store works
Delish Monde is a bakery e-commerce application. Customers browse products, authenticate, manage a persistent cart, apply coupons, pay, and track orders; administrators manage products, users, coupons, orders, and sales summaries. The graph follows the client route entry point and the server’s mounted API routes, then highlights checkout/payment processing and its persistence layer. Some client-to-server links are documented or implied by API endpoints rather than shown in the sampled client excerpts; those links are dashed where wiring is unverified.
Main entry points: payment.routes.js Checkout and payment · App.jsx App routing · app.js Express API · coupon.routes.js Coupon routes
Components 34
Customer app
- App routing
client/src/App.jsx - Auth state
client/src/context/AuthContext.jsx - Cart state
client/src/context/CartContext.jsx - Cart API client
client/src/api/cartApi.js - Browse products
client/src/pages - Cart and checkout
client/src/pages/CartPage.jsx - Account and orders
client/src/pages
API and domain
- Express API
server/app.js - User routes
server/routes/user.routes.js - Product routes
server/routes/product.routes.js - Cart routes
server/routes/cart.routes.js - Coupon routes
server/routes/coupon.routes.js - Order routes
server/routes/order.routes.js - Checkout and payment
server/routes/payment.routes.js - Order operations
server/controllers/order.controller.js - Product operations
server/controllers/product.controller.js - Coupon calculation
server/utils/coupon.js - Invoice email
server/utils/invoice.js
Administration
- Admin dashboard
client/src/pages/AdminDashboardPage.jsx - Admin tabs
client/src/components/admin - Admin operations
server/controllers/admin.controller.js
Persistent data
Identity and validation
- User authentication
server/middleware/auth.middleware.js - Admin authorization
server/middleware/admin.middleware.js - Request validation
server/middleware/validate.middleware.js - Validation schemas
server/utils/validationSchemas.js
Other components
- Shopper
- Razorpay
- MongoDB
Connections 48
- Shopper → App routing: uses
client/src/App.jsx - App routing → Browse products: routes to
client/src/App.jsx - App routing → Cart and checkout: routes to
client/src/App.jsx - App routing → Account and orders: routes to
client/src/App.jsx - App routing → Admin dashboard: routes to
client/src/App.jsx - App routing → Auth state: protects routes
client/src/App.jsx - Admin dashboard → Admin tabs: renders
client/src/pages/AdminDashboardPage.jsx - Cart state → Auth state: uses identity
client/src/context/CartContext.jsx - Cart state → Cart API client: calls
client/src/context/CartContext.jsx - Cart and checkout → Cart state: uses cart state
client/src/pages/CartPage.jsx - Cart and checkout → Cart API client: calls
client/src/pages/CartPage.jsx - Auth state → User routes: requests profile
client/src/context/AuthContext.jsx - Cart API client → Cart routes: requests cart
- Cart and checkout → Checkout and payment: starts checkout
- Express API → User routes: mounts
server/app.js - Express API → Product routes: mounts
server/app.js - Express API → Cart routes: mounts
server/app.js - Express API → Coupon routes: mounts
server/app.js - Express API → Order routes: mounts
server/app.js - Order routes → Order operations: dispatches
server/routes/order.routes.js - Order routes → User authentication: authenticates
server/routes/order.routes.js - Cart routes → User authentication: authenticates
server/routes/cart.routes.js - Cart routes → Carts: reads and writes
server/routes/cart.routes.js - Cart routes → Products: checks products
server/routes/cart.routes.js - Coupon routes → Coupon calculation: calculates discount
server/routes/coupon.routes.js - Coupon routes → Coupons: reads and writes
server/routes/coupon.routes.js - Coupon routes → Products: prices items
server/routes/coupon.routes.js - Coupon routes → Admin authorization: guards admin routes
server/routes/coupon.routes.js - Checkout and payment → User authentication: authenticates
server/routes/payment.routes.js - Checkout and payment → Products: checks and updates stock
server/routes/payment.routes.js - Checkout and payment → Orders: creates order
server/routes/payment.routes.js - Checkout and payment → Payments: records payment
server/routes/payment.routes.js - Checkout and payment → Carts: clears cart
server/routes/payment.routes.js - Checkout and payment → Coupons: increments use
server/routes/payment.routes.js - Checkout and payment → Coupon calculation: calculates discount
server/routes/payment.routes.js - Checkout and payment → Razorpay: creates payment order
server/routes/payment.routes.js - Checkout and payment → Invoice email: requests invoice
server/routes/payment.routes.js - Order operations → Orders: reads and updates
server/controllers/order.controller.js - Product operations → Products: reads and writes
server/controllers/product.controller.js - Admin operations → Users: reads users
server/controllers/admin.controller.js - Admin operations → Orders: reads orders
server/controllers/admin.controller.js - Admin operations → Products: reads products
server/controllers/admin.controller.js - User routes → Request validation: validates requests
server/routes/user.routes.js - User routes → Validation schemas: uses schemas
server/routes/user.routes.js - Product routes → Request validation: validates requests
server/routes/product.routes.js - Product routes → Validation schemas: uses schemas
server/routes/product.routes.js - Product routes → Admin authorization: guards changes
server/routes/product.routes.js - User authentication → Users: loads user
server/middleware/auth.middleware.js