Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expense Entry PWA

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

1. Deploy the endpoint (Apps Script)

  1. Create a new Apps Script project, paste Code.gs.
  2. Set SHEET_ID (and optionally SHEET_NAME).
  3. Deploy > New deployment > Web app
    • Execute as: Me
    • Who has access: Anyone (so the browser fetch isn't redirected to login)
  4. Copy the /exec URL.

2. Configure the front-end

In app.js, set API_URL to the /exec URL, and adjust CATEGORIES to taste.

3. Host the static files

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:8000

4. Install on a phone

Open 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.

Updating

After editing any shell file, bump the CACHE version string in sw.js (e.g. expense-v1expense-v2) so clients pick up the change.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages