A static, installable expense form that posts to a Google Apps Script endpoint, which writes rows to a Google Sheet (amounts saved as negatives).
A -> Date C -> Category D -> TL E -> AUD F -> USD
- Create a new Apps Script project, paste
Code.gs. - Set
SHEET_ID(and optionallySHEET_NAME). - Deploy > New deployment > Web app
- Execute as: Me
- Who has access: Anyone (so the browser fetch isn't redirected to login)
- Copy the
/execURL.
In app.js, set API_URL to the /exec URL, and adjust CATEGORIES to taste.
A service worker requires HTTPS (or localhost). Drop
index.html, app.js, manifest.json, sw.js, icon.svg on any static host:
- GitHub Pages, Netlify, Cloudflare Pages, Firebase Hosting, etc.
Local test:
cd expense-pwa
python3 -m http.server 8000 # then open http://localhost:8000Open the hosted URL in Chrome/Safari → Add to Home Screen. It launches
standalone, and the shell loads instantly from the service-worker cache.
Offline submissions are queued in localStorage and synced when back online.
After editing any shell file, bump the CACHE version string in sw.js
(e.g. expense-v1 → expense-v2) so clients pick up the change.