Skip to content

abhiFSD/AI-Finance-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’° AI Finance Manager

Upload a bank statement. AI extracts every transaction, categorizes your spending, and becomes your personal financial advisor.

TypeScript Express React Claude Prisma PostgreSQL


Why This Exists

Bank statements are a mess. PDFs with weird formatting, CSVs with inconsistent columns, Excel files from 9 different Indian banks β€” each with their own layout. Manually entering transactions is tedious. Categorizing them is worse.

This app solves that: drop in a bank statement β†’ AI does the rest.


Architecture

graph LR
    A[πŸ“„ Bank Statement] -->|Upload| B[Document Processor]
    B -->|OCR + Parse| C[AI Extractor<br/>Claude Sonnet]
    C -->|Structured Data| D[Review UI]
    D -->|Approve| E[(PostgreSQL<br/>+ Prisma)]
    
    F[πŸ’¬ Chat] -->|Natural Language| G[AI Advisor<br/>21 Tools]
    G -->|Query/Mutate| E
    
    E --> H[πŸ“Š Dashboard]
    E --> I[πŸ“ˆ Budgets & Goals]
    E --> J[πŸ’³ Accounts]
Loading

What It Does

πŸ€– AI-Powered

Feature How It Works
Smart Document Processing Upload PDF, Excel, CSV, TXT β†’ AI extracts every transaction with date, amount, merchant, category
AI Financial Advisor Chat interface with 21 specialized tools β€” ask "where am I spending the most?" and get real answers from your data
Auto-Categorization AI categorizes transactions (Food, Shopping, Utilities, Transport, etc.) β€” no manual tagging
Bank Detection Automatically identifies which bank the statement is from and applies the right parser
Merchant Normalization Cleans up raw text β€” "PAYPAL *NETFLIX" β†’ "Netflix", "POS 4523 SWIGGY" β†’ "Swiggy"

πŸ’Ό Core Features

  • Review-First Workflow β€” Extract β†’ Review β†’ Edit β†’ Import (you stay in control)
  • Multi-Account β€” Bank accounts, credit cards, wallets, investments, loans
  • Dashboard β€” Income vs expenses, trends, net worth, spending breakdown
  • Budgets β€” Monthly budgets by category with progress tracking
  • Goals β€” Savings goals with contribution tracking
  • Credit Health β€” Credit card utilization, payment tracking
  • 20 Prisma Models β€” User, Account, Transaction, Document, Budget, Goal, Investment, Loan, CreditCard, ChatRoom, and more

🏦 Indian Bank Parsers

Built-in parsers for 9 Indian banks: HDFC, SBI, ICICI, Axis, Kotak, PNB, BOB, Canara, Union Bank. Each handles that bank's specific statement format.


Tech Stack

Layer Technology Why
Backend Express.js + TypeScript Fast, typed, battle-tested
AI Anthropic Claude (Sonnet) Best at structured extraction
Database PostgreSQL + Prisma ORM 20 models, type-safe queries
Frontend Next.js + React 18 + MUI Modern, responsive
Queue Bull + Redis Background document processing
Auth JWT + bcrypt Secure session management
Testing Jest + Playwright 31 test files, unit + E2E

The AI Chat (21 Tools)

The chat isn't a gimmick β€” it has real tools that read and write your financial data:

Read Tools (14): get_accounts Β· get_transactions Β· get_budgets Β· get_goals Β· get_categories Β· get_spending_summary Β· get_income_summary Β· get_net_worth Β· get_investments Β· get_loans Β· get_credit_cards Β· get_credit_health Β· get_insights Β· get_alerts

Write Tools (7): create_transaction Β· create_budget Β· create_goal Β· update_transaction Β· contribute_to_goal Β· create_account Β· categorize_transactions

Ask in plain English:

  • "How much did I spend on food this month?"
  • "Add β‚Ή500 expense for groceries today"
  • "What's my savings rate?"
  • "Show me my top 5 spending categories"

Quick Start

# Clone
git clone https://github.com/abhiFSD/AI-Finance-Manager.git
cd AI-Finance-Manager

# Backend
npm install
cp .env.example .env    # Add your Anthropic API key
npx prisma generate
npx prisma db push

# Frontend (separate terminal)
cd finance-app
npm install
npm run dev

# Seed test data
npm run seed
# Login: john.doe@example.com / Password123!

Requirements: Node.js 18+, Redis (for job queues), Anthropic API key


Project Structure

β”œβ”€β”€ src/                          # Backend (Express + TypeScript)
β”‚   β”œβ”€β”€ api/                      # Route handlers
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ ai-chat.service.ts    # AI advisor (21 tools)
β”‚   β”‚   β”œβ”€β”€ ai-tools.ts           # Read-only financial tools
β”‚   β”‚   β”œβ”€β”€ ai-tools-crud.ts      # Write tools
β”‚   β”‚   β”œβ”€β”€ parsers/              # 9 Indian bank parsers
β”‚   β”‚   β”œβ”€β”€ extraction/           # Transaction extraction
β”‚   β”‚   β”œβ”€β”€ categorization/       # Auto-categorization
β”‚   β”‚   β”œβ”€β”€ ocr/                  # Document OCR
β”‚   β”‚   β”œβ”€β”€ analytics/            # Spending analytics
β”‚   β”‚   └── automation/           # Recurring transactions
β”‚   β”œβ”€β”€ middleware/                # Auth, rate limiting
β”‚   └── workers/                  # Background job processor
β”œβ”€β”€ finance-app/                  # Frontend (Next.js + React)
β”‚   β”œβ”€β”€ src/app/                  # Pages (dashboard, chat, etc.)
β”‚   β”œβ”€β”€ src/components/           # Reusable UI components
β”‚   └── src/store/                # State management
β”œβ”€β”€ prisma/
β”‚   └── schema.prisma             # 20 models
└── test-data/                    # Bank statement samples

API Endpoints

Method Endpoint What It Does
POST /api/auth/register Register
POST /api/auth/login Login β†’ JWT
POST /api/documents/upload/single Upload bank statement
GET /api/documents/:id Get extracted data
POST /api/documents/:id/import Import reviewed transactions
GET /api/transactions List transactions (filterable)
POST /api/chat/rooms/:id/messages Chat with AI advisor
GET /api/analytics/spending Spending breakdown
GET /api/net-worth Net worth calculation

License

MIT β€” use it, learn from it, build on it.

About

πŸ’° AI-powered personal finance β€” smart document processing, AI financial advisor (21 tools), auto-categorization. Express + React + Prisma + Claude

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors