spend-tracker

Spendbook

A personal spend tracker in a single HTML file. Upload bank and credit card statements (CSV, Excel or PDF), and Spendbook sorts every transaction into categories and shows where the money went. Two or more people can share one book, see each other’s changes live, and edit it together.

Features

Running it

On its own

Open spendbook.html in a browser. Data is saved only in that browser (localStorage), and sharing, change history and the Google Sheet connection are off.

Shared online

Spendbook can use Firebase for sign-in and a shared database, and be hosted on any static site host such as GitHub Pages.

  1. Create a Firebase project. Enable Authentication → Google and create a Firestore database in production mode.
  2. Copy firestore.rules into Firestore → Rules, put the Google accounts that may use the book in the list, and publish.
  3. Register a web app in Project settings and paste its apiKey, authDomain, projectId and appId into FIREBASE_CONFIG in spendbook.html. These values identify the project and aren’t secret; the rules decide who can read and write.
  4. Host the file (e.g. GitHub Pages) and add the site’s domain under Authentication → Settings → Authorized domains.
  5. To read a house cost sheet, enable the Google Sheets API for the same project in Google Cloud, set the sheet’s ID and tab name in HOUSE_SHEET, and share the sheet with each person who will refresh it.

Libraries

Loaded at runtime: SheetJS 0.18.5 for Excel files, PDF.js 3.11.174 for PDFs and the Firebase JavaScript SDK 10.14.1 for sign-in and storage. Fonts come from Google Fonts.

Privacy

Statements, exports and other data files are excluded by .gitignore, so no financial data is stored in this repository. In shared mode, data lives in your own Firebase project and can only be read by the accounts listed in your Firestore rules.