How ngocquy2610/restaurant_management works
This is a Rails restaurant operations application, spanning table layout and reservations through preorders, active dining orders, kitchen fulfillment, payments, and customer queues. The main workflow begins with a customer booking a table and optionally preordering; staff manage the booking and timed kitchen release, while kitchen staff advance order items and the restaurant records payment. Administration also configures menus and floor plans, and the app provides promotions, notifications, dashboards, and account access. The graph emphasizes documented routes and sampled controller ownership; unsampled subsystem wiring is intentionally limited.
Main entry points: order.rb Orders and items · controllers/reservations_controller.rb Reservation flow · admin/reservations_controller.rb Reservation review · payments_controller.rb Payments and bills
Components 27
Booking and seating
- Reservation flow
app/controllers/reservations_controller.rb - Reservation review
app/controllers/admin/reservations_controller.rb - Reservations
app/models/reservation.rb - Floor tables
app/controllers/tables_controller.rb - Tables and areas
app/models/table.rb - Walk-in queue
app/services/customer_queue_manager.rb - Queue entries
app/models/customer_queue.rb
Orders and kitchen
- Preorders
app/controllers/preorders_controller.rb - Timed release
app/jobs/preorder_release_job.rb - Order management
app/controllers/orders_controller.rb - Orders and items
app/models/order.rb - Kitchen queue
app/controllers/admin/kitchen_queues_controller.rb - Payments and bills
app/controllers/payments_controller.rb - Payment records
app/models/payment.rb
Catalog and layout
- Menu management
app/controllers/menus_controller.rb - Menu and recipes
app/models/food.rb - Ingredients
app/models/ingredient.rb - Table layout editor
app/javascript/controllers/table_wizard_controller.js - Floor canvas
app/javascript/controllers/table_canvas_controller.js
Accounts and insights
- Sign-in
app/controllers/users/sessions_controller.rb - Users
app/models/user.rb - Notifications
app/controllers/notifications_controller.rb - Promotions
app/controllers/promotions_controller.rb - Dashboard
app/controllers/dashboards_controller.rb
Other components
- Customer
- Staff
- Stripe
Connections 34
- Customer → Reservation flow: books table
- Reservation flow → Reservations: creates and updates
- Reservation flow → Tables and areas: reads availability
- Reservation flow → Preorders: offers preorder
- Staff → Reservation review: reviews bookings
- Reservation review → Reservations: updates status/table
- Reservation review → Timed release: reschedules release
- Reservation review → Notifications: sends notice
- Staff → Floor tables: manages tables
- Floor tables → Tables and areas: reads and writes
- Table layout editor → Floor canvas: dispatches shape
- Floor canvas → Floor tables: edits geometry
- Staff → Walk-in queue: seats walk-ins
- Walk-in queue → Queue entries: creates and seats
- Walk-in queue → Orders and items: creates dine-in order
- Customer → Preorders: submits dishes
- Preorders → Orders and items: creates preorder
- Timed release → Orders and items: releases to kitchen
- Customer → Order management: places order
- Order management → Orders and items: creates and updates
- Staff → Kitchen queue: fulfills orders
- Kitchen queue → Orders and items: reads and updates items
- Kitchen queue → Ingredients: reads recipe quantities
- Customer → Payments and bills: pays bill
- Payments and bills → Payment records: creates payment
- Payments and bills → Stripe: processes charge
- Payments and bills → Orders and items: updates order totals
- Staff → Menu management: maintains menu
- Menu management → Menu and recipes: manages catalog
- Staff → Sign-in: signs in
- Sign-in → Users: authenticates
- Customer → Notifications: views notices
- Customer → Promotions: browses offers
- Staff → Dashboard: reviews operations