dmgnr 76782541b0
Deploy to Cloudflare Pages / deploy (push) Successful in 1m29s
move Gemini requests server side
76782541b0 · 2026-08-24 12:20:16 +00:00
24 Commits
2026-07-03 12:00:53 +07:00
2026-07-03 12:00:53 +07:00
2026-08-24 12:20:16 +00:00
2026-07-03 12:00:53 +07:00
2026-08-11 23:50:16 +07:00
2026-08-24 05:32:51 +00:00
2026-08-24 12:20:16 +00: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 12:20:16 +00: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 keys as a server secret — add a repository Actions secret named GEMINI_API_KEYS. Its value is a comma-separated list (key-one,key-two). CI uploads it to the Pages runtime; Gemini calls and key rotation happen only on the server.

  5. Actions secrets — the workflow needs CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, GEMINI_API_KEYS, and GUIDE_JOB_SECRET set as repository Actions secrets.

Steps 1–2 also apply locally for bun run dev (use --local instead of --remote), and the comma-separated Gemini keys locally go in .env (see .env.example).

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