Skip to content

Free, Stripe integration, Batch receipt upload (that works)

Notifications You must be signed in to change notification settings

emergentmethods/accounting

Repository files navigation

Emergent Methods Accounting

A self-hosted accounting application for tracking income and expenses, with Stripe integration and AI-powered receipt processing.

Features

  • Dashboard - Overview of transactions, expenses, income, and spending with date range filtering
  • Stripe Integration - Sync balance transactions (charges, payouts, refunds) directly from Stripe
  • Receipt Upload - Batch upload receipts/invoices with AI-powered OCR to automatically extract vendor, amount, date, and suggest tax categories
  • Expense Management - Manual expense entry with category assignment and receipt attachments
  • Transaction Tracking - View, filter, and edit all transactions from various sources
  • Tax Categories - Organize expenses by IRS Schedule C line items for tax preparation

Tech Stack

  • Next.js 16 / React 19
  • SQLite with Drizzle ORM
  • Tailwind CSS
  • Stripe API
  • Google Gemini API (for receipt OCR)

Prerequisites

  • Node.js 18+
  • pnpm (npm install -g pnpm)

Setup

1. Clone and install dependencies

git clone <repository-url>
cd accounting
pnpm install

2. Configure environment variables

Copy the example environment file:

cp .env.local.example .env.local

Edit .env.local and add your API keys:

# Stripe API Key (get from https://dashboard.stripe.com/apikeys)
STRIPE_SECRET_KEY=sk_test_or_sk_live_xxx

# Google Gemini API Key (get from https://aistudio.google.com/apikey)
GEMINI_API_KEY=your_gemini_api_key
Variable Required Description
STRIPE_SECRET_KEY For Stripe sync Your Stripe secret key (test or live)
GEMINI_API_KEY For receipt OCR Google Gemini API key for AI-powered receipt extraction

3. Initialize the database

The SQLite database is automatically created on first run. If you need to push schema changes:

pnpm drizzle-kit push

4. Start the development server

pnpm dev

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

Usage

Syncing Stripe Transactions

  1. Navigate to Stripe in the sidebar
  2. Click Sync Now to pull all balance transactions from your Stripe account
  3. Transactions are automatically imported and deduplicated

Uploading Receipts

  1. Navigate to Receipts in the sidebar
  2. Drag and drop receipt images/PDFs (supports batch upload)
  3. AI automatically extracts vendor, amount, date, and suggests tax categories
  4. Review extracted data, adjust categories if needed, and save as expenses

Adding Expenses Manually

  1. Navigate to Expenses > Add Expense
  2. Fill in vendor, amount, date, category, and optional description
  3. Optionally upload a receipt attachment

Viewing Transactions

  • Navigate to Transactions to see all income and expense records
  • Use the date picker to filter by date range
  • Click on transactions to edit details

Project Structure

src/
├── app/                  # Next.js app router pages
│   ├── api/              # API routes
│   ├── expenses/         # Expense management pages
│   ├── receipts/         # Receipt upload page
│   ├── stripe/           # Stripe sync page
│   └── transactions/     # Transaction listing page
├── components/           # React components
└── lib/
    ├── db/               # Database schema and connection
    └── utils.ts          # Utility functions

Scripts

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm start Start production server
pnpm lint Run ESLint

License

Private - Emergent Methods

About

Free, Stripe integration, Batch receipt upload (that works)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages