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?


๐Ÿš€ Experience CreditPulse Live ๐Ÿš€

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