Supplementary detail for Little Lemon (Web) — kept out of the README so it stays lean.
| Command | What it does |
|---|---|
npm start / npm run dev |
Start the Vite dev server |
npm test |
Run the Vitest + Testing Library suite |
npm run lint |
Lint (React, Hooks, jsx-a11y rules) |
npm run format |
Format with Prettier |
npm run build |
Production build to dist/ |
npm run deploy |
Build and publish to GitHub Pages |
Every push and pull request runs format → lint → test → build in CI.
src/
components/ UI, the booking form, and the times reducer
styles/ per-component CSS
api.js mock reservations API (Meta spec)
Keyboard-operable throughout, a focus-trapped contact dialog that restores
focus on close, ARIA-described form errors, alt text on every image, and
labelled star ratings.
12 tests (Vitest + React Testing Library) cover the booking flow — valid submits pass the data through, invalid and past-date submits are blocked, and changing the date requests that day's times.
Done: an error boundary around the routes, the booking reducer split into its own module (Fast Refresh), lazy-loaded below-the-fold images, a full TypeScript migration (source is 100% TypeScript, type-checked in CI), and broader test coverage (nav + contact dialog).
Planned:
- Surface submit failures in the UI (once the API can actually fail)