A self-hosted accounting application for tracking income and expenses, with Stripe integration and AI-powered receipt processing.
- 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
- Next.js 16 / React 19
- SQLite with Drizzle ORM
- Tailwind CSS
- Stripe API
- Google Gemini API (for receipt OCR)
- Node.js 18+
- pnpm (
npm install -g pnpm)
git clone <repository-url>
cd accounting
pnpm installCopy the example environment file:
cp .env.local.example .env.localEdit .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 |
The SQLite database is automatically created on first run. If you need to push schema changes:
pnpm drizzle-kit pushpnpm devOpen http://localhost:3000 in your browser.
- Navigate to Stripe in the sidebar
- Click Sync Now to pull all balance transactions from your Stripe account
- Transactions are automatically imported and deduplicated
- Navigate to Receipts in the sidebar
- Drag and drop receipt images/PDFs (supports batch upload)
- AI automatically extracts vendor, amount, date, and suggests tax categories
- Review extracted data, adjust categories if needed, and save as expenses
- Navigate to Expenses > Add Expense
- Fill in vendor, amount, date, category, and optional description
- Optionally upload a receipt attachment
- 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
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
| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build for production |
pnpm start |
Start production server |
pnpm lint |
Run ESLint |
Private - Emergent Methods