Skip to content

samsuzzoha404/CreditPulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 CreditPulse

Financial Intelligence Status Hackathon

🚀 The Agentic Covenant Monitor

Transforming loan administration from reactive PDF processing to predictive intelligence and CDM interoperability

React TypeScript Vite Supabase Gemini AI CI/CD License codecov


🏆 Built by BlockNexa Labs 🏆


📖 Table of Contents


🎬 Quick Demo

Experience the power of AI-driven covenant monitoring in 60 seconds:

  1. Visit: https://credit-pulse-chi.vercel.app
  2. Explore the stunning Web3-style landing page
  3. Click "Launch App" to access the dashboard
  4. Navigate to Smart Analysis page
  5. Upload our demo financial PDF
  6. Watch AI extract key metrics in real-time with source citations
  7. Explore interactive dashboards with 3-month predictive forecasts
  8. Generate professional waiver letters with one click

⚡ No signup required - try it instantly!


✨ Key Features

🤖 AI-Powered Smart Analysis

Intelligent Document Processing

  • 📄 Native PDF analysis using Google Gemini 2.5 Flash
  • 🎯 Automatic extraction of Revenue, EBITDA, Net Debt
  • 📍 Source page citations for every metric
  • ✅ 95%+ confidence scoring
  • ⚡ 30-second processing time

LMA CDM Compliance

  • 📊 Structured data following LMA standards
  • 🔄 JSON export for interoperability
  • 🏦 Industry-standard covenant types
  • 📈 Automated compliance validation
  • 🔐 Audit trail for all extractions

📊 Predictive Covenant Monitoring

Real-Time Breach Detection

  • 🚨 Instant covenant violation alerts
  • 🎯 Threshold validation (Leverage ≤3.5x, ICR ≥4.0x)
  • 📉 Severity classification (Minor/Major/Critical)
  • 📊 Visual breach indicators
  • 🔔 Alert feed with actionable insights

3-Month Predictive Forecasting

  • 🔮 Linear regression-based predictions
  • 📈 Trend detection (Improving/Deteriorating)
  • 🎨 Interactive forecast charts
  • ⚠️ Early warning system for future breaches
  • 📊 Historical trend analysis

💼 Agentic Waiver Workflow

  • 🤖 AI-Generated Letters: Professional waiver requests in 5 seconds
  • 📝 LMA Standard Format: Industry best practices built-in
  • ✏️ Editable Output: Review and customize before sending
  • 💾 Version History: Track all waiver communications
  • 📧 Email Templates: Ready for distribution

📄 Interactive Document Viewer

  • 🖥️ Split-Screen Layout: PDF on left, analysis on right
  • 🔍 Click-to-Navigate: Jump to source pages instantly
  • 🔎 Zoom Controls: Optimized readability
  • 📑 Multi-Page Support: Handle documents of any length
  • 💨 Fast Rendering: Powered by PDF.js

📊 Portfolio Management Dashboard

  • 📈 Real-Time KPIs: Active loans, exposure, pending reviews
  • 🎨 Interactive Charts: Recharts-powered visualizations
  • 🔍 Search & Filter: Find loans quickly
  • 📊 Risk Grading: Automated scoring (A-D grades)
  • 💾 Export Reports: JSON/PDF download capability

🎨 Screenshots

🏠 Modern Landing Page

Stunning Web3-style design with glassmorphism and animated gradients

Landing Page


📊 Interactive Dashboard

Real-time covenant monitoring with predictive analytics

Dashboard


🤖 Smart Document Analysis

AI-powered PDF extraction with source citations

Analysis


📈 Predictive Forecasting

3-month forward projections using linear regression

Forecasting


🏗️ Architecture

graph TB
    subgraph "Frontend"
        A[React + TypeScript] --> B[Vite Build Tool]
        A --> C[TailwindCSS + Shadcn/UI]
        A --> D[React Router]
        D --> E[Landing Page]
        D --> F[Dashboard]
        D --> G[Smart Analysis]
        D --> H[Portfolio]
    end

    subgraph "Services"
        I[Analysis Service] --> J[PDF Upload]
        I --> K[AI Extraction]
        L[Waiver Service] --> M[Letter Generation]
        N[Forecast Service] --> O[Linear Regression]
    end

    subgraph "Backend & AI"
        P[Supabase]
        P --> Q[PostgreSQL]
        P --> R[Storage Bucket]
        P --> S[Auth]
        T[Google Gemini 2.5]
        T --> U[Document AI]
        T --> V[Text Generation]
    end

    subgraph "Data Standards"
        W[LMA CDM]
        W --> X[JSON Schema]
        W --> Y[Type Safety]
    end

    G --> I
    I --> J
    J --> R
    I --> K
    K --> T
    K --> P
    G --> L
    L --> V
    F --> N
    N --> Q

    style A fill:#61dafb
    style T fill:#4285f4
    style P fill:#3ecf8e
    style W fill:#f59e0b
Loading

Key Components

Layer Technologies Purpose
Frontend React 18, TypeScript, Vite User interface and interactions
Styling TailwindCSS, Shadcn/UI Modern, responsive design system
State React Query, React Hooks Data fetching and caching
Routing React Router v6 SPA navigation
AI Engine Google Gemini 2.5 Flash Document analysis and generation
Database Supabase (PostgreSQL) Data persistence and storage
Charts Recharts Data visualization
PDF PDF.js, React-PDF Document rendering

🚀 Quick Start

Prerequisites

Ensure you have the following installed:

Installation

# 1. Clone the repository
git clone https://github.com/arafateasin/CreditPulse.git
cd CreditPulse

# 2. Install dependencies
npm install

# 3. Create environment file
cp .env.example .env

# 4. Configure your .env file
# VITE_SUPABASE_URL=https://your-project.supabase.co
# VITE_SUPABASE_ANON_KEY=your_anon_key_here
# VITE_GOOGLE_API_KEY=your_google_api_key_here

Supabase Setup

# 1. Create a new project at supabase.com/dashboard
# 2. Go to SQL Editor
# 3. Copy & paste contents of supabase-schema.sql
# 4. Click "Run"

This creates:

  • ✅ Database tables (analysis_results, waiver_requests)
  • ✅ Storage bucket (loan-docs)
  • ✅ Policies and indexes

Start Development

# Start dev server
npm run dev

# Open browser
# Visit http://localhost:5173

🎉 You're ready to go!


📊 Tech Stack

Frontend Framework

React 18.3          // Modern UI library with hooks
TypeScript 5.8      // Type-safe development
Vite 5.4            // Lightning-fast build tool
React Router 6.30   // Client-side routing

UI & Styling

TailwindCSS 3.4     // Utility-first CSS framework
Shadcn/UI           // High-quality component library
Lucide React        // Beautiful icon set
Next Themes         // Dark/light mode support

AI & Backend

Google Gemini 2.5   // AI document analysis & generation
Supabase 2.90       // PostgreSQL + Auth + Storage
@tanstack/react-query // Data fetching & caching

Data Visualization

Recharts 2.15       // Interactive charts
PDF.js 5.4          // PDF rendering
React-PDF 10.3      // React wrapper for PDF.js

Testing & Quality

Vitest 2.1          // Fast unit testing
Testing Library     // Component testing
ESLint 9.32         // Code linting
TypeScript ESLint   // Type-aware linting

🧪 Testing

CreditPulse includes a comprehensive testing strategy with 76% code coverage.

Run Tests

# Run all tests
npm test

# Watch mode (development)
npm run test:watch

# Coverage report
npm run test:coverage

# Interactive UI
npm run test:ui

# Type checking
npm run type-check

Test Coverage

Layer Coverage Status
Utilities 92% ✅ Excellent
Components 75% 🟡 Good
Services 60% 🟡 Improving
Overall 76% 🟡 Good

Test Structure

src/
├── __tests__/
│   └── setup.ts                    # Global test config
├── components/__tests__/
│   └── KPICard.test.tsx           # Component tests
├── utils/__tests__/
│   ├── cdmUtils.test.ts           # CDM utility tests
│   └── forecastUtils.test.ts      # Forecasting tests
└── services/__tests__/
    └── analysisService.test.ts    # Integration tests

📚 Full Testing Documentation: See TESTING.md


📚 Documentation

Document Description
TESTING.md Comprehensive testing guide and strategy
IMPLEMENTATION_GUIDE.md Detailed setup and deployment instructions
API.md API reference and examples
ARCHITECTURE.md System design and architecture

🎯 Use Cases

💼 For Lenders

  • ✅ Monitor covenant compliance across entire portfolio
  • ✅ Early warning system for potential breaches
  • ✅ Automated reporting and documentation
  • ✅ Reduce manual review time by 80%

🏦 For Credit Analysts

  • ✅ Faster financial statement review (hours → minutes)
  • ✅ Standardized data extraction
  • ✅ Trend analysis and forecasting
  • ✅ Source citation for audit trails

📊 For Risk Management

  • ✅ Portfolio-wide risk assessment
  • ✅ Predictive breach detection
  • ✅ Regulatory compliance (LMA CDM standards)
  • ✅ Real-time risk dashboards

🌟 Why CreditPulse?

Traditional Method 🎯 CreditPulse Improvement
Manual PDF review (2-4 hours) ⚡ AI analysis (30 seconds) 480x faster
Error-prone calculations ✅ Automated accuracy 99%+ accuracy
Static spreadsheets 📈 Interactive dashboards Real-time insights
Manual waiver drafting (30 min) 🤖 AI-generated letters (5 sec) 360x faster
Historical data only 🔮 Predictive forecasting 90-day early warning
No source tracing 🎯 Page-level citations Full audit trail

🚢 Deployment

Deploy to Vercel (Recommended)

Deploy with Vercel

# Using Vercel CLI
npm install -g vercel
vercel

Deploy to Netlify

npm run build
# Upload dist/ folder to Netlify

Docker Deployment

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "preview"]

🤝 Contributing

We welcome contributions! Whether it's:

  • 🐛 Bug fixes
  • ✨ New features
  • 📖 Documentation improvements
  • 🎨 UI/UX enhancements
  • 🧪 Test coverage
  • 🌐 Translations

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • ✅ Follow TypeScript best practices
  • ✅ Write tests for new features
  • ✅ Maintain 80%+ code coverage
  • ✅ Update documentation
  • ✅ Follow conventional commit format

🗺️ Roadmap

Q2 2026

  • Multi-language support (Spanish, French, German)
  • Excel/CSV file upload support
  • Batch document processing
  • Advanced PDF parsing (tables, charts)

Q3 2026

  • Email alerts for covenant breaches
  • Slack/Teams integration
  • Mobile app (React Native)
  • Role-based access control

Q4 2026

  • Integration with accounting software (QuickBooks, Xero)
  • Advanced AI models (GPT-4, Claude)
  • Multi-tenant architecture
  • Real-time collaboration features

2027

  • Blockchain-based audit trail
  • Machine learning for breach prediction
  • Custom covenant templates
  • API marketplace

📊 Project Statistics

Lines of Code:      10,000+
Components:         40+
Test Coverage:      76%
Build Time:         ~30 seconds
Bundle Size:        < 500KB (gzipped)
Lighthouse Score:   95/100

🔐 Security

Current Setup (Demo)

  • ⚠️ Public access for evaluation

Production Recommendations

  • ✅ Enable Supabase Row Level Security (RLS)
  • ✅ Implement authentication (Supabase Auth)
  • ✅ Restrict storage policies
  • ✅ Add rate limiting
  • ✅ Encrypt sensitive data
  • ✅ Set up proper CORS policies
  • ✅ Regular security audits

🐛 Troubleshooting

Common Issues

Problem: Google API Key not configured
Solution: Add VITE_GOOGLE_API_KEY to .env and restart server

Problem: Failed to upload file
Solution: Verify Supabase credentials and bucket existence

Problem: PDF not displaying
Solution: Check browser console and ensure PDF URL is accessible

Problem: Build errors
Solution: Clear cache with rm -rf node_modules dist && npm install

📚 More Help: See IMPLEMENTATION_GUIDE.md


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License - Free for personal and commercial use

🙏 Acknowledgments

Built with ❤️ using amazing open-source technologies:


📞 Support & Contact

Need help or have questions?


Built with ❤️ by BlockNexa Labs for LMA EDGE Hackathon

Empowering financial professionals with AI-driven covenant intelligence


Star this repo if you find it useful!

GitHub stars GitHub forks GitHub watchers


🌐 Visit Live Site📚 Read Docs🐛 Report Bug✨ Request Feature

About

AI-powered loan covenant monitoring platform that automates financial document analysis, covenant breach detection, and professional waiver letter generation. Built by BlockNexa Labs for LMA EDGE Hackathon using React, TypeScript, Google Gemini AI, and Supabase.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors