尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
Tapa Hey — Multi-Channel Restaurant & Food Business Management System
Good Food. Good Mood. A complete, working enterprise system for a
Filipino tapsilog restaurant chain — not just a website, but the whole
business: customer website, POS, Kitchen Display System, inventory with
recipe-based auto-deduction, procurement, delivery dispatch, loyalty & CRM,
B2B/reseller sales, finance & cashier shifts, multi-branch reporting, and an
Owner Cockpit — all reading and writing through one central backend
(src/lib/db.ts), the same architecture pattern described in
Admin → System Architecture.檢視完整 README ↗Good Food. Good Mood. A complete, working enterprise system for a
Filipino tapsilog restaurant chain — not just a website, but the whole
business: customer website, POS, Kitchen Display System, inventory with
recipe-based auto-deduction, procurement, delivery dispatch, loyalty & CRM,
B2B/reseller sales, finance & cashier shifts, multi-branch reporting, and an
Owner Cockpit — all reading and writing through one central backend
(src/lib/db.ts), the same architecture pattern described in
Admin → System Architecture.
See Enterprise Modules below for the full module map, or jump straight to Admin → Demo Center to run 10 pre-built end-to-end scenarios (a POS sale, an online order, a low-stock → purchase-order chain, a delivery dispatch, a B2B bulk order, an end-of-day close, and more) that actually mutate the demo data so you can narrate a live walkthrough.
🟡 DEMO BUILD. No real money is ever charged. Payments run through a built-in Demo Payment Simulator (or Stripe test mode, if configured). See Payments below.
Opening the app (/) shows a launcher screen to pick where to go:
/home) — the public site/admin) — staff management, role-gated/pos) — a counter terminal for cashiers/managers to take
walk-in dine-in/takeout orders and charge them on the spot, using the same
demo payment flow as online checkout⚠️ Temporary:
/adminand/poscurrently skip the login screen and auto-enter as the seeded Super Admin (bypassStaffLogin()insrc/lib/auth.ts), so the launcher goes straight in for easy demoing. This only works in local demo mode. Before any real deployment, remove that call fromAdminLayout.tsx/pages/pos/POS.tsxso both routes go back to requiring/admin/login.
All three read and write the same backend, so an order rung up at the POS terminal shows up in Admin → Orders exactly like one placed on the website.
This is not a static mockup. Every button below changes real application state:
TH-YYYYMMDD-####), and shows a
printable receipt./admin/kitchen) — a real-time board (New →
Preparing → Ready) driven by the same orders data as everywhere else./admin/procurement) — low stock automatically creates a
Purchase Request; a manager approves it; it converts to a Purchase Order
sent to a supplier; receiving it restocks inventory./admin/delivery) — demo courier assignment and dispatch
(Preparing → Ready for Pickup → Picked Up → Out for Delivery → Delivered),
auto-created the moment a delivery order starts preparing./admin/loyalty) — ₱100 spent = 1 point (configurable in
code), earned automatically when an order completes, redeemable for a peso
reward./admin/promotions) — percentage/fixed discount codes with
date ranges and minimum purchase./admin/b2b) — wholesale bulk orders against packaged
products, auto-invoiced with credit terms./admin/finance) — cashier shift open/close with cash
reconciliation, and an End-of-Day Closing report (sales by payment method,
refunds, voids, discounts)./admin/owner-cockpit) — an executive dashboard: total
sales, gross margin, food cost %, best branch/product, low-stock count,
sales trend, sales by branch/channel, top products, payment performance.If you don't configure Supabase, the app automatically runs on a local demo
database — a relational store persisted in localStorage, seeded with the
same realistic data (src/data/seed.ts) that supabase/seed.sql also
produces. Every service in src/services/* talks to one facade
(src/lib/db.ts) that transparently switches between:
src/lib/localDb.ts. Cross-tab updates work via
the browser's storage event, so an order placed on the customer site in
one tab appears instantly in the admin dashboard open in another.VITE_SUPABASE_URL and
VITE_SUPABASE_ANON_KEY are set, src/lib/supabase.ts creates a real
client and every query, insert, update, upload, and realtime subscription
goes to Postgres/Storage/Realtime instead.This means you can demo the entire order → payment → admin → tracking flow right now, with no accounts and no cloud project, and upgrade to Supabase later without touching a single page component.
TAPA HEY ENTERPRISE SYSTEM
│
┌───────────────┬──────────────────┬───────────────┐
↓ ↓ ↓
INTERNAL USERS CUSTOMER/REVENUE ADMIN / OWNER
(Owner, Ops, CHANNELS │
Manager, Cashier (Dine-in, POS, │
Kitchen, Takeout, Online, │
Warehouse, Delivery, │
Procurement, Packaged, B2B) │
Finance, │ │
Marketing, │ │
QA/Admin, │ │
Delivery Staff) │ │
└───────────────┴──────────────────┴───────────────┘
│
src/lib/db.ts (central backend)
Supabase Postgres/Auth/Storage/Realtime
— or the local demo store, zero setup
│
┌───────┬──────────┬───────────┬────────────┬─────────┐
↓ ↓ ↓ ↓ ↓ ↓
POS Payments Inventory/BOM Procurement Kitchen(KDS) Delivery
│ │
↓ ↓
Sales Fulfillment/Dispatch
│
↓
CRM/Loyalty · B2B/Reseller · Finance (shifts, EOD) · Reporting
│
↓
OWNER COCKPIT (sales, margin, branch, inventory)
This is rendered live and Tapa Hey–branded in the app at Admin → System Architecture.
src/
components/ Shared UI kit + customer-facing composed components
layouts/ CustomerLayout, AdminLayout (sidebar/header/route guards)
pages/customer/ Home, Menu, Checkout, Payment, Tracking, Account, Auth…
pages/admin/ Dashboard, Orders, Kitchen, Procurement, Delivery,
Loyalty, Promotions, B2B, Finance, Owner Cockpit,
Branches, Architecture, Integrations, Demo Center,
Audit, Menu, Inventory, Reports, CMS, Staff…
pages/pos/ POS terminal (shift-gated cashier checkout)
hooks/ useAuth, useCart, useToast, useLiveQuery (realtime data)
lib/ db.ts (facade), supabase.ts, localDb.ts, auth.ts
services/ orders, payment, menu, inventory, recipes, procurement,
delivery, loyalty, promotions, b2b, finance, audit,
branches, integrations, demoScenarios, reports…
data/seed.ts Demo seed data (mirrors supabase/seed.sql)
types/ Shared TypeScript domain types
supabase/
schema.sql Full Postgres schema + RLS policies (incl. enterprise modules)
seed.sql Matching demo data for a real Supabase project
npm install
npm run dev # http://localhost:5173
Copy .env.example to .env and fill in only what you need:
# Supabase — leave BOTH blank to use the local demo database instead
VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=
# Stripe test mode — leave blank to use the Demo Payment Simulator
VITE_STRIPE_PUBLISHABLE_KEY=
VITE_PAYMENT_API_URL=
# Server-side ONLY. Never prefixed with VITE_, never bundled into the
# frontend. Only your PaymentIntent-creating server should read this.
STRIPE_SECRET_KEY=
The secret key is never imported by any frontend file. src/services/payment.ts
calls VITE_PAYMENT_API_URL (a server you'd deploy separately, e.g. a Supabase
Edge Function) to create a Stripe PaymentIntent; that server is the only place
STRIPE_SECRET_KEY should ever be read.
supabase/schema.sql first,
then supabase/seed.sql. Order matters — seed.sql inserts into tables
that only exist after schema.sql has run. schema.sql drops and
recreates every Tapa Hey table on each run, so if you ever hit a column-
mismatch error (from an older partial run, or from running seed.sql
first by mistake), just re-run schema.sql then seed.sql again — it's
always safe to start clean this way. (It never touches auth.users, so
existing Supabase Auth accounts survive a reset.)tapahey (Storage → New bucket →
toggle "Public"). This is where admin-uploaded menu photos and gallery
images land (SUPABASE_BUCKET in src/lib/supabase.ts)..env as VITE_SUPABASE_URL /
VITE_SUPABASE_ANON_KEY, then restart npm run dev.Supabase Auth owns user credentials, so staff accounts need one extra manual step per person:
[email protected] and a password → create.supabase/seed.sql, substituting
the UUID, to insert a matching profiles row and a staff row with
role = 'super_admin'./admin/login.Once one Super Admin exists, use Admin → Staff → Add Staff Member for everyone else — in Supabase mode it will tell you to create their Auth user first, then link them the same way.
Staff and customer accounts are already seeded. Sign in at /admin/login:
| Role | Password | |
|---|---|---|
| Owner / Super Admin | [email protected] | DemoAdmin123! |
| Operations | [email protected] | DemoStaff123! |
| Branch Manager | [email protected] | DemoStaff123! |
| Cashier | [email protected] | DemoStaff123! |
| Kitchen | [email protected] | DemoStaff123! |
| Warehouse | [email protected] | DemoStaff123! |
| Procurement | [email protected] | DemoStaff123! |
| Finance / Accounting | [email protected] | DemoStaff123! |
| Marketing / CRM | [email protected] | DemoStaff123! |
| QA / Admin | [email protected] | DemoStaff123! |
Customer login at /login: [email protected] / DemoCustomer123!
The dashboard currently auto-enters as the Owner/Super Admin for fast demoing (see the temporary bypass note above). To see any other role's restricted sidebar, sign out and sign back in at
/admin/loginwith that role's email/password.
Admin → Settings → Reset Demo Data restores the original seed at any time.
src/services/payment.ts decides the mode automatically:
pending and offers Retry; a
cancelled one returns to checkout. Every transaction reference is prefixed
DEMO_ so it's unmistakably a simulation.VITE_STRIPE_PUBLISHABLE_KEY and
VITE_PAYMENT_API_URL (pointing at a server/Edge Function you provide that
creates a PaymentIntent using STRIPE_SECRET_KEY and Stripe's test
environment). The client never sees or stores the secret key. Use Stripe's
published test card numbers (e.g. 4242 4242 4242 4242) — real card
numbers are rejected by Stripe in test mode by design.Either way: no real money moves. The order/payment tables record
provider: 'demo' | 'stripe' | 'cash' and payment_status so reporting looks
identical regardless of which mode produced the data.
supabase/schema.sql) mean anonymous visitors
can only read public content (menu, approved reviews/gallery, settings) and
insert orders/payments/reviews/reservations — they can never read another
customer's data or write to admin-only tables. Staff-only writes are gated
by an is_staff() policy helper.orderService.createOrder) rather than trusting the cart's numbers — a
tampered price in the browser cannot change what gets charged.paymentService.process, not from a
value the frontend claims — the "customer" never gets to declare their own
order paid.AdminLayout (must be signed in and have an
active staff row) and by RequireSection, which checks the signed-in
staff member's role against ROLE_PERMISSIONS before rendering a section.Defined in ROLE_PERMISSIONS (src/lib/auth.ts) and enforced per-section by
RequireSection on every admin route.
| Role | Access |
|---|---|
| Owner / Super Admin | Everything |
| Operations | Branches, Orders, Inventory, Procurement, Kitchen, Delivery, Reports |
| Branch Manager | Orders, POS, Menu, Categories, Reservations, Customers, Inventory, Reports, Staff |
| Cashier | Orders, POS, Customers |
| Kitchen | Orders, Kitchen (KDS) |
| Warehouse | Inventory, Procurement |
| Procurement | Procurement |
| Finance | Reports, Finance, B2B |
| Marketing / CRM | Customers, Loyalty, Promotions, Website Content, Gallery, Reviews |
| Content Manager | Website Content, Gallery, Reviews |
| QA / Admin | Staff, Audit Log, Settings, Integrations |
| Delivery Staff | Delivery |
npm run build # tsc -b && vite build → dist/
npm run preview # serve the production build locally
dist/ is a static site — deploy it to Vercel, Netlify, Cloudflare Pages, or
any static host. Set the same environment variables in your host's dashboard
before building. If you're using Stripe, deploy the PaymentIntent-creating
server separately (Supabase Edge Functions are a natural fit) and point
VITE_PAYMENT_API_URL at it.
Demo project for evaluation purposes.
/admin/branches) — Main + two additional demo branches;
orders and reports can be sliced by branch./admin/audit) — every order status change, payment event,
procurement approval and shift close is recorded with actor, action and
timestamp./admin/architecture) — a Tapa Hey–branded diagram
of how every module connects through the central backend./admin/integrations) — a demo-mode status board for
Stripe, GCash, Maya, delivery platforms, accounting, email/SMS and Maps;
everything runs simulated until real credentials are added./admin/demo-center) — 10 one-click scenarios that create
real orders, move real inventory, and fire real notifications.