Krowz
Real discounts at local restaurants, cafés and dessert spots. Show the QR at the counter, staff scan it, done.
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Daily close, sales reports, stock, and supplier ordering for the Porcafe team. It runs as a Next.js app (App Router, React 19) on Firebase Firestore, and staff use it on phones as an installable web app. For how the team uses it day to day, see docs/STAFF_GUIDE.md.
You need Node.js 20.9 or later (the minimum for Next.js 16).
npm install.env.local with the values below. Ask the project owner for them, and never commit this file.| Variable | Used for |
|---|---|
NEXT_PUBLIC_FIREBASE_API_KEY, _AUTH_DOMAIN, _PROJECT_ID, _STORAGE_BUCKET, _MESSAGING_SENDER_ID, _APP_ID | Firebase web config (browser) |
NEXT_PUBLIC_INVENTORY_USAGE_GO_LIVE_DATE | Optional. The first day that counts toward usage |
ANTHROPIC_API_KEY | Reading the daily ticket sheet photo (/api/scan-ticket) |
FIREBASE_PROJECT_ID, FIREBASE_SERVICE_ACCOUNT_JSON | Server-side Firestore access for push and cron jobs |
VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY, VAPID_SUBJECT | Web push keys |
CRON_SECRET, APP_ORIGIN | Protects the cron routes and builds links in push messages |
If you use the Vercel CLI, vercel env pull writes these, along with VERCEL_OIDC_TOKEN.
npm run dev, then open http://localhost:3000.npm run dev: development servernpm run build: production build (also type-checks)npm start: serve the production buildnpm test: unit tests for the pure logic in src/**/*.test.ts (Node's test runner through tsx). These need no browser and no database.npm run lint: ESLintsrc/app: routes. / Home, /items Daily close and History, /reports, /inventory Stock, /setup. next.config.ts holds the redirects for moved pages.src/lib: the pure logic (reporting, dates, usage, supplier ordering) and data.ts, the Firestore layer. Every write in data.ts calls assertOnline(), so writes are refused while the device is offline and nothing is queued.src/components: UI. setup/ holds the Setup sections. inventory/ holds the Stock components.docs/: the UX audit and plan, plus deployment notes for push alerts and supplier ordering.vercel.json schedules /api/cron/reorder-push-reminders daily at 00:00 UTC (07:00 WIB) and /api/cron/inventory-supplier-deliveries daily at 01:00 UTC (08:00 WIB). Both need CRON_SECRET set in Vercel.firebase deploy --only firestore publishes firestore.rules and firestore.indexes.json./api/cron/inventory-supplier-deliveries at 08:00 WIB daily, and also when a device opens Stock. The cron only creates deliveries whose time has passed, so a delivery time later than 08:00 is created only if someone opens Stock after that time. Keep delivery times at 08:00 or earlier.