Komediruzecki 619f180373 merge: main 5c2798da into the first week
Brings in 580168e8 and the six PRs merged on it: #628 and #623 (tests), #622, #621, #624 and
#625. The branch already carried #621's first commit (3b265179), #622's first commit (50841aaf)
and #624's and #625's commits. Main's reviewed versions win, and the branch's later work stays on
top of them.

- #621's review commit: the Accounts page takes the badge's colour and the card's icon from
  core/accountTypes.ts, the constellation and the edit dialog read the type through
  knownAccountType, and an unknown type opens as a disabled "Other account" option. The branch's
  credit work moves into those maps: accountTypeTone gives credit 'expense', accountTypeIcon gives
  it the card and cash the banknotes, the constellation keeps its "Credit card" entry and drops the
  dead "investment" one, and the edit dialog offers Credit Card. accountForm.ts imports main's
  storedAccountType and the branch's takesCreditLine.
- #622's review commit is dev-changelog only, and main's entry replaces the branch's copy. The
  achievements code is the branch's, which sums through baseAmount wherever #622 does.
- #624 and #625: the onboarding CSS and spec are main's plus the branch's later commits.

The clash: the branch makes credit a type, and #621's tests on main use credit as the type a build
does not know. After the merge a credit account shows as a credit card on every display #621
reads through knownAccountType (badge word, colour, icon, constellation, Transactions select, edit
dialog), and the import and MCP create_account take credit, as the account form does. #621's
tests that need an unknown type use sock_drawer, which no build will have; the branch's own switch
from credit to loan stays in the tests that are not #621's. New checks: a credit card on each
display (accountTypes, accountsPageTypes, accountConstellation, transactionsAccountTypeWord, the
edit dialog in accountForm), an import contract scenario in both runtimes and MCP create_account.

Changelogs: main's entries stay where main has them, and the branch's stay under [Unreleased].
The branch's credit entries now say that the import and the MCP server take a credit card.
2026-10-18 16:25:35 +02:00

Token Circles — open-source personal finance manager

Version License AGPL-3.0 PRs Welcome

Track transactions, budgets, accounts, loans, and investments — with analytics, calculators, and PDF reports. Built local-first: run it entirely in your browser with no account and no server, self-host your own backend, or use the managed cloud for sync across devices.

Status: the managed cloud service (tokencircles.com) is in beta. The app itself — local-only and self-hosted — is free and usable today.

Three ways to run it

Mode Data lives Account Cost
Local-first (default) Your browser (IndexedDB) None Free
Self-hosted Your own Cloudflare Worker + D1 Your own Free
Managed cloud Token Circles (our Cloudflare) Sign in Free tier + paid plans

All core budgeting, analytics, calculators, and monthly/annual PDF exports work in every mode. Cloud sync, managed email reminders, receipt storage, and advanced (tax / P&L) reports are the managed-cloud paid features — or run them yourself when self-hosting.

Quick start (local-first, no account)

git clone https://github.com/Komediruzecki/token-circles.git
cd token-circles
pnpm install
pnpm dev            # frontend on http://localhost:3800

Open http://localhost:3800 — it runs entirely in your browser (client-only IndexedDB) with seeded demo data; no account or server needed. See CONTRIBUTING.md for the full dev setup.

Features

  • Transactions — income / expense / transfers with categories, tags, notes, and payment methods; bulk edit; quick-add (Ctrl+Shift+T); Excel & Google-Sheets import with column mapping.
  • Accounts — giro / savings / investment / cash, starting balances, transfers, balance history.
  • Budgets — monthly category budgets with rollover, plus zero-based budgeting.
  • Analytics — category trends, spending heatmap, income/expense Sankey, period comparisons.
  • Calculators — loan amortization (variable rates + prepayments), retirement, compound interest, emergency fund, FIRE, rent-vs-buy.
  • Investments — portfolio tracker with live price lookup and allocation breakdown.
  • Reports & export — CSV / JSON export and PDF monthly/annual reports (tax & P&L on paid / self-host).
  • Cloud (managed or self-hosted) — sync across devices, email reminders (budget alerts + spending reports), receipt storage, multi-profile households.
  • Dark / light theme, mobile-responsive, PWA, and a no-account demo.

Architecture

  • Frontend — SolidJS + TypeScript + Vite. Runs standalone on IndexedDB, or against the Worker API.
  • Backend (current) — worker/: a Cloudflare Worker (Hono) with D1 (SQLite) for data and R2 for receipts. Auth is Google sign-in + email/password (HS256 JWT cookie); Stripe for billing; Resend for email; Cloudflare Turnstile on the auth forms.
  • Testing — the frontend and the Worker each have a vitest suite; the Playwright e2e suite drives the real built app against a locally-run Worker (pnpm run test:e2e).

The original Node/Express + SQLite server has been removed, along with the Dockerfile and docker-compose.yml that built it. Self-hosting means running your own Worker — see worker/README.md. The old server's guides are at tag v5.9.3 for anyone still running an image built from it.

token-circles/
├── frontend/   # SolidJS app (local-first, or against the Worker)
├── worker/     # Cloudflare Worker API — D1 + R2 (the only backend)
├── shared/     # pure TypeScript imported by both the app and the Worker
├── packages/   # standalone libraries (pwa-kit: install, update and offline plumbing)
├── docs/       # specs, guides, postmortems
└── .github/    # CI + deploy workflows, issue/PR templates

Contributing or pointing an agent at this repo? Start with AGENTS.md.

Self-hosting

Run your own backend on Cloudflare's free tier (Workers + D1 + R2). See worker/README.md for the full setup — create the D1 database and R2 bucket, apply migrations, set secrets, and deploy — then point the frontend at it with VITE_API_URL.

Documentation

License

GNU AGPL-3.0 — Copyright (C) 2026 Komediruzecki.

Token Circles is free software: use, study, share, and modify it under the AGPL. If you run a modified version as a network service, you must offer its users the corresponding source (AGPL §13).

S
Description
No description provided
Readme AGPL-3.0
31 MiB
Languages
TypeScript 93.5%
CSS 5.2%
JavaScript 0.8%
HTML 0.4%