Skip to content

UnknownGod2011/LMAedge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

EdgeLedger Solutions - AI-Powered Loan Management

A sophisticated digital loan record management and analytics platform with AI-powered document analysis, built for financial institutions.

๐Ÿš€ New: AI Document Analysis

Upload a loan agreement PDF and get instant AI-powered analysis:

  • โœ… Automatic section extraction and organization
  • โœ… Key metrics identification (principal, rate, term, covenants)
  • โœ… Smart status indicators (โœ“ ok, ? warning)
  • โœ… Interactive AI chatbot for Q&A
  • โœ… Real-time document processing

โœจ Features

Core Functionality

  • AI-Powered Loan Ingestion: Upload PDFs with automated text extraction and intelligent analysis
  • Smart Document Analysis: Gemini AI identifies sections, extracts metrics, and flags issues
  • Interactive Chatbot: Ask questions about your documents and get instant answers
  • Smart Search: Advanced search capabilities across loan portfolios
  • Version Control: Track changes and amendments to loan agreements
  • Comparison Tools: Side-by-side comparison of loan terms and conditions
  • API Integration: RESTful API for seamless integration with existing systems
  • Analytics Dashboard: Real-time insights into loan portfolio performance

AI Features

  • Browser-side PDF text extraction (no file size limits)
  • Gemini 1.5 Flash integration for analysis
  • Context-aware chatbot with document understanding
  • Automatic section identification and summarization
  • Key metrics extraction (principal, interest rate, term, covenants)
  • Status indicators for risk assessment

๐Ÿ›  Technology Stack

Frontend

  • Framework: React 18 with TypeScript
  • Build Tool: Vite
  • UI Framework: shadcn/ui with Tailwind CSS
  • Routing: React Router v6
  • State Management: TanStack Query
  • Icons: Lucide React

AI Integration

  • AI Model: Google Gemini 1.5 Flash
  • PDF Processing: PDF.js (Mozilla)
  • Notifications: Sonner (toast notifications)

๐Ÿ“‹ Prerequisites

๐Ÿš€ Getting Started

1. Installation

# Clone the repository
git clone <YOUR_GIT_URL>

# Navigate to the project directory
cd edge-ledger-solutions-main

# Install dependencies
npm install

2. Configuration

Create a .env file in the root directory:

VITE_GEMINI_API_KEY=your_api_key_here

3. Start Development Server

npm run dev

The application will be available at http://localhost:8080 (or next available port).

4. Test the AI Features

  1. Navigate to /ingest page
  2. Upload a loan agreement PDF
  3. Watch AI extract and analyze the document
  4. Ask questions in the chatbot

๐Ÿ“š Documentation

Quick Links

Available Scripts

npm run dev          # Start development server
npm run build        # Build for production
npm run build:dev    # Build in development mode
npm run preview      # Preview production build
npm run lint         # Run ESLint

๐Ÿ“ Project Structure

edge-ledger-solutions-main/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/     # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ layout/     # Layout components
โ”‚   โ”‚   โ””โ”€โ”€ ui/         # shadcn/ui components
โ”‚   โ”œโ”€โ”€ pages/          # Page components
โ”‚   โ”‚   โ”œโ”€โ”€ LoanIngest.tsx    # AI-powered document upload
โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard.tsx     # Analytics dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ LoansList.tsx     # Loan portfolio view
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ data/           # Mock data and fixtures
โ”‚   โ”œโ”€โ”€ hooks/          # Custom React hooks
โ”‚   โ”œโ”€โ”€ lib/            # Utility functions
โ”‚   โ””โ”€โ”€ types/          # TypeScript type definitions
โ”œโ”€โ”€ public/             # Static assets
โ”œโ”€โ”€ .env                # Environment variables (create this)
โ””โ”€โ”€ docs/               # Documentation files

๐ŸŽฏ Key Pages

/ingest - AI Document Analysis

Upload loan agreements and get instant AI-powered analysis with:

  • Automatic section extraction
  • Key metrics dashboard
  • Interactive chatbot
  • Status indicators

/ - Dashboard

Overview of loan portfolio with analytics and insights

/loans - Loan List

Browse and manage all loan records

/search - Advanced Search

Search across loan portfolio with filters

/compare - Comparison Tool

Side-by-side comparison of loan terms

/api - API Documentation

RESTful API endpoints and integration guide

๐Ÿ’ก Usage Examples

Upload and Analyze a Document

  1. Go to /ingest
  2. Drag and drop a PDF or click "Select PDF File"
  3. Wait for AI analysis (10-30 seconds)
  4. Review extracted sections and metrics
  5. Ask chatbot questions about the document

Ask the AI Chatbot

Example questions:

  • "What is the principal amount?"
  • "Who are the parties to this agreement?"
  • "What are the financial covenants?"
  • "When does this loan mature?"
  • "Are there any prepayment penalties?"

๐Ÿ”’ Security & Privacy

  • โœ… PDFs processed locally in browser
  • โœ… Only extracted text sent to AI API
  • โœ… No file storage on external servers
  • โœ… Secure HTTPS communication
  • โœ… API keys stored in environment variables

๐Ÿ’ฐ Cost Estimation

Gemini API (Free Tier)

  • 15 requests per minute
  • 1 million tokens per minute
  • Perfect for development and testing

Paid Usage

  • ~$0.001 per document analysis
  • ~$0.0001 per chat message
  • 1,000 documents/month โ‰ˆ $1-2

๐Ÿ› Troubleshooting

Common Issues

"Analysis failed" error

  • Check internet connection
  • Verify API key in .env file
  • Try a smaller PDF
  • Ensure PDF contains text (not scanned images)

No sections appearing

  • Verify PDF is text-based (not image-based)
  • Check browser console for errors (F12)
  • Try a different PDF

Slow processing

  • Normal for large PDFs (50+ pages)
  • Check internet speed
  • Close other browser tabs

See TESTING_GUIDE.md for detailed troubleshooting.

๐Ÿš€ Deployment

Build for Production

npm run build

The build output will be in the dist/ directory.

Environment Variables

Ensure these are set in production:

VITE_GEMINI_API_KEY=your_production_api_key

๐Ÿ”ฎ Roadmap

Planned Features

  • Multi-document comparison
  • Export to Excel/PDF
  • Database integration
  • User authentication
  • Document versioning
  • Advanced analytics
  • Batch processing
  • Mobile app

AI Enhancements

  • Risk scoring
  • Clause recommendations
  • Market benchmarking
  • Predictive analytics

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

๐Ÿ“„ License

Proprietary - All rights reserved

๐Ÿ™ Acknowledgments

๐Ÿ“ž Support

For issues, questions, or feedback:

  1. Check the documentation files
  2. Review the troubleshooting guide
  3. Check browser console for errors
  4. Create an issue in the repository

Version: 1.0.0
Status: Production Ready โœ…
Last Updated: January 2026

Built with โค๏ธ for financial institutions

About

LMA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published