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.