How chandan-0416/novamart works
NovaMart is a full-stack e-commerce marketplace: shoppers browse a catalog, authenticate, manage a cart, check out, and review orders; admins manage products and fulfillment. The React SPA uses Redux slices and API clients to communicate with an Express REST API, whose controllers delegate to business services backed by PostgreSQL. The README also documents atomic inventory checkout and an MCP operational server. Some feature-level links rely on README documentation because their source files were not sampled; those limits are reflected in the graph.
Main entry points: db.js Database Pool · store.js Redux Store · App.jsx React App Router · productSlice.js Product State
Components 26
Storefront
- React App Router
frontend/src/App.jsx - Catalog Pages
frontend/src/pages/HomePage.jsx - Admin Console
frontend/src/pages/AdminDashboardPage.jsx - Redux Store
frontend/src/store/store.js - Auth State
frontend/src/store/slices/authSlice.js - Product State
frontend/src/store/slices/productSlice.js - Cart State
frontend/src/store/slices/cartSlice.js - Order State
frontend/src/store/slices/orderSlice.js - Axios API Client
frontend/src/api/axiosClient.js
API Layer
- Express REST API
backend/src/app.js - Auth Routes
backend/src/routes/auth.routes.js - Product Routes
backend/src/routes/product.routes.js - Cart Routes
backend/src/routes/cart.routes.js - Order Routes
backend/src/routes/order.routes.js - Auth Handlers
backend/src/controllers/auth.controller.js - Product Handlers
backend/src/controllers/product.controller.js - Cart Handlers
backend/src/controllers/cart.controller.js - Order Handlers
backend/src/controllers/order.controller.js
Commerce Services
- Authentication
backend/src/services/auth.service.js - Catalog Management
backend/src/services/product.service.js - Cart Operations
backend/src/services/cart.service.js - Checkout and Orders
backend/src/services/order.service.js
Data and Operations
- PostgreSQL
- Database Pool
backend/src/config/db.js - MCP Operations Tools
backend/src/mcp/novamartMcpServer.js
Other components
- Shopper / Admin
Connections 32
- Shopper / Admin → React App Router: uses
- React App Router → Catalog Pages: routes to
frontend/src/App.jsx - React App Router → Admin Console: routes to
frontend/src/App.jsx - React App Router → Cart State: fetches cart
frontend/src/App.jsx - Redux Store → Auth State: registers
frontend/src/store/store.js - Redux Store → Product State: registers
frontend/src/store/store.js - Redux Store → Cart State: registers
frontend/src/store/store.js - Redux Store → Order State: registers
frontend/src/store/store.js - Auth State → Axios API Client: calls auth API
frontend/src/store/slices/authSlice.js - Product State → Axios API Client: calls product API
frontend/src/store/slices/productSlice.js - Catalog Pages → Product State: loads catalog
frontend/src/pages/HomePage.jsx - Admin Console → Product State: manages products
frontend/src/pages/AdminDashboardPage.jsx - Admin Console → Order State: manages fulfillment
frontend/src/pages/AdminDashboardPage.jsx - Axios API Client → Express REST API: sends REST requests
- Express REST API → Auth Routes: mounts routes
backend/src/app.js - Express REST API → Product Routes: mounts routes
backend/src/app.js - Auth Routes → Auth Handlers: dispatches
backend/src/routes/auth.routes.js - Product Routes → Product Handlers: dispatches
backend/src/routes/product.routes.js - Cart Routes → Cart Handlers: dispatches
backend/src/routes/cart.routes.js - Order Routes → Order Handlers: dispatches
backend/src/routes/order.routes.js - Auth Handlers → Authentication: delegates
backend/src/controllers/auth.controller.js - Product Handlers → Catalog Management: delegates
backend/src/controllers/product.controller.js - Cart Handlers → Cart Operations: delegates
backend/src/controllers/cart.controller.js - Order Handlers → Checkout and Orders: delegates
backend/src/controllers/order.controller.js - Authentication → Database Pool: queries
backend/src/services/auth.service.js - Catalog Management → Database Pool: queries
backend/src/services/product.service.js - Cart Operations → Database Pool: queries
backend/src/services/cart.service.js - Checkout and Orders → Database Pool: uses transactions
backend/src/services/order.service.js - Database Pool → PostgreSQL: queries
backend/src/config/db.js - Checkout and Orders → PostgreSQL: locks inventory rows
- Shopper / Admin → MCP Operations Tools: operates
- MCP Operations Tools → PostgreSQL: runs reporting tools