Track estimated credit-card balances from limit and available credit, inspect balance history and Progress charts, compare hypothetical interest costs, simulate payoff timelines, and plan 0% balance transfers — in a clean, mobile-first web app where your data is end-to-end encrypted in the browser before it ever reaches Firestore.
A lightweight, privacy-first planner to manage credit cards, visualize utilization, and optimize payoff. No bank linking, no tracking, no ads.
⚠️ Disclaimer: For educational purposes. Not financial advice.
- Lock Mode — client-side end-to-end encryption. Card data is encrypted in your browser with an AES-GCM key derived from your passphrase (PBKDF2). Only ciphertext is ever stored in Firestore — unreadable even by the project owner without your passphrase.
- Zero-knowledge, per-session unlock. The key lives in memory only and is cleared on sign-out/refresh; the passphrase is never sent anywhere. No bank linking, no tracking, no ads.
- Google sign-in + Firestore sync (offline-first via IndexedDB).
- Inline edit in place (row expands to full-width inputs; Enter to save, Esc to cancel) with field-level validation.
- Quick ±$50 balance adjustments on each card, with encrypted history.
- Available-credit entry: estimated balance is limit minus available credit; direct entry remains available for legacy and over-limit exceptions.
- Dated history and corrections, archive/restore, issuer status, and freshness filters.
- Search / filter accounts by name; undo delete (8-second toast).
- Sort by Name / APR / Balance / Utilization / Monthly Interest / Monthly Interest per $100 (preference persisted).
- KPI tiles: Total Debt, Total Credit, Monthly Interest, and a prominent Yearly Interest (Est.) figure, plus an overall utilization bar.
- Per-card utilization as bar or donut (toggle), risk badges (Healthy / Watch / Medium / High), and 0% APR chips.
- Utilization targets: per-card payment amounts below the progress bar, with customizable planning targets. Each saved target also creates an overall utilization/payment KPI. These are not promised credit-score breakpoints.
- Progress page: overall/per-account balance trends, comparison KPIs, milestones, accessible observation tables, and utilization/limit charts.
- Manual statement/promotion references: dates, optional payment/transfer records, and in-app reminders. No minimum-payment tracking or exact interest-start claims.
- Payoff strategies: Debt Avalanche (highest APR) and Debt Snowball (lowest balance), alongside an estimated monthly interest ranking by account.
- Payoff Plan: compare Avalanche and Snowball side by side using one combined monthly budget, or estimate the monthly amount needed for a target number of months. Optional per-account baseline payments are planning inputs, not bank minimums. See projected interest, total paid, first payoff, timelines and charts. Each strategy includes a monthly per-account payment plan with month 1 expanded, baseline/priority allocations, estimated interest and remaining balances, and a CSV download. Zero baselines require review before displaying predictions.
- Balance-Transfer Optimizer: pick a 0% target card, optionally cap its utilization, and get a move list with monthly + intro-period net savings vs. fees.
- Three views: Accounts for current balances, Payoff Plan for hypothetical outcomes, and Progress for recorded history. Import/export live in Settings & data.
- Dark mode (persisted, no flash of wrong theme).
- Import legacy CSV/JSON and full backups; Export snapshot/history CSV or full JSON backups retaining account IDs, history, and settings.
- PWA: installable, offline-friendly (network-first service worker; Firestore queues writes offline and syncs when back online).
- Accessibility: keyboard support, focus rings, ARIA labels,
aria-liveannouncements, accessible modal (focus trap + Escape/backdrop close), and redundant text labels alongside color-coded chips. - Mobile-first responsive layout with a floating add-account button.
- Frontend: HTML + vanilla JS (ES modules) + compiled TailwindCSS
(static
styles.css, no runtime CDN). - Encryption: Web Crypto API — AES-GCM-256 + PBKDF2 (SHA-256).
- State/Sync: Firebase Auth + Firestore (with IndexedDB persistence).
- PWA: service worker (network-first) + web manifest.
- CI/CD: GitHub Actions → GitHub Pages (served via Cloudflare at
pdt.avijitroy.com). - Secrets: injected at build time via Actions — no keys committed.
artifacts/{projectId}/users/{uid}/cards/{cardId}
artifacts/{projectId}/users/{uid}/cards/{cardId}/events/{revision}
artifacts/{projectId}/users/{uid}/cards/{cardId}/restored/{eventId}
New encrypted account snapshots:
{ "v": 2, "iv": "<base64>", "data": "<base64-ciphertext>", "revision": "<id>", "purging": false }Legacy {v:1,iv,data} snapshots remain readable. New writes pair a version-2
snapshot with an immutable encrypted event. Financial fields remain encrypted;
revision/purge flags, record counts, and update-order identifiers are operational
metadata. Malformed or unsupported records produce an incomplete-data warning.
Per-user crypto metadata:
artifacts/{projectId}/users/{uid}/meta/crypto
{ "v": 1, "salt": "<base64>", "verifier": { "iv": "<base64>", "data": "<base64>" } }- The
salt(non-secret) derives the key via PBKDF2; theverifieris an encrypted known token used to detect a wrong passphrase on unlock. - Decrypted card fields (
name,balance,apr,creditLimit) exist only in memory; all derived metrics (utilization, interest, per-$100 cost) are computed client-side.
Goal: data is encrypted in the browser before hitting Firestore, so even project admins / server backups cannot read card details.
- Key derivation: AES-GCM-256 key from your passphrase + a per-user random salt via PBKDF2 (SHA-256, 210k iterations).
- Session model: unlock once per session; key held in memory, cleared on sign-out/refresh.
- First run: set a passphrase (with an unrecoverable-if-lost warning). Returning: enter your passphrase to unlock.
- Encrypt-everything-by-default — every card is stored as ciphertext.
Threat model
- ✅ Protects against server-side reads (console, backups) and cross-user access.
- ❌ Does not protect a device compromised while unlocked.
⚠️ No recovery if the passphrase is lost — export a JSON backup as your safety net.
-
Firebase Console
- Create a web app and enable the Google auth provider.
- Auth → Authorized domains: add
localhostand127.0.0.1. - Firestore → publish the rules from
firestore.rules.
-
Create
env.jslocally (ignored by git):// env.js (local only; NOT committed) window.__FIREBASE_CONFIG = { apiKey: "…", authDomain: "your-project.firebaseapp.com", projectId: "your-project", storageBucket: "your-project.firebasestorage.app", messagingSenderId: "…", appId: "…", measurementId: "G-…" };
-
Serve over HTTP (not
file://, so ES modules + the service worker work):npm start
Tailwind is precompiled to a static styles.css (committed to the repo).
Rebuild it whenever you change markup or class names in index.html / app.js:
npm run build:cssThe content scanner reads index.html, app.js, and runtime modules in src/, so any class used there is
included. (The old Tailwind Play CDN was removed — it isn't production-grade and
broke behind Cloudflare Rocket Loader.)
Use Node.js 22 or newer. Install local development tools once:
npm.cmd ci
npm.cmd test
npm.cmd run checkOn macOS/Linux, use npm test and npm run check (not run on those platforms).
The tests cover money calculations, account-schema compatibility, AES-GCM
round-trips/tamper rejection, session boundaries, and public-asset caching.
They do not replace authenticated browser or Firestore security-rule tests.
Run npm.cmd run test:rules with Java 21+ available to verify owner isolation,
atomic snapshot/history writes, stale revisions, immutable history, and purge
permissions against the local demo Firestore emulator. This never deploys rules.
The next implementation stages are tracked in
implementation-plan.md. Available-credit
forms, encrypted history, and Progress page are implemented on the feature branch.
Production rollout still requires the compatible rules and application deployment.
The authoritative rules live in firestore.rules (version
controlled). They enforce owner-only access (request.auth.uid == uid)
across each user's subtree and strictly validate the encrypted card envelope and
the meta/crypto doc (exact keys, types, and size bounds); everything else —
including any other /meta doc or the user container doc — is denied by default.
Deploy: Firebase Console → Firestore → Rules → paste firestore.rules →
Publish (or firebase deploy --only firestore:rules with the Firebase CLI).
Why: keeps config out of version control.
-
Add GitHub Actions secrets (repo → Settings → Secrets and variables → Actions):
FIREBASE_API_KEY FIREBASE_AUTH_DOMAIN FIREBASE_PROJECT_ID FIREBASE_STORAGE_BUCKET FIREBASE_MESSAGING_SENDER_ID FIREBASE_APP_ID FIREBASE_MEASUREMENT_ID -
env.jsis gitignored and generated at build time by.github/workflows/static.yml, which rsyncs the repo intodist/, writesdist/env.jsfrom the secrets, and deploys to Pages. -
Settings → Pages → build with GitHub Actions.
styles.cssis committed, so no build step runs in CI — the workflow just copies files. Rebuild the CSS locally (see above) and commit it when needed.
To repoint the app at a new Firebase project (e.g. a different owner account):
- Export JSON from the current app (your migration payload / backup).
- Create the new project → add a Web app → enable Google auth → create
Firestore → publish
firestore.rules→ add authorized domains (localhost,127.0.0.1,pdt.avijitroy.com). - Update config: local
env.jsand the GitHub Actions secrets above. - Sign in with the account you'll use going forward, set your Lock Mode passphrase, then Import the JSON.
- Verify, then decommission the old project.
Test locally against the new project before updating the production secrets.
- Sort by Name / APR / Balance / Utilization / Monthly Interest / Monthly Interest per $100 (persisted).
- Utilization View: switch Bar ↔ Donut in the controls.
- Inline edit: click ✏️ → fields expand; Enter saves, Esc cancels.
- Quick pay: ±$50 buttons for fast balance updates; Undo delete toast.
- Payoff Plan: compare Avalanche and Snowball using one combined monthly budget, or estimate each strategy's budget for a target number of months. Optional planned baseline payments are simulation inputs, not bank minimums.
- Optimizer: pick the 0% target card, optionally cap its utilization → move list + net savings (intro vs. fees).
- Import/Export: CSV or JSON from the header's Settings & data menu.
- Installable; works offline for most flows. The service worker is network-first (always serves the latest deploy, falls back to cache offline), and Firestore queues writes offline and syncs when reconnected.
- To reset cache (dev): DevTools → Application → Clear storage, then hard-reload.
See project-plan.md for the full phased plan and
project-status.md for a dated change log.
- Lock Mode (client-side E2EE)
- Payoff schedule simulator
- CSV / JSON import
- Dark mode
- Guest / local-only mode (try before sign-in)
- Firebase App Check (reCAPTCHA v3)
- Multi-currency support
- Automated calculation/crypto/session tests and CI gates
For the current tracking implementation and rollout requirements, see
implementation-plan.md and
docs/tracking-release.md.
- Google popup blocked — falls back to redirect; ensure Authorized domains
includes
localhost/127.0.0.1. - Nothing happens — check that
env.jsloads beforeapp.js(Network tab). - Forgot passphrase — data is unrecoverable by design; re-import a JSON
backup, or reset by deleting the
meta/cryptodoc and your cards. - "Permission denied" — recheck the deployed Firestore rules.
- Stale UI — the network-first SW self-heals on reload; if needed, clear storage and hard-reload.
MIT
Built with ❤️ by Avijit Roy. Questions or ideas? Open an issue.