Skip to content

Add React frontend for placing orders and watching live status - #12

Merged
devinder-dev merged 1 commit into
mainfrom
feature/frontend
Jun 22, 2026
Merged

devinder-dev merged 1 commit into
mainfrom
feature/frontend

Conversation

@devinder-dev

Copy link
Copy Markdown
Owner

Summary

  • New React + Vite + TypeScript frontend, its own 7th Docker container with a healthcheck: menu -> cart -> place order -> live-polling status screen (placed -> accepted -> ready) -> localStorage order history.
  • nginx now splits traffic: /api/* and /health -> gateway (unchanged), everything else -> the new frontend container. Still exactly one published port.
  • Not a graded requirement - additive, for manual click-testing before the oral defense.

Test plan

  • bun run typecheck clean (7 packages including frontend)
  • bun run test green (lib unit tests + happy-dom component tests for frontend, all other packages unchanged)
  • docker compose up --build: frontend reaches healthy, nginx remains the only published port
  • Full order flow verified through nginx: menu read, place order, placed -> accepted -> ready
  • SPA deep-link fallback verified (hard refresh on /orders/ returns 200, not 404)
  • serve.ts path-traversal attempts verified to fall through safely to the SPA shell, never leak a file
  • Snyk: 0 issues

Note

Per explicit request, not merging this automatically — waiting for a manual browser click-through first.

Adds a React + Vite + TypeScript frontend (its own 7th Docker container,
own Dockerfile, own healthcheck) so the system can be exercised by clicking
through a browser instead of only curl: menu -> cart -> place order -> a
status screen that polls GET /api/orders/:id live as it moves
placed -> accepted -> ready, plus a localStorage-backed order history.

nginx now splits traffic: /api/* and /health go to the gateway (unchanged
behavior), everything else goes to the new frontend container. nginx
remains the system's only published port; the frontend has no published
port of its own, same invariant as every backend service.

Frontend tests are split the same way the rest of the repo is: pure logic
unit tests (lib/) and component-rendering tests (happy-dom + Testing
Library) - both run under bun test, no separate test runner.

Not a graded requirement - additive, for manual verification before the
oral defense.
@devinder-dev
devinder-dev merged commit d8cf494 into main Jun 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant