Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


LoanLens


"See through every loan application"
An AI-powered credit memo generation platform for modern financial institutions.

View Demo · Report Bug · Request Feature

Next.js TypeScript Supabase Tailwind CSS Claude AI


📖 About The Project

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.

✨ Key Features

  • 🧠 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.

🛠️ Technology Stack


🚀 Getting Started

Prerequisites

1. Installation & Environment

Clone the repository and install dependencies:

git clone https://github.com/yourusername/loanlens.git
cd loanlens
pnpm install

Copy the environment variables template and configure it:

cp .env.local.example .env.local

Fill 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_key

2. Database Initialization

Navigate 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.

3. Run Development Server

pnpm dev

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


📁 Project Structure

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

🛡️ Security & Privacy

  • 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.

📄 License

Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages