How alamid-xii/japz_mobile_pos works
Japz is a restaurant point-of-sale and operations system: cashier staff create and pay for orders, kitchen staff prepare them, and administrators manage operations and review sales and customer feedback. The web app routes role-based screens through a shared API client to the backend; backend routes implement operations over relational models. Feedback analysis and Google Sheets synchronization are distinct capabilities. The graph reflects shown imports, calls, and route setup; some feature links are dashed because their implementations were not sampled.
Main entry points: index.js Business API routes · api.ts API client · App.tsx Role-based routes · feedbackModel.js Feedback records
Components 25
Web application
- Role-based routes
japz-web/src/App.tsx - Authentication state
japz-web/src/hooks/useAuth.tsx - API client
japz-web/src/services/api.ts - Admin operations
japz-web/src/pages/admin - Cashier POS
japz-web/src/pages/cashier/POS.tsx - Kitchen workflow
japz-web/src/pages/kitchen/Incoming.tsx - Public feedback
japz-web/src/pages/public/Feedback.tsx
Backend API
- HTTP server
japz-backend/index.js - Business API routes
japz-backend/routes/index.js - Authentication handlers
japz-backend/controllers/authController.js - Orders and payments
japz-backend/routes/index.js - Menu and inventory
japz-backend/routes/index.js - Feedback handling
japz-backend/controllers/feedbackController.js - Email verification
japz-backend/services/emailService.js
Operational data
- MySQL database
japz-backend/models/db.js - Operational models
japz-backend/models - Feedback records
japz-backend/models/feedbackModel.js - Order records
japz-backend/models/orderModel.js - Audit logging
japz-backend/models/logModel.js
Feedback insights
- Sentiment analysis
japz-backend/services/gemmaService.js - Feedback processing
japz-backend/services/feedbackService.js - Analysis utilities
japz-backend/services/aiAnalysisService.js - Sheets integration
japz-backend/services/googleSheetsService.js
Other components
- Restaurant staff
- Feedback customer
Connections 33
- Restaurant staff → Role-based routes: uses
japz-web/src/App.tsx - Role-based routes → Authentication state: provides auth
japz-web/src/App.tsx - Role-based routes → Admin operations: routes admin
japz-web/src/App.tsx - Role-based routes → Cashier POS: routes cashier
japz-web/src/App.tsx - Role-based routes → Kitchen workflow: routes kitchen
japz-web/src/App.tsx - Authentication state → API client: calls auth API
japz-web/src/hooks/useAuth.tsx - Admin operations → API client: calls API
japz-web/src/pages/admin/MenuInventory.tsx - Cashier POS → API client: calls API
japz-web/src/pages/cashier/POS.tsx - Kitchen workflow → API client: calls API
japz-web/src/pages/kitchen/Incoming.tsx - Feedback customer → Public feedback: submits feedback
japz-web/src/pages/public/Feedback.tsx - Public feedback → API client: calls API
japz-web/src/pages/public/Feedback.tsx - API client → Business API routes: HTTP requests
- HTTP server → Business API routes: mounts routes
japz-backend/index.js - Business API routes → Authentication handlers: dispatches auth
japz-backend/routes/index.js - Business API routes → Orders and payments: handles orders
japz-backend/routes/index.js - Business API routes → Menu and inventory: handles catalog
japz-backend/routes/index.js - Business API routes → Feedback handling: dispatches feedback
- Authentication handlers → Operational models: queries users
japz-backend/controllers/authController.js - Orders and payments → Order records: persists orders
japz-backend/routes/index.js - Menu and inventory → Operational models: uses models
japz-backend/routes/index.js - Feedback handling → Feedback records: queries feedback
japz-backend/controllers/feedbackController.js - Feedback handling → Order records: looks up order
japz-backend/controllers/feedbackController.js - Feedback handling → Sentiment analysis: analyzes comment
japz-backend/controllers/feedbackController.js - Feedback processing → Feedback records: processes records
japz-backend/services/feedbackService.js - Feedback processing → Sentiment analysis: uses analysis
japz-backend/services/feedbackService.js - Sentiment analysis → Feedback customer: requests model analysis
- Operational models → MySQL database: uses connection
japz-backend/models/db.js - Feedback records → MySQL database: stores records
japz-backend/models/feedbackModel.js - Order records → MySQL database: stores orders
japz-backend/models/orderModel.js - Business API routes → Audit logging: writes audit logs
japz-backend/routes/index.js - Sheets integration → Feedback records: reads feedback
japz-backend/services/googleSheetsService.js - Analysis utilities → Feedback records: supports analysis
- Business API routes → Email verification: sends verification
japz-backend/routes/index.js