尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
dokkan
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Multi-tenant SaaS for shoe store management in Egypt. Arabic (RTL) and English (LTR). The currency is Egyptian pound (EGP), permanently - there is no currency setting or column.
Stack: Next.js (App Router) + TypeScript + Tailwind CSS, Supabase (PostgreSQL + Auth), GitHub, Vercel.
Included:
(store_id, id) foreign keys
so a row can never point at another store's data.create_store).Not built yet (Phase 2+): product screens, POS checkout, inventory and purchase operations, expenses, shifts, employees, reports, 80 mm receipts. The dashboard says so instead of faking data.
store_id. Policies allow a row only if the caller is an active member
of that store, and writes also check the member's role (owner / manager / cashier).sales, sale_items, sale_payments, purchases, stock_movements,
variant_stock, store_members) are read-only for browsers. Phase 2 writes to them only
through server-side SECURITY DEFINER functions that run as one transaction.variant_costs, readable only by owners/managers (never cashiers).stock_movements is append-only (a trigger rejects UPDATE/DELETE) and stock can never go negative.anon has no privileges on any table or function.Copy .env.example and fill in (Supabase: Project Settings -> API):
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Project URL |
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY | Publishable key (safe for the browser) |
NEXT_PUBLIC_SITE_URL | Optional canonical URL for confirmation emails |
Phase 1 does not use a service-role/secret key. Never put one in a NEXT_PUBLIC_* variable.
In Supabase, set Authentication -> URL Configuration: Site URL to the deployed URL, and add
<site url>/auth/callback to the Redirect URLs, or confirmation emails will not return to the app.
npm install
npm run dev # local app
npm run typecheck
npm run lint
npm run test:unit # currency, i18n and Egypt data
npm run test:db # applies every migration to a throwaway local Postgres 16 and runs 76 RLS checks
test:db needs Postgres 16 server binaries and psql locally. It never touches a real project.
SQL lives in supabase/migrations/ and is applied in filename order. Apply the same files to the
hosted project (Supabase CLI db push, or the dashboard/MCP migration tool). Always re-run
npm run test:db after changing a migration.