How maadhavagarwal/restuarat_mad_project works
This repository contains three restaurant-management implementations: a Kotlin desktop/web POS and REST service, an Android client for that service, and a Next.js restaurant-operations app with customer, staff, booking, and account areas. The clearest end-to-end workflow is cashier menu selection and checkout, followed by kitchen-ticket and table updates. Other documented-by-tree capabilities include analytics, customer lookup, authentication, reservations, receipts, and browser-to-Supabase synchronization. Some routes and screens are unsampled, so their internal wiring is not inferred.
Main entry points: ApiController.kt Restaurant REST API · RestaurantRepository.kt Restaurant Operations · dbClient.ts Account and Booking Data · MainActivity.kt Mobile POS UI
Components 28
Android Client
- Mobile POS UI
kotlin-restaurant-mobile/app/src/main/java/com/restaurant/mobile/MainActivity.kt - REST API Client
kotlin-restaurant-mobile/app/src/main/java/com/restaurant/mobile/api/ApiClient.kt - Mobile Models
kotlin-restaurant-mobile/app/src/main/java/com/restaurant/mobile/model/Models.kt
Kotlin Restaurant OS
- Restaurant REST API
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/controller/ApiController.kt - Restaurant Operations
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/repository/RestaurantRepository.kt - Restaurant Models
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/model/Models.kt - POS and KDS UI
kotlin-restaurant-os/src/main/resources/static/app.js - Menu Catalog
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/controller/ApiController.kt - Order Checkout
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/controller/ApiController.kt - Kitchen Tickets
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/controller/ApiController.kt - Table Management
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/controller/ApiController.kt - Customer Lookup
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/controller/ApiController.kt - Sales Analytics
kotlin-restaurant-os/src/main/kotlin/com/restaurant/restaurant_os/controller/ApiController.kt
Next.js Operations
- Customer Portal
os/src/app/customer/page.tsx - Customer Profile
os/src/app/customer/profile/page.tsx - Reservations
os/src/app/customer/reservations/page.tsx - Kitchen Screen
os/src/app/kitchen/page.tsx - Tables Screen
os/src/app/tables/page.tsx - Account Auth
os/src/app/api/auth/register/route.ts - Login Route
os/src/app/api/auth/login/route.ts - Booking Route
os/src/app/api/email/booking/route.ts - Receipt Route
os/src/app/api/email/receipt/route.ts
Persistence and Sync
- Account and Booking Data
os/src/lib/dbClient.ts - Offline Local Store
os/src/db/db.ts - Background Sync
os/src/db/syncService.ts
Other components
- Cashier
- Supabase
os/src/lib/supabaseClient.ts - Restaurant Guest
Connections 27
- Cashier → Mobile POS UI: uses
- Mobile POS UI → REST API Client: requests data
- REST API Client → Restaurant REST API: calls REST
- Mobile POS UI → Mobile Models: renders
- POS and KDS UI → Restaurant REST API: fetches API
- Restaurant REST API → Restaurant Operations: invokes
- Restaurant REST API → Restaurant Models: uses models
- REST API Client → Restaurant Models: exchanges JSON
- Restaurant REST API → Menu Catalog: serves menu
- Restaurant REST API → Order Checkout: submits orders
- Restaurant REST API → Kitchen Tickets: serves tickets
- Restaurant REST API → Table Management: serves tables
- Restaurant REST API → Customer Lookup: serves customers
- Restaurant REST API → Sales Analytics: serves metrics
- Order Checkout → Restaurant Operations: creates order
- Restaurant Operations → Kitchen Tickets: creates KOT
- Restaurant Operations → Table Management: updates occupancy
- Restaurant Operations → Customer Lookup: updates loyalty
- Restaurant Guest → Customer Portal: uses portal
- Restaurant Guest → Reservations: requests booking
- Account Auth → Account and Booking Data: queries and saves
- Login Route → Account and Booking Data: finds account
- Booking Route → Account and Booking Data: saves booking
- Receipt Route → Restaurant Guest: returns receipt status
- Background Sync → Offline Local Store: reads and updates
- Background Sync → Supabase: upserts records
- Account and Booking Data → Supabase: queries and inserts