dmgnr e9d3c2a0c4
Deploy to Cloudflare Pages / deploy (push) Failing after 1m12s
fix production deployment
e9d3c2a0c4 · 2026-08-24 04:41:08 +00:00
20 Commits
2026-07-03 12:00:53 +07:00
2026-07-03 12:00:53 +07:00
2026-08-24 04:38:06 +00:00
2026-07-03 12:00:53 +07:00
2026-08-11 23:50:16 +07:00
2026-08-24 04:38:06 +00:00
2026-08-24 00:38:32 +07:00
2026-07-03 12:00:53 +07:00
2026-07-03 12:00:53 +07:00
2026-07-03 12:00:53 +07:00
2026-08-11 23:50:16 +07:00
2026-07-03 12:00:53 +07:00
2026-08-24 09:58:34 +07:00
2026-08-24 00:38:32 +07:00
2026-07-03 12:00:53 +07:00
2026-08-24 00:38:32 +07:00
2026-08-24 00:38:32 +07:00
2026-08-24 04:38:06 +00:00
2026-08-24 00:38:32 +07:00
2026-08-24 00:38:32 +07:00
2026-08-11 23:50:16 +07:00
2026-08-24 00:38:32 +07:00
2026-08-24 00:38:32 +07:00

HotFridge

  • WebApp
  • food expiry tracking app
  • AI-powered scan that scans placed out items on table to suggest list of items to add with Icon, Name, Estimated Expiry and Calories. User can edit it before approving to add.
  • Notification for near-expired food.2
  • Marking items as used so it will be moved to "Out of stock" cart so that user can bring that to buying checklist
  • Algorithmized guides based on existing items and near expiry for preserving and recipes and more

ของในตู้เย็นเยอะเกินไป ทำให้หาของยาก อาหารบางอย่างเก็บไว้นานจนเสียจนอาจส่งกลิ่นเหม็น ไม่มีที่ใส่อาหารใหม่ ปัญหาตู้เย็นเต็มจากของเก่าและของใหม่ทับถมกัน เว็บแอปติดตามวันหมดอายุอาหาร ช่วยจัดการวัตถุดิบในตู้เย็นด้วย AI สแกนอาหาร แจ้งเตือนของใกล้หมดอายุ จัดทำเช็กลิสต์ซื้อของ และแนะนำการถนอมอาหารหรือสูตรอาหารจากวัตถุดิบที่มีอยู่

Deploy

CI (.github/workflows/deploy.yml) builds and pushes to Cloudflare Pages on every push to main, but a few things only need to be set up once, by hand, in the Cloudflare account:

  1. Create the D1 database (one-time):

    npx wrangler d1 create hotfridge
    

    Copy the returned database_id into wrangler.jsonc's d1_databases[0].database_id (replacing the REPLACE_WITH_DATABASE_ID_FROM_WRANGLER_D1_CREATE placeholder) and commit it — it's not a secret.

  2. Apply migrations to the remote database (needed again after every new migration):

    npx wrangler d1 migrations apply hotfridge --remote
    
  3. Bind the D1 database to the Pages project — in the Cloudflare dashboard, open the hotfridge Pages project → Settings → Functions → D1 database bindings, and add a binding named DB pointing at the hotfridge database. (Pages projects configure bindings via the dashboard, not wrangler.jsonc, even though wrangler.jsonc is what local dev and wrangler d1 commands read.)

  4. Set the Gemini API key as a Pages build environment variable — dashboard → Settings → Environment variables → add VITE_GEMINI_API_KEY for the Production environment. This is baked into the client bundle at build time (see src/lib/ai/gemini.ts), so it must be present during the CI build, not just at runtime.

  5. GitHub Actions secrets — the workflow needs CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID set as repo secrets (Settings → Secrets and variables → Actions) for wrangler-action to authenticate.

Steps 1–2 also apply locally for bun run dev (use --local instead of --remote), and the Gemini key locally goes in .env (see .env.example) rather than the Pages dashboard.

S
Description
No description provided
Readme
2 MiB
Languages
Svelte 50.1%
TypeScript 44%
CSS 3.5%
JavaScript 2.1%
HTML 0.3%