How siyam1809/pet-shop-management-system works
This is a full-stack pet-shop management system: customers browse pets and accessories, submit inquiries or appointments, place and track orders, while staff and administrators manage shop operations and deliveries. The React client routes users into public, admin, and rider experiences; its centralized API layer communicates with an Express REST API backed by MongoDB models. The README documents additional capabilities such as reviews, newsletter subscriptions, analytics, and email notifications. Some page and controller implementations were not sampled, so those branches are represented at their documented subsystem level; uncertain wiring is omitted.
Main entry points: server.js Express API · App.jsx Route application · db.js MongoDB · orderController.js Order workflow
Components 29
React client
- Route application
client/src/App.jsx - Public storefront
client/src/pages/Public - Admin workspace
client/src/pages/Admin - Rider workspace
client/src/pages/Rider - Auth state
client/src/context/AuthContext.jsx - Cart state
client/src/context/CartContext.jsx - API client
client/src/services/api.js
API and workflows
- Express API
server/server.js - Authentication routes
server/routes/authRoutes.js - Pet routes
server/routes/petRoutes.js - Order routes
server/routes/orderRoutes.js - Review routes
server/routes/reviewRoutes.js - Rider routes
server/routes/riderRoutes.js - Inquiry routes
server/routes/inquiryRoutes.js - Auth workflow
server/controllers/authController.js - Order workflow
server/controllers/orderController.js - Inquiry and booking
server/controllers/inquiryController.js - Delivery workflow
server/controllers/riderController.js
MongoDB domain
- MongoDB
server/config/db.js - User records
server/models/User.js - Pet records
server/models/Pet.js - Order records
server/models/Order.js - Customer records
server/models/Customer.js - Delivery records
server/models/Delivery.js - Review records
server/models/Review.js
External services
- Email notifications
server/utils/sendEmail.js
Other components
- Shop visitor
- Admin or staff
- Delivery rider
Connections 44
- Shop visitor → Route application: opens
client/src/App.jsx - Admin or staff → Route application: opens
client/src/App.jsx - Delivery rider → Route application: opens
client/src/App.jsx - Route application → Public storefront: routes to
client/src/App.jsx - Route application → Admin workspace: routes to
client/src/App.jsx - Route application → Rider workspace: routes to
client/src/App.jsx - Route application → Auth state: provides state
client/src/App.jsx - Route application → Cart state: provides state
client/src/App.jsx - Public storefront → API client: requests data
client/src/pages/Public/SubmitReview.jsx - Admin workspace → API client: manages records
client/src/pages/Admin/Reviews.jsx - Rider workspace → API client: updates deliveries
- Auth state → API client: calls
client/src/context/AuthContext.jsx - API client → Express API: calls REST API
README.md - Express API → Authentication routes: mounts
server/server.js - Express API → Pet routes: mounts
server/server.js - Express API → Order routes: mounts
server/server.js - Express API → Review routes: mounts
server/server.js - Express API → Rider routes: mounts
server/server.js - Express API → Inquiry routes: mounts
server/server.js - Authentication routes → Auth workflow: dispatches
server/routes/authRoutes.js - Order routes → Order workflow: dispatches
server/routes/orderRoutes.js - Inquiry routes → Inquiry and booking: dispatches
server/routes/inquiryRoutes.js - Rider routes → Delivery workflow: dispatches
server/routes/riderRoutes.js - Auth workflow → User records: reads and writes
server/controllers/authController.js - Order workflow → Order records: reads and writes
server/controllers/orderController.js - Order workflow → Pet records: reads
server/controllers/orderController.js - Order workflow → Customer records: reads and writes
server/controllers/orderController.js - Order workflow → Delivery records: reads and writes
server/controllers/orderController.js - Inquiry and booking → Order records: creates
server/controllers/inquiryController.js - Inquiry and booking → Pet records: reads
server/controllers/inquiryController.js - Inquiry and booking → Customer records: reads and writes
server/controllers/inquiryController.js - Inquiry and booking → Email notifications: sends notices
server/controllers/inquiryController.js - Order workflow → Email notifications: sends notices
server/controllers/orderController.js - Delivery workflow → Delivery records: reads and writes
server/controllers/riderController.js - Delivery workflow → Order records: reads
server/controllers/riderController.js - Delivery workflow → User records: reads
server/controllers/riderController.js - Review routes → Review records: reads and writes
server/routes/reviewRoutes.js - Express API → MongoDB: connects
server/server.js - MongoDB → User records: stores
- MongoDB → Pet records: stores
- MongoDB → Order records: stores
- MongoDB → Customer records: stores
- MongoDB → Delivery records: stores
- MongoDB → Review records: stores