How ujas-goti/cs351-project2-coolmugs works
Cool Mugs is a React storefront backed by an Express API and MongoDB. The main customer journey runs from browsing products through cart management and checkout to saved order history; account creation, login, and profile editing support that journey. The graph also shows the storefront’s component layer and the API’s session and database responsibilities. Edges are limited to relationships visible in sampled source or explicitly described in the README; unsampled UI/API connections are omitted where not established.
Main entry points: App.jsx App coordinator · server.js Express server · orderRoutes.js Order API · accountRoutes.js Account API
Components 21
Storefront UI
- App coordinator
client/src/App.jsx - Navigation bar
client/src/components/navigationbar.jsx - Home storefront
client/src/views/Home.jsx - Featured products
client/src/components/FeaturedProducts.jsx - Shop catalog
client/src/views/Shop.jsx - Product list
client/src/components/productList.jsx - Product card
client/src/components/productCard.jsx - Product details
client/src/views/ProductsDetail.jsx - Cart view
client/src/views/Cart.jsx - Cart item
client/src/components/CartItem.jsx - Checkout form
client/src/views/Checkout.jsx - Account dashboard
client/src/views/Account.jsx - Account creation
client/src/views/CreateAccount.jsx
Commerce API
- Product API
server/routes/productRoutes.js - Cart API
server/routes/cartRoutes.js - Order API
server/routes/orderRoutes.js
Accounts and sessions
- Account API
server/routes/accountRoutes.js - Express server
server/server.js - Session state
server/server.js
MongoDB data
- MongoDB Atlas
Other components
- Shopper
Connections 32
- Shopper → App coordinator: uses
- App coordinator → Navigation bar: renders
client/src/App.jsx - App coordinator → Home storefront: renders
client/src/App.jsx - App coordinator → Shop catalog: renders
client/src/App.jsx - App coordinator → Product details: renders
client/src/App.jsx - App coordinator → Cart view: renders
client/src/App.jsx - App coordinator → Checkout form: renders
client/src/App.jsx - App coordinator → Account dashboard: renders
client/src/App.jsx - App coordinator → Account creation: renders
client/src/App.jsx - Home storefront → Featured products: renders
client/src/views/Home.jsx - Featured products → Product list: renders
client/src/components/FeaturedProducts.jsx - Shop catalog → Product list: renders
client/src/views/Shop.jsx - Product list → Product card: renders
client/src/components/productList.jsx - Cart view → Cart item: renders
client/src/views/Cart.jsx - App coordinator → Product API: fetches catalog
client/src/App.jsx - App coordinator → Cart API: manages cart
client/src/App.jsx - Checkout form → Account API: loads account
client/src/views/Checkout.jsx - Checkout form → Order API: submits order
client/src/views/Checkout.jsx - Account dashboard → Order API: loads history
client/src/views/Account.jsx - Account dashboard → Account API: edits profile
client/src/views/Account.jsx - Express server → Product API: mounts routes
server/server.js - Express server → Account API: mounts routes
server/server.js - Express server → Cart API: mounts routes
server/server.js - Express server → Order API: mounts routes
server/server.js - Express server → Session state: configures
server/server.js - Product API → MongoDB Atlas: reads products
server/routes/productRoutes.js - Cart API → MongoDB Atlas: looks up products
server/routes/cartRoutes.js - Order API → MongoDB Atlas: reads products, saves orders
server/routes/orderRoutes.js - Account API → MongoDB Atlas: reads and writes users
server/routes/accountRoutes.js - Cart API → Session state: reads and writes cart
server/routes/cartRoutes.js - Order API → Session state: reads and clears cart
server/routes/orderRoutes.js - Account API → Session state: sets user session
server/routes/accountRoutes.js