Skip to content

Developer Onboarding

Day-one setup to get the app, the backend, and this portal running locally.

Prerequisites (verify & bootstrap before any build/deploy step)

Do not proceed with a step whose tool is absent. Install/enable whatever is missing per-OS.

ToolWhyNotes
git + GitHub CLI (gh)source + PRs
Node 22 + npmapp build/test.nvmrc pins 22; use nvm/nvm-windows.
DenoEdge Function tests / deno checknpm run test:ef.
Supabase CLIlocal DB, migrations, EF deploynpx supabase.
Docker Desktoplocal Supabase stack, E2E stack, local SonarQube
wranglerCloudflare Pagesa devDependency.
Playwright browsersE2E (planned)npx playwright install --with-deps chromium.

Install missing tools via winget/choco/scoop (Windows), Homebrew (macOS), or official installers.

First run

bash
nvm use              # Node 22
npm install
npm run dev          # app on http://localhost:3000

.env.test (committed, dummy values only) supplies VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY so the Supabase client doesn't throw under test. For a real dev run you need the DEV project's VITE_SUPABASE_* in .env.local — see Environment Strategy.

Everyday commands

CommandPurpose
npm run devVite dev server (port 3000).
npm run buildGenerates public/llms.txt, then vite builddist/.
npm run type-checktsc --noEmit (project-wide).
npm run lintESLint --quiet (project-wide).
npm run lint:fixESLint --fix, scoped to digital-menu.
npm testFull Vitest suite.
npm run test:watchVitest watch mode.
npm run test:coverageCoverage (70% lines / 80% functions).
npm run test:efDeno edge-function tests.
npm run functions:deploy -- --project-ref <ref>Deploy Edge Functions (explicit ref required).

Run a single test file: npx vitest run path/to/file.test.tsx.

Planned scripts (added by later phases): test:db (pgTAP), e2e:* (Playwright).

Running this portal locally

The docs are a separate, internal-only VitePress app under documentation/portal/. They are never part of the production build.

bash
# one-time:
npm --prefix documentation/portal install

# from repo root:
npm run docs:gen     # regenerate auto-generated reference pages (EF index)
npm run docs:dev     # serve the portal locally
npm run docs:build   # build static HTML (offline-viewable)

Mental model in 30 seconds

  1. Data Access Strategy — the one hard rule.
  2. Tier System — how the codebase is organised.
  3. Backend / Edge Functions — the EF model + shared kit.
  4. Coding Standards — what reviewers enforce.
  5. Adding a Feature — the end-to-end recipe.