尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A mobile-first PWA that helps you see what is in your kitchen, decide what to cook, and shop without overspending.
Screenshots are 390x844 phone captures of the real app running against a local demo database with sample data. AI suggestions are disabled in the captures (no provider key configured).
meal_plan_created, item_expiring, budget_exceeded, shopping_list_created and weekly_summary. Configure with ZAPIER_WEBHOOK_URL or the /zapier API.The UI is designed for phones first and scales up to a desktop sidebar layout.
app/manifest.ts.Recipe suggestions, ingredient substitutions and AI meal plans use one OpenAI-compatible chat endpoint chosen entirely by environment variables.
https://inference.dahl.global/v1), model MiniMaxAI/MiniMax-M2.7. Point AI_BASE_URL and AI_MODEL at any compatible provider to switch. There is no Gemini dependency.AI_API_KEY). With no key the API still starts, /health stays green, and the AI screens show that suggestions are unavailable.AI_USER_DAILY_LIMIT, AI_GLOBAL_DAILY_LIMIT), plus a short burst limiter.OFF_CONTACT so requests carry a proper User-Agent.USDA_API_KEY; without it, nutrition lookups are unavailable.| Layer | Technology |
|---|---|
| Frontend | Next.js 16.4 (App Router), React 19.3, TypeScript, Tailwind CSS 4, TanStack Query 5, React Hook Form + Zod, Radix UI, Framer Motion, Recharts, Zustand, Axios |
| Backend | Node.js 22, Express 4, TypeScript, Prisma 5.22, PostgreSQL, JWT, bcryptjs, express-validator, Zod (env), Winston |
| AI | OpenAI-compatible provider via env (default Dahl Inference, MiniMaxAI/MiniMax-M2.7) |
| Tests | Jest + Supertest (backend), Vitest (frontend) |
| Hosting | Railway (API + Postgres), Vercel (frontend) |
.
├── backend/ Express API, Prisma schema and migrations, Dockerfile (see backend/README.md)
├── frontend/ Next.js app (see frontend/README.md)
├── scripts/ smoke-prod.sh, a curl-based production smoke test
├── docs/ README screenshots
└── .github/ CI workflow
Requirements: Node.js 22, npm, and PostgreSQL 15+ (Docker or a local install).
1. Database. Either start the Postgres service from the backend compose file:
cd backend
docker compose up -d postgres
# DATABASE_URL=postgresql://smart_user:smart_password@localhost:5432/smart_grocery_db?schema=public
or create an empty database in your own Postgres and use its URL.
2. Backend (http://localhost:3001):
cd backend
npm install
cp .env.example .env
# edit .env: set DATABASE_URL and a JWT_SECRET (openssl rand -hex 32)
npx prisma migrate deploy # apply migrations (use `npm run prisma:migrate` while changing the schema)
npm run prisma:seed # optional: [email protected] / Demo1234! plus sample recipes
npm run dev
The seed refuses to run when NODE_ENV=production or when DATABASE_URL does not look local. JWT_SECRET must be at least 32 characters and must not contain words like secret or default. Leave AI_API_KEY empty to run without AI.
3. Frontend (http://localhost:3000):
cd frontend
npm install
cp .env.example .env.local # NEXT_PUBLIC_API_URL=http://localhost:3001
npm run dev
Open http://localhost:3000 and sign in with the demo user, or sign up. To preview the mobile layout, use your browser's device toolbar at 390x844 or open the dev server from a phone on the same network (add that origin to CORS_ORIGIN).
cd backend && npm test # Jest with coverage
cd backend && npm run type-check && npm run lint
cd frontend && npm test # Vitest
cd frontend && npm run type-check && npm run lint
CI (.github/workflows/ci.yml) runs lint, type-check, tests and a build for both packages, plus a Docker build of the API, against a Postgres 16 service. After a deploy, API=https://<your-api-host> scripts/smoke-prod.sh runs a curl-based smoke test against the live API (needs curl and jq; it creates a throwaway smoke+<epoch>@example.com user).
backend/Dockerfile) and Postgres.backend/: railway up --service kitcha-api --detach.prisma migrate deploy (retrying while the database comes up) and then starts node dist/index.js as PID 1, so migrations run on every deploy./health (does not touch the database).PORT is injected by Railway, never set it. DATABASE_URL is the reference variable ${{Postgres.DATABASE_URL}}.openssl rand -hex 32 | railway variable set JWT_SECRET --stdin.frontend.NEXT_PUBLIC_API_URL to the Railway API origin (no trailing slash) for both Production and Preview. It is inlined at build time, so redeploy after changing it.CORS_ORIGIN (and optionally FRONTEND_URL). Preview URLs of your project are allowed through VERCEL_PREVIEW_SCOPE and VERCEL_PREVIEW_PROJECT.Validated at startup by backend/src/config/env.schema.ts; the process exits with a clear message if a required value is missing or weak. Template: backend/.env.example.
| Variable | Required | Default | Notes |
|---|---|---|---|
DATABASE_URL | yes | postgres:// or postgresql:// URL. On Railway: ${{Postgres.DATABASE_URL}} | |
JWT_SECRET | yes | 32+ characters, must not look like a default value | |
CORS_ORIGIN | set in production | http://localhost:3000 | Comma-separated bare origins, no trailing slash. In production they must be https and not localhost |
NODE_ENV | no | development | development, test or production |
PORT | required in production | 3001 in .env.example | Provided by the platform (Railway injects it), only set it yourself locally |
FRONTEND_URL | no | Extra frontend origin merged into the CORS allowlist | |
VERCEL_PREVIEW_SCOPE, VERCEL_PREVIEW_PROJECT | no | project kitcha | Allow this project's Vercel preview URLs |
JWT_EXPIRES_IN, API_VERSION, LOG_LEVEL | no | 7d, v1, info | |
AI_API_KEY | no | Server-side secret. Empty disables AI without breaking the API | |
AI_PROVIDER | no | dahl | Label for the provider |
AI_BASE_URL | no | https://inference.dahl.global/v1 | Any OpenAI-compatible base URL |
AI_MODEL | no | MiniMaxAI/MiniMax-M2.7 | |
AI_TIMEOUT_MS | no | 40000 | Per-call timeout (1000 to 110000) |
AI_MAX_TOKENS |
| Variable | Required | Notes |
|---|---|---|
NEXT_PUBLIC_API_URL | yes for production builds | Backend origin, inlined at build time. Public, never put secrets here |
Base URL /api/v1. All routes except auth/* and /health need Authorization: Bearer <jwt>.
| Area | Prefix |
|---|---|
| Auth | /auth (/signup, /login, /logout, /me) |
| Users and preferences | /users (profile, preferences incl. currency, onboarding/complete, password) |
| Pantry | /pantry (CRUD, /stats, /expiring-soon) |
| Recipes | /recipes |
| Meal plans | /mealplans |
| Shopping list | /shopping (/list, /items, /generate, /finish, /history) |
| Analytics, alerts, notifications | /analytics, /alerts, /notifications |
| AI | /ai (/status, /suggest-recipes, /suggest-substitutions, /generate-meal-plan) |
| Food data | /food (/barcode/:code, /nutrition) |
| Zapier | /zapier |
Routes, validators and controllers live under backend/src/modules/. See backend/README.md for details.
git checkout -b feat/my-change).feat:, fix:, docs:, refactor:, test:, chore:).| no |
8000 |
| Reasoning models emit a think block first |
AI_JSON_MODE | no | off | off or json_object |
AI_USER_DAILY_LIMIT, AI_GLOBAL_DAILY_LIMIT | no | 20, 100 | Requests per UTC day |
USDA_API_KEY | no | Enables USDA nutrition lookups |
OFF_CONTACT | no | this repository URL | URL or email in the Open Food Facts User-Agent |
ZAPIER_WEBHOOK_URL | no | Default Zapier catch-hook URL |
SPOONACULAR_API_KEY | no | Optional, legacy |
PUBLIC_HOST | no | RAILWAY_PUBLIC_DOMAIN | Canonical host for the production HTTP to HTTPS redirect |