How shreyas-sv1/local-shop-ordering-billing-system works
This is a React grocery-ordering application backed by an Express REST API and MySQL. Customers sign in, browse and search products, manage a cart, submit an order, and view order history or bills; admins manage products and orders, review dashboard statistics, and generate bills. The graph follows the documented product workflow and the sampled routing/controller code. Several frontend pages and the database connection are represented by their tree paths, but their implementation details were not sampled, so uncertain internal calls are omitted.
Main entry points: api.js HTTP API client · App.js React app and routes · Home.js Product browsing · AdminPanel.js Admin panel
Components 27
Customer storefront
- React app and routes
src/App.js - Product browsing
src/pages/Home.js - Product search
src/components/ProductSearch.js - Shopping cart
src/components/Cart.js - Order history
src/pages/OrderHistory.js - Customer bill view
src/components/CustomerBill.js
Identity and access
- Login
src/pages/Login.js - Signup
src/pages/Signup.js - Auth state
src/context/AuthContext.js
Admin operations
- Admin panel
src/admin/AdminPanel.js - Product management
src/admin/Products.js - Order management
src/admin/Orders.js - Dashboard statistics
src/admin/Dashboard.js - Bill generation
src/admin/BillGenerator.js
API and persistence
- HTTP API client
src/utils/api.js - Express API server
backend/server.js - Product routes
backend/routes/productRoutes.js - Order routes
backend/routes/orderRoutes.js - Auth routes
backend/routes/authRoutes.js - Product operations
backend/controllers/productController.js - Order and bill operations
backend/controllers/orderController.js - Auth operations
backend/controllers/authController.js - JWT and role checks
backend/middleware/authMiddleware.js - MySQL connection pool
backend/db.js - Shop data
backend/database.sql
Other components
- Customer
- Administrator
Connections 37
- Customer → React app and routes: uses
- Administrator → React app and routes: uses
- React app and routes → Product browsing: routes to
- React app and routes → Order history: routes to
- React app and routes → Login: routes to
- React app and routes → Signup: routes to
- React app and routes → Admin panel: routes to
- React app and routes → Auth state: provides auth
- Product browsing → Product search: filters products
- Product browsing → Shopping cart: manages cart
- Product browsing → HTTP API client: requests products and orders
- Order history → HTTP API client: requests orders
- Customer bill view → HTTP API client: requests bill
- Login → HTTP API client: submits credentials
- Signup → HTTP API client: submits registration
- Admin panel → Product management: presents
- Admin panel → Order management: presents
- Admin panel → Dashboard statistics: presents
- Order management → Bill generation: generates bill
- Product management → HTTP API client: manages products
- Order management → HTTP API client: manages orders
- Dashboard statistics → HTTP API client: requests statistics
- Bill generation → HTTP API client: requests bill operations
- HTTP API client → Express API server: sends HTTP requests
- Express API server → Product routes: dispatches products
- Express API server → Order routes: dispatches orders
- Express API server → Auth routes: dispatches auth
- Product routes → Product operations: dispatches handlers
- Order routes → Order and bill operations: dispatches handlers
- Auth routes → Auth operations: dispatches handlers
- Order routes → JWT and role checks: checks access
- Product routes → JWT and role checks: checks admin access
- Auth routes → JWT and role checks: checks identity
- Product operations → MySQL connection pool: queries products
- Order and bill operations → MySQL connection pool: queries orders and bills
- Auth operations → MySQL connection pool: queries users
- MySQL connection pool → Shop data: reads and writes