"See through every loan application"
An AI-powered credit memo generation platform for modern financial institutions.
LoanLens transforms hours of manual financial document analysis into a seamless, seconds-long automated workflow. By leveraging advanced Vision LLMs (Anthropic Claude), it extracts structured data directly from bank statements, tax returns, and business plans, detects financial anomalies, and automatically generates comprehensive, audit-ready credit memos.
- 🧠 AI-Powered Data Extraction: Automatically parse complex financial PDFs (Bank Statements, Tax Returns, Business Plans, IDs) into structured JSON using Claude Vision.
- ⚡ Real-time Processing Pipeline: Concurrent document extraction with progress tracking and robust fallback mechanisms.
- 🛡️ Risk & Fraud Detection: Intelligent anomaly detection identifying unusual transaction patterns, red flags, and inconsistencies.
- 🔐 Enterprise-Grade Security: Full Row Level Security (RLS) on database and storage via Supabase.
- 🎨 Premium Dark UI: A meticulously crafted, brand-aligned "terminal-meets-editorial" interface using Tailwind CSS and shadcn/ui.
- 📊 Interactive Dashboards: Visualize cash flows, income sources, and application status at a glance.
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Database & Auth: Supabase (PostgreSQL, Storage, Realtime)
- Styling: Tailwind CSS v4 & shadcn/ui
- State Management: Zustand
- Forms & Validation: React Hook Form + Zod
- AI Integration: Anthropic SDK (Claude 3.5 Sonnet / 3.7 Sonnet)
Clone the repository and install dependencies:
git clone https://github.com/yourusername/loanlens.git
cd loanlens
pnpm installCopy the environment variables template and configure it:
cp .env.local.example .env.localFill in .env.local with your credentials:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
ANTHROPIC_API_KEY=your_anthropic_api_keyNavigate to your Supabase SQL Editor and execute all migration files located in supabase/migrations/ in order.
(Alternatively, use the Supabase CLI if configured: supabase migration up)
Make sure you have enabled Realtime (Replication) for the extractions table in your Supabase Dashboard to see live extraction updates in the UI.
pnpm devOpen http://localhost:3000 in your browser.
loanlens/
├── app/ # Next.js App Router pages and API routes
│ ├── api/ # Backend endpoints (Document upload, AI extraction)
│ └── dashboard/ # Authenticated UI (Applications, Memos, Settings)
├── components/ # Reusable UI components (shadcn/ui + custom)
│ ├── applications/ # Application details and tabs
│ ├── extraction/ # AI extraction summaries and status cards
│ └── ui/ # Core design system components
├── lib/ # Utilities and services
│ ├── ai/ # Anthropic client, Prompts, Extractors, Schemas
│ └── supabase/ # Supabase client configurations
├── supabase/ # Database migrations and policies
└── types/ # Global TypeScript definitions
- All document processing occurs strictly via secure, authenticated API routes.
- Documents are stored in private Supabase buckets protected by strict Row Level Security (RLS) policies.
- AI processing requires authenticated sessions and limits data exposure per strict system prompts.
Distributed under the MIT License. See LICENSE for more information.