Skip to main content

Quickstart

Get OpenFinance up and running on your local machine in under 5 minutes.

Prerequisites

  • Node.js 20+ (download)
  • Yarn 4.0.0 (included via corepack)
  • OpenRouter API key for AI features (get one)

Setup

1

Clone the repository

git clone https://github.com/yagudaev/openfinance.git
cd openfinance
2

Enable Yarn via Corepack

corepack enable
corepack prepare yarn@4.0.0 --activate
3

Install dependencies

yarn install
4

Set up environment variables

Create a .env file in the project root:
.env
# Database (SQLite, stored locally)
DATABASE_URL="file:./prisma/data/openfinance.db"

# Authentication
BETTER_AUTH_SECRET="generate-a-random-secret-here"
BETTER_AUTH_URL="http://localhost:3000"

# AI (required for statement processing and chat)
OPENROUTER_API_KEY="sk-or-..."

# Optional: Google OAuth
# GOOGLE_CLIENT_ID="..."
# GOOGLE_CLIENT_SECRET="..."
Generate a secret for BETTER_AUTH_SECRET:
openssl rand -base64 32
5

Initialize the database

yarn db:generate
yarn db:push
This creates the SQLite database at prisma/data/openfinance.db and sets up all tables.
6

Start the dev server

yarn dev
Open http://localhost:3000 in your browser.

First Steps

Once the app is running:
  1. Create an account — sign up with your email and password on the login page
  2. Configure settings — go to Settings to set your fiscal year, timezone, and AI model
  3. Upload a bank statement — navigate to Statements and upload a PDF bank statement
  4. Wait for processing — the AI will extract transactions and verify balances automatically
  5. Explore your data — view transactions, check the dashboard, or chat with the AI advisor

Available Commands

CommandDescription
yarn devStart the dev server with Turbopack
yarn buildCreate a production build
yarn lintRun ESLint
yarn db:pushPush Prisma schema changes to the database
yarn db:studioOpen Prisma Studio (database browser)
yarn db:generateRegenerate the Prisma client
yarn db:migrateRun database migrations
yarn testRun Playwright end-to-end tests

Next Steps