A self-hosted personal finance application for tracking transactions, analyzing spending, and managing household budgets. Own your financial data.
Β Β
One-click managed hosting β try for free, no credit card required. Learn more β
πΈ Screenshots
| Analytics Breakdown | Money Flow |
| Transaction Management | CSV Upload |
| Household Budget | User Budget |
Your financial data is some of the most sensitive information you have. Finance Tracker is designed to run on your own hardware β a home server, a VPS, or anywhere you choose β so your transaction history, budgets, and spending patterns never leave your control. No third-party accounts, no data harvesting, no subscriptions. Just a Docker image you can deploy in minutes.
Prefer not to manage your own server? Deploy to a fully managed host with automatic updates, SSL, and a built-in PostgreSQL database β no server setup required.
Render β free tier, no credit card required. Provisions the app and PostgreSQL automatically from render.yaml. The app will auto-update whenever a new version is released.
Warning
Render's free PostgreSQL instances are wiped after 90 days. To retain your data permanently, upgrade the database to the Starter plan ($7/month) in your Render dashboard under the database's Settings β Plan.
Railway β usage-based pricing (~$5β10/month). Persistent data with no expiry. Provisions the app and PostgreSQL automatically.
See DOCKER_DEPLOYMENT.md for self-hosted VPS options.
- π Multi-Household Support β Manage multiple households with role-based member access and invitations
- π° Transaction Management β Track income, expenses, and transfers with detailed categorization
- π Analytics & Reporting β Visual category breakdowns, Sankey money-flow diagrams, and spending insights
- πΈ Budget Management β Set and track budgets per household and per user with overage alerts
- π CSV Import/Export β Bulk transaction upload with intelligent duplicate detection and deduplication tools
- π Authentication & Security β Email/password auth with 2FA, email verification, rate limiting, and input validation
- π― Smart Definitions β Customizable accounts, categories, transaction types, and users
- π± Responsive UI β Clean dashboard with dark/light theme support built on shadcn/ui
- π§ Email Notifications β Weekly spending summaries and transactional emails via Resend
Frontend β Next.js 15 (App Router), React 19, TypeScript, Tailwind CSS v4, shadcn/ui, Recharts, D3
Backend β Next.js API Routes, Prisma ORM 7, PostgreSQL 17, Zod validation
Auth β Better Auth (email/password, 2FA, email verification, sessions)
Email β Resend for transactional emails and weekly summaries
Testing β Vitest + React Testing Library (unit), Playwright (E2E)
DevOps β GitHub Actions CI/CD, Docker (GHCR), Biome (formatter/linter)
- Node.js 24+ and npm
- PostgreSQL 12+ (or use Docker)
The fastest way to run Finance Tracker. Includes PostgreSQL β no external database needed.
cp .env.docker .env
# Edit .env with your secrets and email config
docker compose up -dOpen http://localhost:3000 to use the app. Database migrations run automatically on first startup.
π Full deployment guide: Docker Deployment Guide
-
Clone and install:
git clone https://github.com/dfsf5263/finance-tracker.git cd finance-tracker npm install -
Configure environment:
cp .env.example .env.local # Edit .env.local with your database URL and secrets -
Set up the database:
npx prisma migrate dev npx prisma db seed
-
Start the dev server:
npm run dev
Open http://localhost:3000.
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
β | PostgreSQL connection string |
BETTER_AUTH_SECRET |
β | Session signing secret (32+ characters) |
APP_URL |
β | Application URL for auth callbacks and emails |
RESEND_API_KEY |
Resend API key β required for email features (verification, weekly summaries) | |
RESEND_FROM_EMAIL |
Sender email address β required if RESEND_API_KEY is set |
|
RESEND_REPLY_TO_EMAIL |
Reply-to email for support | |
SKIP_MIGRATIONS |
Set to true to skip auto-migration on Docker startup |
|
ENABLE_SEEDING |
Set to true to seed default data on Docker startup |
See .env.example for a complete template.
Finance Tracker has a comprehensive 3-tier testing strategy:
npm run test # Run unit tests
npm run test:watch # Watch mode
npm run test:coverage # Run with coverage reportPowered by Vitest with React Testing Library and vitest-mock-extended.
# Start the E2E database
npm run db:e2e:up
# Reset and seed the E2E database
npm run db:e2e:reset
# Run E2E tests
npm run test:e2e
# Run with browser UI
npm run test:e2e:ui
# Shut down the E2E database
npm run db:e2e:downPowered by Playwright running Chromium against a real PostgreSQL database.
The project uses GitHub Actions with two workflows:
CI (ci.yml) β Runs on every push and pull request to main:
- Lint, Format & Typecheck β
npm run check(Biome + TypeScript) - Unit Tests β
npm run test(runs in parallel with step 1) - E2E Tests β Playwright against a PostgreSQL service container (runs after steps 1 & 2 pass)
Release (release.yml) β Builds multi-arch Docker images (amd64 + arm64) and pushes to GitHub Container Registry:
- Push to
mainβ nightly build::nightly,:nightly-YYYYMMDD,:nightly-sha-<commit> - Tag push (
v*) β stable release::latest,:<version>,:sha-<commit>+ GitHub Release with auto-generated notes - Version tags are immutable β the build fails if the version already exists in GHCR
See Releasing for the full release process.
src/
βββ app/
β βββ (auth)/ # Auth pages (sign-in, sign-up, forgot-password, 2FA)
β βββ api/ # API routes (transactions, budgets, analytics, auth)
β βββ dashboard/
β βββ analytics/ # Breakdown charts, Sankey money-flow
β βββ transactions/ # Manage & CSV upload
β βββ budgeting/ # Household & user budgets
β βββ definitions/ # Accounts, categories, types, users, households
β βββ settings/ # Profile, security, household, email subscriptions
β βββ utility/ # Duplicate detection & deduplication
βββ components/ # Reusable React components + shadcn/ui
βββ contexts/ # React contexts (household multi-tenancy)
βββ hooks/ # Custom hooks (CRUD, active month, entity counts)
βββ lib/ # Business logic, validation, auth, analytics, email
βββ types/ # TypeScript type definitions
prisma/
βββ schema.prisma # Database schema
βββ seed.ts # Database seeding script
βββ migrations/ # Prisma migrations
tests/
βββ e2e/ # Playwright E2E test specs
Multi-arch images (amd64 + arm64) are published to GitHub Container Registry:
docker pull ghcr.io/dfsf5263/finance-tracker:latestThe container automatically runs database migrations on startup (skip with SKIP_MIGRATIONS=true).
See the Docker Deployment Guide for Docker Compose quick deploy, reverse proxy setup, monitoring, backups, and troubleshooting.
npm run dev # Start dev server (Turbopack)
npm run build # Production build
npm run check # Lint + format check + typecheck
npm run format # Format with Biome
npm run test # Unit tests
npm run test:e2e # E2E tests
npx prisma studio # Database GUI
npx prisma migrate dev # Create a new migration- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run checks:
npm run format && npm run check - Commit and push
- Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.