Skip to content

fortii2/bookkeeper

Repository files navigation

Bookkeeper Tools MVP

Single-user CSV import and dashboard MVP built with Next.js App Router + PostgreSQL + Prisma.

Stack

  • Next.js 16 App Router
  • PostgreSQL 16
  • Prisma ORM
  • TypeScript CSV parsing with csv-parse
  • Recharts for dashboard visualizations
  • Vitest for utility tests

Local setup

  1. Install dependencies:

    pnpm install
  2. Copy env vars:

    cp .env.example .env
  3. Start PostgreSQL:

    docker compose up -d
  4. Create tables and Prisma client:

    pnpm db:generate
    pnpm db:migrate --name init
  5. Seed the default account and categories:

    pnpm db:seed
  6. Start the app:

    pnpm dev

Open http://localhost:3000/import and upload samples/sample-bank-export.csv.

You can also test the Amex adapter with samples/amex-ca-export.csv.

Supported CSV format

The MVP supports two explicit templates:

  • sample_bank_v1
  • amex_ca_v1
  • rbc_credit_v1

Expected headers:

Date,Description,Amount
2026-03-05,STARBUCKS,-6.25
2026-03-10,Payroll,2450.00

Rules:

  • Date must be YYYY-MM-DD
  • Negative Amount means expense
  • Positive Amount means income
  • UTF-8 encoding only
  • Maximum file size is 5 MB

Amex Canada assumptions:

  • Uses the Date column as the transaction date
  • Accepts MM/DD/YYYY or YYYY-MM-DD
  • Positive Amount means card spend
  • Negative Amount means refund or payment

RBC credit card assumptions:

  • Uses Transaction Date
  • Accepts M/D/YYYY
  • Uses CAD$ when available, otherwise USD$
  • Negative amount means card spend
  • Positive amount means payment or refund

Routes

  • /import
  • /dashboard
  • /transactions
  • /imports
  • POST /api/imports/upload
  • GET /api/analytics/summary?month=YYYY-MM
  • GET /api/analytics/by-day?month=YYYY-MM
  • GET /api/analytics/by-category?month=YYYY-MM

Current limits

  • Single user only
  • One bank CSV template only
  • No auth
  • No transaction editing
  • No CSV file retention after import
  • No RAG or AI analysis yet

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors