尚未检测到更新。GitHub 发布版本后会显示在这里。
QR digital menu for restaurants — bilingual EN/KA menu + staff admin panel. Next.js · Supabase · Tailwind · Vitest
翻译准备中
正在加载完整 README。
查看完整 README ↗QR digital menu for MIORA: guests scan a table QR and browse a bilingual
(EN/KA) menu on their phone. Staff manage items and categories at /admin.
cp .env.example .env
npm install
npm run dev
Apply database migrations (Supabase Dashboard → SQL Editor), in order:
supabase/migrations/001_menu.sqlsupabase/migrations/002_admin.sqlSeed the menu and create an admin user — see supabase/README.md.
Without Supabase configured, development falls back to local seed data so
UI work can continue. Production fails closed unless ALLOW_SEED_FALLBACK=true.
The guest menu is read from Supabase once and cached until it changes: every
admin write drops the cache by tag. There is no timed refresh, so an untouched
menu costs no database reads at all. A change made outside the admin panel (SQL
editor, npm run seed) is the exception — save anything in the admin panel, or
deploy, to pick it up.
Dish photos go through next/image, so the host fetches each one from Supabase
Storage about once a month and serves resized copies from its own CDN.
src/lib/seed-data.ts is generated — it mirrors the live menu, prices, photo
URLs and availability included. Refresh it from a Supabase export (the query is
documented at the top of the script):
npx tsx scripts/generate-seed.ts path/to/export.json
If Supabase is unreachable (quota, outage), the mirror can be served to guests
in two ways: set ALLOW_SEED_FALLBACK=true on the host, or — when the hosting
dashboard itself is out of reach — flip forceSeedFallback in
src/lib/menu-fallback.ts and push; the deploy
carries the switch. Photos still come from Supabase Storage, so they
fall back to the logo placeholder while it is down, and the admin panel stays
unavailable. Turn the switch (and the flag) off as soon as Supabase is back, or a future
outage will quietly serve a stale menu.
| Command | What |
|---|---|
npm run dev | Local Next.js server |
npm run build / npm start | Production build + serve |
npm test | Unit tests |
npm run lint | ESLint |
npm run seed | Upsert menu into Supabase (needs service role key) |
npx tsx scripts/generate-seed.ts <export.json> | Regenerate the offline seed mirror |
| Path | Audience |
|---|---|
/ | Guest welcome |
/menu | Guest menu |
/admin/login | Staff login |
/admin | Staff overview + CRUD |
npm run seed (or import prod data)source is not seed)ALLOW_SEED_FALLBACK=true (or forceSeedFallback) on production unless emergency