A personal AI-powered finance analyst that helps you find savings opportunities by analyzing your bank transactions.
- π¦ Bank Connection - Securely connect bank accounts via Plaid
- π Spending Analysis - Visual breakdown of spending by category
- π€ AI Insights - Claude-powered detection of:
- Unused subscriptions
- Wasteful spending patterns
- Bill negotiation opportunities
- π¬ AI Chat - Ask natural language questions about your finances
- π Smart Alerts - Proactive notifications for unusual activity
- π° Savings Dashboard - Track potential monthly savings
- Frontend: Next.js 14 (App Router), React 18, Tailwind CSS
- UI Components: shadcn/ui
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js (Credentials)
- Bank Integration: Plaid API (Sandbox)
- AI: Anthropic Claude (Sonnet 4)
- Deployment: Vercel
- Node.js 18+
- PostgreSQL database (local or cloud)
- Plaid account (free sandbox)
- Anthropic API key
git clone <repository-url>
cd finance-analyst
npm installCopy the example environment file:
cp .env.example .env.localFill in the values:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/finance_analyst"
# NextAuth
NEXTAUTH_SECRET="your-secret-key-here"
NEXTAUTH_URL="http://localhost:3000"
# Plaid (get from https://dashboard.plaid.com/signup)
PLAID_CLIENT_ID="your-plaid-client-id"
PLAID_SECRET="your-plaid-sandbox-secret"
PLAID_ENV="sandbox"
# Anthropic (get from https://console.anthropic.com/)
ANTHROPIC_API_KEY="your-anthropic-api-key"
# Demo Mode (optional - uses mock data)
DEMO_MODE="false"# Generate Prisma client
npx prisma generate
# Push schema to database
npx prisma db push
# (Optional) Seed with demo data
npm run db:seednpm run devOpen http://localhost:3000 in your browser.
For presentations without real API credentials, enable demo mode:
DEMO_MODE="true"Then seed the database with demo data:
npm run db:seedDemo login credentials:
- Email:
demo@financeai.com - Password:
demo123456
When using Plaid in sandbox mode, use these test credentials in the Plaid Link flow:
- Username:
user_good - Password:
pass_good - Select any institution
src/
βββ app/
β βββ (auth)/ # Login/Register pages
β βββ (dashboard)/ # Protected dashboard pages
β β βββ dashboard/ # Main overview
β β βββ chat/ # AI chat interface
β β βββ savings/ # Savings opportunities
β β βββ alerts/ # Financial alerts
β βββ api/ # API routes
β β βββ auth/ # NextAuth endpoints
β β βββ plaid/ # Plaid integration
β β βββ ai/ # Claude AI endpoints
β β βββ dashboard/ # Dashboard data
β βββ page.tsx # Landing page
βββ components/
β βββ ui/ # shadcn/ui components
β βββ dashboard/ # Dashboard components
β βββ charts/ # Data visualizations
β βββ plaid/ # Plaid Link integration
βββ lib/
β βββ auth.ts # NextAuth configuration
β βββ prisma.ts # Database client
β βββ plaid.ts # Plaid API client
β βββ claude.ts # Claude AI integration
β βββ utils.ts # Helper functions
βββ types/
βββ next-auth.d.ts # Type declarations
| Route | Method | Description |
|---|---|---|
/api/auth/register |
POST | Create new user account |
/api/plaid/create-link-token |
POST | Initialize Plaid Link |
/api/plaid/exchange-token |
POST | Exchange Plaid public token |
/api/plaid/transactions |
GET/POST | Fetch/sync transactions |
/api/ai/analyze |
GET/POST | Get/generate AI insights |
/api/ai/chat |
POST | Send message to AI assistant |
/api/dashboard |
GET | Get dashboard overview data |
/api/alerts |
GET/PATCH | Manage alerts |
- Landing Page - Show value proposition
- Sign Up - Quick registration
- Connect Bank - Plaid sandbox flow
- Dashboard - Highlight balance, spending chart, AI insights card
- AI Insights - "Found 3 unused subscriptions - save $55/month!"
- AI Chat - Ask "Why did I spend so much last month?"
- Savings Page - Show all opportunities (~$200+/month total)
- Access tokens are stored encrypted in production
- Read-only bank access via Plaid
- No storage of banking credentials
- Session-based authentication with JWT
- CSRF protection on all API routes
- Push to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
npm run build
npm startHere is the roadmap for upcoming features:
- React Native / Flutter App: Native mobile experience for iOS and Android.
- Biometric Login: FaceID/TouchID integration for faster access.
- Push Notifications: Real-time alerts for large transactions.
- Investment Portfolio: Connect brokerage accounts (Robinhood, E*TRADE).
- Crypto Integration: Track Bitcoin/Ethereum holdings alongside fiat currency.
- Net Worth Calculator: Unified view of assets vs. liabilities.
- Bill Negotiation: AI agent that automatically negotiates lower rates for internet/cable bills.
- Subscription Cancellation: One-click cancellation for unwanted services.
- Tax Preparation: Tag tax-deductible expenses throughout the year.
- Multi-currency: Support for EUR, GBP, CAD, and more.
- Localization: UI translations for major languages.
- CSV/PDF Reports: Download monthly financial statements for manual analysis or accountants.
- Budget Goals: Set custom spending limits per category.
MIT


