From 35af83b07c99869b615eb3f9859144749a3ffa8b Mon Sep 17 00:00:00 2001 From: devinderstockholm3219gmailcom Date: Mon, 22 Jun 2026 22:12:39 +0300 Subject: [PATCH 1/8] feat(frontend): Greek taverna theme, real order history, live-update explanation Reseeds the menu with Greek dishes (Gyros, Souvlaki, Greek Salad, Moussaka) instead of placeholder pizza, and redesigns the frontend around a Mediterranean color palette with food-emoji menu cards instead of a plain list. Order history now stores a snapshot of what was actually submitted (items + total, captured at placement time from the same cart lines sent to POST /api/orders) instead of just a bare order id, so the history page shows "2x Gyros, 1x Greek Salad - $31.00" rather than a raw UUID. The order status screen now explains how the live update actually works ("checking every 1.5s" while polling, "the kitchen service published an event over RabbitMQ" once ready) instead of just showing a stage tracker with no explanation of the mechanism. --- README.md | 2 +- frontend/src/components/MenuList.tsx | 50 ++-- frontend/src/components/OrderStatus.tsx | 10 +- frontend/src/lib/dishInfo.ts | 20 ++ frontend/src/lib/orderHistory.ts | 14 +- frontend/src/pages/MenuPage.tsx | 13 +- frontend/src/pages/OrderHistoryPage.tsx | 21 +- frontend/src/styles.css | 230 ++++++++++++++++-- frontend/tests/components/Cart.test.tsx | 4 +- frontend/tests/components/MenuList.test.tsx | 34 ++- .../components/OrderHistoryPage.test.tsx | 35 +++ .../tests/components/OrderStatus.test.tsx | 8 +- frontend/tests/lib/dishInfo.test.ts | 16 ++ frontend/tests/lib/orderHistory.test.ts | 34 ++- services/menu/src/db.ts | 6 +- services/menu/tests/menu.test.ts | 4 +- 16 files changed, 418 insertions(+), 83 deletions(-) create mode 100644 frontend/src/lib/dishInfo.ts create mode 100644 frontend/tests/components/OrderHistoryPage.test.tsx create mode 100644 frontend/tests/lib/dishInfo.test.ts diff --git a/README.md b/README.md index 2d5c5d1..91ea10b 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Redis are not reachable from the host with this command. # Place an order curl -X POST http://localhost/api/orders \ -H 'content-type: application/json' \ - -d '{"customerId":"33333333-3333-3333-3333-333333333333","items":[{"menuItemId":"44444444-4444-4444-4444-444444444444","name":"Margherita","quantity":2,"priceCents":1200}]}' + -d '{"customerId":"33333333-3333-3333-3333-333333333333","items":[{"menuItemId":"44444444-4444-4444-4444-444444444444","name":"Gyros","quantity":2,"priceCents":1100}]}' # Check its status (replace with the orderId from the response above) curl http://localhost/api/orders/ diff --git a/frontend/src/components/MenuList.tsx b/frontend/src/components/MenuList.tsx index d8d4049..15b8ff0 100644 --- a/frontend/src/components/MenuList.tsx +++ b/frontend/src/components/MenuList.tsx @@ -1,3 +1,4 @@ +import { getDishInfo } from "../lib/dishInfo.ts"; import { formatCents } from "../lib/money.ts"; import type { MenuItem } from "../types.ts"; @@ -12,27 +13,36 @@ export function MenuList({ items, quantities, onChangeQuantity }: Props) {