How banothunithin/kot_ai works
PrimeOps is a restaurant operations app centered on menu ordering, kitchen order tickets (KOTs), inventory reservations, payment, and invoicing, with authentication and AI inventory insights. The UI’s App component coordinates state and presents role-oriented views; the server handles authentication, AI requests, payments, and invoices backed by MySQL. The README documents stock reservation, deduction, and reversal behavior, but the corresponding implementation is not shown in the excerpts. Edges reflect excerpted calls, source-index references, or README statements; unsampled payment wiring is marked unverified.
Main entry points: App.tsx App coordinator · server.js Express server · KOTList.tsx KOT list · invoices.js Invoice routes
Components 21
Operations UI
- App coordinator
App.tsx - Login
components/Login.tsx - Registration
components/Register.tsx - Delivery dashboard
components/DeliveryStats.tsx - Active orders view
components/ActiveOrdersDashboard.tsx - Alerts panel
components/AlertsPanel.tsx
Ordering and Stock
- Menu ordering
components/MenuGrid.tsx - KOT list
components/KOTList.tsx - Inventory table
components/InventoryTable.tsx - Inventory detail
components/InventoryModal.tsx - Inventory insight client
services/geminiServices.ts
Backend Services
- Express server
server/server.js
Accounts and Records
- Authentication routes
server/routes/auth.js - Payment routes
server/routes/payments.js - Payment interface
components/RazorpayPayment.tsx - Invoice routes
server/routes/invoices.js - Invoice PDF service
server/services/pdfService.js - MySQL database
server/db/connection.js
Other components
- Restaurant staff
- Groq AI
- Payment gateway
Connections 24
- Restaurant staff → App coordinator: uses
README.md - App coordinator → Login: renders
App.tsx - App coordinator → Registration: renders
App.tsx - App coordinator → Menu ordering: coordinates
App.tsx - App coordinator → KOT list: coordinates
App.tsx - App coordinator → Inventory table: renders
App.tsx - App coordinator → Inventory detail: renders
App.tsx - App coordinator → Alerts panel: renders
App.tsx - App coordinator → Delivery dashboard: renders
App.tsx - App coordinator → Active orders view: renders
App.tsx - Menu ordering → App coordinator: submits order
README.md - App coordinator → Inventory insight client: requests insight
App.tsx - Inventory insight client → Express server: posts prompt
services/geminiServices.ts - Express server → Groq AI: requests analysis
server/server.js - KOT list → Payment interface: renders payment
components/KOTList.tsx - KOT list → App coordinator: requests payment
components/KOTList.tsx - Payment interface → Payment gateway: processes payment
- Express server → Authentication routes: mounts routes
server/server.js - Express server → Invoice routes: mounts routes
server/server.js - Express server → Payment routes: mounts routes
server/server.js - Authentication routes → MySQL database: reads and writes
server/routes/auth.js - Invoice routes → MySQL database: reads and writes
server/routes/invoices.js - Invoice routes → Invoice PDF service: generates PDF
server/routes/invoices.js - Payment routes → Authentication routes: uses authentication
server/routes/payments.js