How jabir0331/cinnamonleaf works
This is a restaurant ordering and management application. Customers browse the menu, build a cart, check out, and review orders; they can also sign up, log in, and make reservations. Administrators manage menu items, categories, promotions, orders, customers, and analytics. The graph separates the React experience, its API boundary, and the Express/Mongoose backend. Source excerpts support selected backend calls; the empty README and unsampled client modules limit certainty about some customer and admin data flows.
Main entry points: server.js HTTP application · App.tsx Route application · auth.js Authentication routes · ProtectedAdminRoute.tsx Admin access guard
Components 27
Customer web app
- Route application
client/src/App.tsx - Menu browsing
client/src/pages/Menu.tsx - Cart and checkout
client/src/components/Cart.tsx - Reservations
client/src/pages/Reservation.tsx - Account access
client/src/services/auth.ts - Order history
client/src/pages/OrderHistory.tsx - Order result
client/src/pages/OrderSuccess.tsx
Admin experience
- Admin operations
client/src/pages/admin - Admin access guard
client/src/components/admin/ProtectedAdminRoute.tsx
API routing
- HTTP application
server/server.js - Authentication routes
server/routes/auth.js - Checkout routes
server/routes/checkout.js - Order routes
server/routes/order.js - Menu routes
server/routes/menu.js - Category routes
server/routes/category.js - Promotion routes
server/routes/promotion.js
Backend domain
- Authentication logic
server/controllers/authController.js - Order operations
server/controllers/orderController.js - Menu operations
server/controllers/menuController.js - Category operations
server/controllers/categoryController.js - Promotion operations
server/controllers/promotionController.js - Order records
server/models/Order.js - Menu records
server/models/MenuItems.js - Category records
server/models/Category.js - Promotion records
server/models/Promotion.js - User records
server/models/User.js
Other components
- Customer
Connections 25
- Customer → Route application: opens
client/src/App.tsx - Route application → Menu browsing: routes to
client/src/App.tsx - Route application → Reservations: routes to
client/src/App.tsx - Route application → Order history: routes to
client/src/App.tsx - Route application → Order result: routes to
client/src/App.tsx - Route application → Admin access guard: guards
client/src/App.tsx - Admin access guard → Admin operations: protects
client/src/App.tsx - Account access → Authentication routes: calls API
client/src/services/auth.ts - HTTP application → Authentication routes: mounts
server/server.js - HTTP application → Checkout routes: mounts
server/server.js - HTTP application → Order routes: mounts
server/server.js - HTTP application → Menu routes: mounts
server/server.js - HTTP application → Category routes: mounts
server/server.js - HTTP application → Promotion routes: mounts
server/server.js - Authentication routes → Authentication logic: dispatches
server/routes/auth.js - Order routes → Order operations: dispatches
server/routes/order.js - Menu routes → Menu operations: dispatches
server/routes/menu.js - Category routes → Category operations: dispatches
server/routes/category.js - Promotion routes → Promotion operations: dispatches
server/routes/promotion.js - Checkout routes → Order records: uses
server/routes/checkout.js - Order operations → Order records: reads/writes
server/controllers/orderController.js - Menu operations → Menu records: reads/writes
server/controllers/menuController.js - Category operations → Category records: reads/writes
server/controllers/categoryController.js - Promotion operations → Promotion records: reads/writes
server/controllers/promotionController.js - Authentication logic → User records: uses
server/controllers/authController.js