==================================================================== PETZY — REMAINING WORK PLAN Goal: close every gap between the original petzy PROMPT.txt module list (54 modules) and the current build, so every module has BOTH a real backend API (already true for all 54) AND a working frontend page. GST/Tax admin is called out explicitly by the user and is Phase 1. ==================================================================== STATUS UPDATE (post-build): Phases 1-6 are DONE and verified live (built, backend-checked, production-built, and crawled end-to-end with a real headless browser — see README.md section 10/11). One real bug was found this way (QR admin API mounted before the auth middleware, causing a 500) and fixed. Phase 7 remains partially open — see README.md section 11 "Known Remaining Work" for the current, accurate list of what's left. This file is kept as the historical plan the build was executed against; treat README.md section 11 as the source of truth for what's still outstanding. ==================================================================== STATUS KEY: [BE] backend done (verified) | [FE] frontend done | [ ] to build -------------------------------------------------------------------- PHASE 1 — BILLING CONFIGURATION (GST / Tax / Discounts / Coupons) -------------------------------------------------------------------- 1. Tax (GST) admin page [BE][ ] - Route: frontend/src/pages/settings/Taxes.jsx - List/create/edit CGST/SGST/IGST/CESS/OTHER, rate, inclusive flag - Table: `taxes`, API: /api/taxes (already implemented) - Assign a tax to a menu item / room type via existing item/room-type forms 2. Discounts admin page [BE][ ] - Route: frontend/src/pages/settings/Discounts.jsx - Percentage/fixed, applies_to order|item, max_discount_amount - API: /api/discounts (implemented) 3. Coupons admin page [BE][ ] - Route: frontend/src/pages/settings/Coupons.jsx - Code, type, value, min order, validity window, usage limit - API: /api/discounts/coupons (implemented) 4. POS cart: apply discount / coupon [BE][ ] - Discount button in POS cart footer -> modal: pick a saved discount OR type a coupon code -> recompute via existing order-creation pricing engine (already supports `discount` param) - Respect role.max_discount_percent (already enforced server-side) -------------------------------------------------------------------- PHASE 2 — MENU MANAGEMENT (Categories / Items / Variations / Add-ons / Modifiers / Combos / Kitchen Stations) -------------------------------------------------------------------- 5. Menu Management admin [BE][ ] - frontend/src/pages/menu/Categories.jsx — CRUD categories - frontend/src/pages/menu/MenuItems.jsx — list + item editor modal with nested variations/add-ons/modifiers repeaters, tax_id and station_id pickers, food_type, image upload (mediaService) - frontend/src/pages/menu/Combos.jsx — combo CRUD + combo-items picker (uses the combo-items route added this session) - frontend/src/pages/menu/KitchenStations.jsx — station CRUD - Add "Menu" to Sidebar nav (currently missing as its own entry — folded into Settings or a new top-level item) 6. POS cart: add-on / modifier picker [BE][ ] - Extend the existing variation-picker modal in POS.jsx to also show add-ons (checkbox, min/max) and modifiers (checkbox) when the clicked item has them, before adding to cart - orderPricingService already prices addon_ids/modifier_ids — purely a frontend gap -------------------------------------------------------------------- PHASE 3 — INVENTORY & PURCHASE -------------------------------------------------------------------- 7. Suppliers admin page [BE][ ] - frontend/src/pages/purchase/Suppliers.jsx (DataTable + modal form) 8. Purchase Orders + Goods Receipt (Invoice) forms [BE][ ] - Extend Purchases.jsx: "New PO" modal (supplier + line items), "Receive Goods" modal that posts a purchase invoice (auto stock +) 9. Stock Transfers page [BE][ ] - frontend/src/pages/inventory/StockTransfers.jsx — create transfer (from/to outlet + items), status stepper (draft->requested->approved->dispatched->received) 10. Wastage page [BE][ ] - frontend/src/pages/inventory/Wastage.jsx — log wastage, reason, cost auto-computed, list of past entries 11. Recipes page [BE][ ] - frontend/src/pages/inventory/Recipes.jsx — pick a menu item, edit ingredient list (inventory_item, qty, unit, cost), shows computed food cost -------------------------------------------------------------------- PHASE 4 — HOTEL EXTRAS -------------------------------------------------------------------- 12. Hotel Room Types admin [BE][ ] - frontend/src/pages/hotel/RoomTypes.jsx — CRUD + amenities repeater 13. Guests list page [BE][ ] - frontend/src/pages/hotel/Guests.jsx — DataTable of hotel_guests, create/edit (no public document exposure — matches spec §155) 14. Reservations pages [BE][ ] - frontend/src/pages/hotel/HotelReservations.jsx — list + create (date range, room type, guest picker) - frontend/src/pages/tables/RestaurantReservations.jsx — table booking list + create 15. Hotel Folio detail/print view [BE][ ] - frontend/src/pages/hotel/FolioView.jsx — full itemized folio, "post charge" form (laundry/minibar/other), print-friendly -------------------------------------------------------------------- PHASE 5 — ADMIN / OPS -------------------------------------------------------------------- 16. Roles & Permissions admin [BE][ ] - frontend/src/pages/settings/Roles.jsx — role list, permission checkbox matrix per role, max_discount_percent field 17. Expenses page [BE][ ] - frontend/src/pages/expenses/Expenses.jsx — DataTable + create form 18. Cash Register page [BE][ ] - frontend/src/pages/settings/CashRegister.jsx — open/close session, running cash transactions list 19. Day End page [BE][ ] - frontend/src/pages/reports/DayEnd.jsx — trigger close, show the generated report (gross/net sales, tender breakdown, KOT count, cash variance) 20. Notifications dropdown [BE][ ] - Wire the existing bell icon in Topbar.jsx to fetch /api/notifications, show unread count, mark-as-read on open 21. Audit Log viewer [BE][ ] - frontend/src/pages/settings/AuditLogs.jsx — filterable table (module, user, date), JSON diff viewer for old/new data -------------------------------------------------------------------- PHASE 6 — ONLINE / QR / MEDIA -------------------------------------------------------------------- 22. Online Orders admin [BE][ ] - frontend/src/pages/online/OnlineOrders.jsx — incoming order queue with status buttons (accept/preparing/ready/out-for- delivery/completed/cancelled) 23. QR Ordering admin [BE][ ] - frontend/src/pages/online/QrMenus.jsx — create a QR menu per outlet/table, show/download the QR image (generate client-side with a small QR-drawing routine, no external service call) 24. Media library [BE][ ] - frontend/src/pages/settings/Media.jsx — upload (Multer+Sharp endpoint already built), grid of uploaded images, copy-URL -------------------------------------------------------------------- PHASE 7 — CROSS-CUTTING POLISH -------------------------------------------------------------------- 25. Sidebar nav — add Menu, Purchase sub-items (Suppliers/Transfers/ Wastage/Recipes), Settings sub-nav (Taxes/Discounts/Roles/Audit/ Media/Cash Register) so every new page is reachable 26. Company/Outlet edit forms in Settings (currently read-only-ish) 27. Printers & Printer Routing admin (already has API, add UI) 28. Re-run full production build + a live browser pass over the new pages (screenshot spot-checks) before calling this phase done 29. Update README.md module table + docs/API.md if any new routes are added while building UI (e.g. notifications mark-all-read) -------------------------------------------------------------------- BUILD ORDER FOR THIS SESSION (priority, matches user's ask) -------------------------------------------------------------------- 1. Phase 1 (GST/Tax + Discounts + Coupons) — explicitly requested 2. Phase 2 (Menu Management — the single biggest visible gap) 3. Phase 3 (Purchase/Inventory extras) 4. Phase 4 (Hotel extras) 5. Phase 5 (Admin/Ops) 6. Phase 6 (Online/QR/Media) — lowest priority, most "nice to have" 7. Phase 7 polish + final verification pass Every new list page reuses the existing DataTable + useApiList pattern; every create/edit form reuses Modal + Input/Select/Textarea + the existing service-layer Axios wrappers. No new UI framework, no new patterns — strictly extending what's already in the codebase.