Add the customer ordering page
Builds the main customer-facing flow: browse the Brand's menu, add items to a cart, and check out either as a guest (name + contact) or, if signed in, as the account customer — both call the existing placeOrder server function, which already distinguishes the two. On success, navigates to a new /orders/$orderId status page showing each Order Item's Preparation Steps, queue position, ETA, and (per the domain rules already established) a Cancel button while cancellable and a pickup-confirmation button once ready. Styled with SCSS Modules per CLAUDE.md; added the sass dependency and the src/styles/ structure it describes (globals.scss imported once in __root.tsx, alongside the existing Tailwind stylesheet the not-yet- mounted header-user.tsx component depends on). Verified end-to-end against a throwaway local Postgres: menu renders with seeded items, cart quantities update, guest checkout places a real order, and the status page reflects a real cancellation. Also fixes CLAUDE.md's Commands section, which documented pnpm even though this repo only has npm (package-lock.json, no pnpm installed). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,17 +12,17 @@ Guidance for Claude Code when working in this repository.
|
||||
- Vite
|
||||
- SCSS Modules
|
||||
- Drizzle ORM + PostgreSQL
|
||||
- [Auth: Better Auth / Clerk / custom / none yet]
|
||||
- [Package manager: pnpm / npm / bun]
|
||||
- Better Auth
|
||||
- npm
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
pnpm dev # start dev server (http://localhost:3000)
|
||||
pnpm build # production build
|
||||
pnpm typecheck # tsc --noEmit
|
||||
pnpm lint # eslint
|
||||
pnpm test # [test runner, e.g. vitest]
|
||||
npm run dev # start dev server (http://localhost:3000)
|
||||
npm run build # production build
|
||||
npm run typecheck # tsc --noEmit
|
||||
npm run lint # eslint
|
||||
npm test # vitest run
|
||||
```
|
||||
|
||||
Always run `typecheck` and `lint` before considering a task done. If `build`
|
||||
|
||||
Reference in New Issue
Block a user