How minho-26/mern-project works
Cyber Tech is a MERN electronics storefront with a separate inventory-admin interface. Shoppers browse category and product pages, add items to a cart, and can sign in or sign up; administrators upload, add, list, and remove products. The backend serves catalog, authentication, cart, and image-upload endpoints, with product and user data persisted in MongoDB. The graph includes documented capabilities even where implementation details were not sampled; those links are omitted when their callers are not evidenced.
Main entry points: App.js Storefront app · app.js Express API · Product.jsx Product page · Admin.jsx Admin routes
Components 20
Storefront
- Storefront app
frontend/src/App.js - Home page
frontend/src/Pages/Shop.jsx - Category pages
frontend/src/Pages/ShopCategory.jsx - Product page
frontend/src/Pages/Product.jsx - Product cards
frontend/src/Components/Item/Item.jsx - Product display
frontend/src/Components/ProductDisplay/ProductDisplay.jsx - Related products
frontend/src/Components/RelatedProducts/RelatedProducts.jsx - Cart page
frontend/src/Pages/Cart.jsx - Cart view
frontend/src/Components/CartItems/CartItems.jsx - Shop context
frontend/src/Context/ShopContext.jsx - Login and signup
frontend/src/Pages/LoginSignup.jsx
Inventory admin
- Admin app
admin/src/App.jsx - Admin routes
admin/src/Pages/Admin/Admin.jsx - Add product
admin/src/Components/AddProduct/AddProduct.jsx - Product list
admin/src/Components/ProductList/ProductList.jsx
Backend services
- Express API
backend/app.js
Persistence
- Uploaded images
backend/upload/images - MongoDB
Other components
- Shopper
- Administrator
Connections 24
- Shopper → Storefront app: uses
README.md - Storefront app → Home page: routes to
frontend/src/App.js - Storefront app → Category pages: routes to
frontend/src/App.js - Storefront app → Product page: routes to
frontend/src/App.js - Storefront app → Cart page: routes to
frontend/src/App.js - Storefront app → Login and signup: routes to
frontend/src/App.js - Home page → Product cards: renders
frontend/src/Pages/Shop.jsx - Category pages → Product cards: renders
frontend/src/Pages/ShopCategory.jsx - Product page → Product display: renders
frontend/src/Pages/Product.jsx - Product page → Related products: renders
frontend/src/Pages/Product.jsx - Product cards → Product page: links to
frontend/src/Components/Item/Item.jsx - Product display → Shop context: adds cart item
frontend/src/Components/ProductDisplay/ProductDisplay.jsx - Cart page → Cart view: renders
frontend/src/Pages/Cart.jsx - Cart view → Shop context: reads cart
frontend/src/Components/CartItems/CartItems.jsx - Login and signup → Express API: sends login/signup
frontend/src/Pages/LoginSignup.jsx - Shop context → Express API: requests catalog/cart
frontend/src/Context/ShopContext.jsx - Administrator → Admin app: uses
README.md - Admin app → Admin routes: renders
admin/src/App.jsx - Admin routes → Add product: routes to
admin/src/Pages/Admin/Admin.jsx - Admin routes → Product list: routes to
admin/src/Pages/Admin/Admin.jsx - Add product → Express API: uploads and adds
admin/src/Components/AddProduct/AddProduct.jsx - Product list → Express API: lists and removes
admin/src/Components/ProductList/ProductList.jsx - Express API → Uploaded images: stores uploads
backend/app.js - Express API → MongoDB: reads and writes
backend/app.js