This scaffold covers only the remote customer browse → cart → checkout flow, per the project doc's phasing:
- R15 Browse menu
- R16 Add to cart
- R17 Specify quantity
- R18 Calculate total
- R19 Special instructions
- R20 Review order before confirming
- R21 Pickup vs. delivery
- R22 Choose payment method (selection only — no processing yet)
- R23 Modify cart before confirmation
- R24 Cancel before confirmation
- R25 Confirmation prompt on cancel
Auth (R8–R11), order tracking (R26–R30), payment processing (R31),
and admin/kitchen/cashier tooling are not part of this phase — the
schema is scaffolded for them (see supabase/schema.sql) so nothing
has to be migrated later, but no app code depends on them yet.
Next.js (App Router) · TypeScript · Tailwind · ShadCN · Supabase (Postgres + Auth + Storage) · Recharts (later, for admin) · Stripe/Paymongo (later, for R31)
-
Install dependencies
npm install
-
Create a Supabase project at https://supabase.com, then copy its URL and anon key.
-
Set up environment variables
cp .env.local.example .env.local # fill in NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY -
Apply the schema. In the Supabase SQL Editor, run
supabase/schema.sql, thensupabase/seed.sqlfor dev data. (Or via CLI:npx supabase db pushif you've linked the project.) -
Generate real DB types (replaces the placeholder in
types/database.types.ts):npx supabase login npx supabase link --project-ref <your-project-ref> npm run supabase:types
-
Run the dev server
npm run dev
Visit http://localhost:3000
app/ # Next.js App Router pages
layout.tsx
page.tsx # menu browsing entry point (R15)
globals.css
lib/
supabase/
client.ts # browser client — use in Client Components
server.ts # server client — use in Server Components/Route Handlers
types/
database.types.ts # generated Supabase types (placeholder until linked)
supabase/
schema.sql # full ERD from the project doc
seed.sql # dev seed data