Case study · Fintech
LedgerFlow: personal finance platform
Multi-tenant budgeting and forecasting platform with bank statement ingestion and AI-powered transaction categorization.
- Industry
- Personal finance
- Timeline
- 5 weeks to production
- Year
- 2026
- Services
- Product engineering, AI integration, DevOps
The problem
Budgeting apps fall into two camps. Cloud services that want your bank credentials and sell your patterns, or spreadsheets that die the third week of manual entry. The owner wanted neither: full data ownership, real forecasting, and imports from a bank whose CSV exports use Windows-1250 encoding, fourteen loosely documented columns, and no stable transaction IDs.
What we built
A self-hosted personal finance platform: transactions, budgets, recurring detection, category rules, and cash-flow forecasting, multi-tenant from the first migration so it can serve a family or a small team without a rewrite.
The interesting problems were in the pipeline:
- Bank CSV ingestion that survives reality. The bank’s export has no unique transaction ID, so deduplication uses a content hash that includes the bank reference field. Encoding detection handles CP1250 exports that lie about their charset.
- AI categorization with a feedback loop. New transactions go through an LLM gateway for categorization. Every manual correction becomes a persistent rule, so the model’s job shrinks over time instead of repeating the same mistakes.
- Forecasting. Recurring transactions are detected from history and projected forward, giving a rolling cash-flow curve rather than a static budget table.
Architecture
FastAPI backend with PostgreSQL row-level security for tenant isolation, Redis and Celery for import and categorization jobs, React SPA frontend. Everything ships as Docker containers behind a Traefik reverse proxy with automatic TLS, deployed by pulling the repo and running one compose command.
LLM calls route through a self-hosted gateway with provider failover, so categorization keeps working when a provider throttles, and costs stay near zero on free tiers.
Security notes
Row-level security enforced in the database, not just the API layer. Secrets live in gitignored env files. Sessions are server-side. The public surface is one TLS endpoint behind a reverse proxy with rate limiting and security headers.
Outcome
A monthly close that used to be an evening of spreadsheet work now takes one CSV upload. Categorization accuracy crossed 95 percent within weeks thanks to the correction-to-rule loop. The platform runs on a mini PC and has survived every bank export quirk thrown at it since launch.