A mobile-first budgeting PWA (Progressive Web App) that syncs with your Google Sheet. Built entirely in a single HTML file — no frameworks, no build step, no backend server.
Back on Track is a mobile budgeting app that sits on top of your existing Google Sheet. Your sheet is the database. The app is the beautiful mobile interface. Transactions you add in the app go straight to your sheet, and you can pull fresh data from the sheet with one tap.
It installs on your iPhone or Android home screen like a native app — no App Store, no subscription, no account required.
This project was designed and built through a series of conversations with Claude (Anthropic). The entire product — UI, logic, Google Sheets integration, landing page, and onboarding flow — was built iteratively through natural language, with no manual coding.
- Single HTML file — the entire app (landing page + onboarding + PWA) lives in one
index.html. No build pipeline, no dependencies to manage. Anyone can open it in a text editor and understand it. - Google Sheets as the database — no backend server, no new database to manage. The user's existing spreadsheet is the source of truth. The app reads and writes to it via a Google Apps Script web app endpoint.
- PWA over native app — installable via Safari "Add to Home Screen". No App Store review, no developer fee, works on any device.
- JSONP for cross-origin requests — Google Apps Script redirects block standard
fetch()calls from mobile browsers. The workaround is JSONP (injecting a<script>tag dynamically), which bypasses CORS entirely.
back-on-track/
├── index.html # The entire app — landing page + onboarding + PWA
├── manifest.json # PWA manifest (name, icons, display mode)
├── sw.js # Service worker for offline support
├── google-apps-script.js # Paste this into Google Apps Script to enable sync
├── icons/
│ ├── icon-192.png # PWA home screen icon (192×192)
│ └── icon-512.png # PWA home screen icon (512×512)
└── README.md # This file
The google-apps-script.js file is deployed as a Google Apps Script Web App inside the user's Google Sheet. It exposes two endpoints:
- GET
/exec— returns all transactions as JSON (with JSONP support via?callback=fnName) - POST
/exec— appends a new transaction row to the sheet
The app calls these endpoints using a <script> tag injection (JSONP) for reads, and a standard fetch() POST for writes.
Each user deploys their own copy of the script inside their own sheet. There is no shared backend — every user's data stays entirely within their own Google account.
The script is currently configured for this sheet structure:
| Column | Field |
|---|---|
| A | Date |
| B | Amount |
| C | Biz Name / Note |
| D | Category |
To change the column mapping, edit the constants at the top of google-apps-script.js:
const SHEET_NAME = "Var Costs"; // Sheet tab name
const COL_DATE = 1; // Column A
const COL_AMOUNT = 2; // Column B
const COL_NOTE = 3; // Column C
const COL_CAT = 4; // Column D
const COL_SUB = 0; // 0 = no sub-category column
const HEADER_ROWS = 1; // Row 1 is headersThe dashboard computes several metrics from the raw transaction data:
- Spend to date — sum of all transactions in the current month
- Daily rate —
monthly budget ÷ days in month(e.g. $5,200 ÷ 30 = $173/day) - 7-day average — rolling average of the last 7 days of spend
- Month average — spend to date ÷ days elapsed
- Blended average — after day 7:
(7-day avg × 0.5) + (month avg × 0.5). Before day 7: just the 7-day avg. This smooths out early-month volatility. - On-track signal — green if blended avg ≤ daily rate, amber if ≤ daily rate × 1.15, red if over
- Forecast EOM —
spent + blended avg × remaining days - Recovery days — days of spend at an assumed daily rate until cumulative spend drops back below the cumulative budget line. User can adjust the assumed daily spend with a slider.
| Column | Green | Red | Dim |
|---|---|---|---|
| Total | Cumulative spend ≤ cumulative budget | Over | — |
| Day | Day's spend ≤ daily rate | Over daily rate | Zero spend day |
| +/− | Negative (under budget) | Positive (over budget) | Zero |
- Open your Google Sheet
- Go to Extensions → Apps Script
- Delete all existing code
- Paste the contents of
google-apps-script.js - Edit the column constants at the top to match your sheet
- Save (⌘S)
- Click Deploy → New deployment
- Type: Web app | Execute as: Me | Who has access: Anyone
- Click Deploy → authorise when prompted
- Copy the
/execURL
Open index.html in a text editor. Find this line:
let SHEET_API_URL = 'YOUR_APPS_SCRIPT_URL_HERE';Replace YOUR_APPS_SCRIPT_URL_HERE with your /exec URL.
- Create a new GitHub repository
- Upload all files (keeping
icons/as a folder) - Go to Settings → Pages → Deploy from branch → main → Save
- Your app is live at
yourusername.github.io/repo-name
- Open the GitHub Pages URL in Safari
- Tap the Share button → Add to Home Screen → Add
- The app appears on your home screen and opens full-screen
When you want to make changes:
- Go to your GitHub repo
- Click
index.html→ click the pencil ✏️ edit icon - Make your changes
- Click Commit changes
- GitHub Pages auto-deploys in ~30 seconds
If you change the Apps Script, you must create a New deployment (not update existing) to get a fresh URL that reflects your changes. Then update the URL in index.html.
A full Google Workspace Add-on has been built and saved separately. When published to the Google Workspace Marketplace ($5 one-time developer fee + 1–3 day review), the entire setup flow becomes:
- Install the add-on from Marketplace (one tap)
- Open Google Sheets → Extensions → Back on Track → Connect
- Pick your tab and columns in the sidebar
- Tap "Generate link" → URL auto-copies to clipboard
- Paste into app → done
No code, no script editor, no deployment steps. Entirely mobile-friendly.
| Layer | What |
|---|---|
| Frontend | Vanilla HTML/CSS/JS — no frameworks |
| Charts | Chart.js (CDN) |
| Fonts | DM Serif Display + DM Sans (Google Fonts) |
| Backend | Google Apps Script (runs inside Google Sheets) |
| Database | Google Sheets |
| Hosting | GitHub Pages (or Netlify) |
| Install | PWA via Safari "Add to Home Screen" |
| Offline | Service worker caches app shell |
- Google Workspace Marketplace add-on for zero-code setup
- Multi-month view and historical comparison
- Category breakdown charts
- Budget per category
- Swipe to delete transactions
- Dark mode
- Shared budget tracking (partner/family)