How aikyaa/product_store_mern works
Product Store is a MERN application for product CRUD and user registration/login. The user-facing workflow is routed through a React interface; backend Express routes dispatch requests to controllers, which use Mongoose models for product and user data. The server also initializes the MongoDB connection. The README identifies error handling as a capability, implemented in the sampled controllers. Frontend API/store wiring is not shown, so no client-to-backend request edges are asserted.
Main entry points: App.jsx App Routes · server.js Express Server · HomePage.jsx Product Listing · Navbar.jsx Navigation
Components 21
Frontend
- React Entry
frontend/src/main.jsx - App Routes
frontend/src/App.jsx - Product Listing
frontend/src/pages/HomePage.jsx - Product Card
frontend/src/components/ProductCard.jsx - Product Editor
frontend/src/pages/CreatePage.jsx - Navigation
frontend/src/components/Navbar.jsx - Color Mode
frontend/src/components/ui/color-mode.jsx - Product State
frontend/src/store - User State
frontend/src/store - Login Screen
frontend/src/pages/LoginPage.jsx - Registration Screen
frontend/src/pages/RegisterPage.jsx
Product Management
- Product Routes
backend/routes/products.route.js - Product Controller
backend/controller/products.controller.js - Product Model
backend/models/products.model.js
User Accounts
- Account Routes
backend/routes/users.routes.js - Account Controller
backend/controller/users.controller.js - User Model
backend/models/users.model.js
Backend Runtime
- Express Server
backend/server.js - DB Connector
backend/config/db.js - MongoDB
Other components
- User
Connections 18
- User → App Routes: uses
- React Entry → App Routes: renders
frontend/src/main.jsx - App Routes → Product Listing: routes to
frontend/src/App.jsx - App Routes → Product Editor: routes to
frontend/src/App.jsx - App Routes → Login Screen: routes to
frontend/src/App.jsx - App Routes → Registration Screen: routes to
frontend/src/App.jsx - App Routes → Navigation: renders
frontend/src/App.jsx - App Routes → Color Mode: uses
frontend/src/App.jsx - Product Listing → Product Card: renders
- Navigation → Color Mode: uses
frontend/src/components/Navbar.jsx - Express Server → Product Routes: mounts
backend/server.js - Express Server → Account Routes: mounts
backend/server.js - Express Server → DB Connector: connects via
backend/server.js - DB Connector → MongoDB: connects
backend/config/db.js - Product Routes → Product Controller: dispatches
backend/routes/products.route.js - Product Controller → Product Model: queries
backend/controller/products.controller.js - Account Routes → Account Controller: dispatches
backend/routes/users.routes.js - Account Controller → User Model: queries
backend/controller/users.controller.js