Public
Hebrew shopping list PWA with real Israeli grocery prices
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

סל קניות — Shopping List PWA

A Hebrew, RTL, mobile-first shopping list and cart app, hosted entirely on Val Town. Real Israeli grocery products and prices come from the free Cheapersal API (built on the government price-transparency data).

Features

  • Search real grocery products in Hebrew (local catalog, instant, zero API quota).
  • Cart for the next shopping run with a live projected total (₪), based on the average price across chains.
  • Favorites for one-tap re-adding of staples.
  • Custom items with a user-set price for anything not in the catalog.
  • Shopping mode: scan barcodes (EAN-13/EAN-8) with the phone camera as items go into the physical cart, building the real expected total, then compare planned vs. scanned at checkout to catch register mistakes.
  • "My store" setting: scan lookups prefer your branch's actual price over the national average.
  • Installable PWA (Add to Home Screen on iPhone/Android), cart viewable offline in-store.

Project structure

backend/
  index.http.ts       Hono HTTP trigger: JSON API + serves the frontend, manifest, SW, icons
  db.ts               SQLite schema + query helpers
  cheapersal.ts       Cheapersal API client (throttle, daily budget, 24h price cache)
  icons.ts            App icon (SVG -> PNG via resvg-wasm, cached in blob storage)
  syncCatalog.cron.ts Incremental catalog sync (cron trigger)
frontend/
  index.html, styles.css, manifest.json, sw.js
  index.js, app.js, views.js, scanner.js, api.js   (React 18 + htm, no build step)
shared/
  types.ts

One-time setup

  1. Get a free API key at cheapersal.co.il/developers ("קבלו מפתח API").
  2. Install Deno, then the Val Town CLI: deno install -grAf jsr:@valtown/vt, and run vt to log in.
  3. From this folder: vt create sal-kniyot (or vt push if the val exists).
  4. In the val's settings on val.town set environment variables:
    • CHEAPERSAL_API_KEY — your Cheapersal key.
    • APP_PIN — optional numeric PIN that gates the app (leave unset for no PIN).
  5. Set the cron schedule for backend/syncCatalog.cron.ts (e.g. every 30 minutes). The first runs build the local product catalog; afterwards it refreshes weekly.
  6. On the phone, open the val URL → Share → Add to Home Screen.

API quota strategy

Free tier is 100 requests/day (10/minute). The app stays well inside it:

  • Product name search runs against the local SQLite catalog — zero quota.
  • Catalog sync uses a small request budget per cron run and stops at ~55 requests/day.
  • Live price lookups happen only when adding an item (cached 24h) or scanning an unknown barcode.
  • The settings sheet shows the remaining daily quota as reported by the API.