What it does

LoanPulse AI elevates credit portfolio management by transforming dense, static LMA loan agreements into a live, interactive dashboard.

It allows users to:

  • Proactively monitor financial covenants.
  • Track ESG KPIs in real-time.
  • Get instant, AI-driven risk summaries to stay ahead of potential breaches.

What it does

How we built it

We built LoanPulse AI by combining a modern, responsive frontend with a powerful AI-driven backend.

Frontend

  • Next.js (React & TypeScript): Used as the foundation for its robust server-side rendering and App Router, ensuring the app is fast and scalable. TypeScript ensures type safety for reliable code.
  • Tailwind CSS: Employed for all styling needs, allowing us to build a responsive design quickly.
  • ShadCN UI: Provides our component library (Cards, Dialogs, Charts), which is built on top of Tailwind for high customization.
  • Framer Motion: Powers the smooth animations, such as fade-in effects and file processing transitions.
  • Lucide React: Used for a clean and consistent icon set throughout the application.

AI & Backend

  • Google Gemini (via Genkit): We utilized Gemini 2.5 Flash as our core AI engine to handle complex tasks like analyzing loan documents and assessing market sentiment.
  • Genkit: We used this open-source framework to structure our AI logic into defined "flows" (e.g., processLoanAgreement), making the generative AI integration reliable and organized.
  • Firebase App Hosting: The final application is deployed on Firebase's fully managed hosting service for security and scalability. ## Challenges we ran into
  • Massive Context Windows: LMA loan agreements can run hundreds of pages. Passing this entire context to an LLM without hitting limits or confusing the model was difficult. We solved this by implementing smart semantic chunking before sending data to Gemini.
  • Structured Data Extraction: Getting strict, reliable JSON output from "legalese" text was tough. We used Genkit’s structured output features (with Zod schemas) to force the model to return valid data for our dashboard charts, ensuring the frontend wouldn't break.
  • Complex PDF Parsing: Legal documents often contain nested tables and multi-column layouts that standard parsers mangle. We had to fine-tune our ingestion pipeline to ensure the AI "read" the document in the correct reading order.

Accomplishments that we're proud of

  • Zero-Hallucination Covenants: We managed to get the AI to accurately distinguish between "Negative Pledges" and "Permitted Liens"—a nuance that often trips up general-purpose models.
  • Speed: By using Gemini 2.5 Flash, we reduced the document analysis time from minutes to seconds, making the "instant dashboard" promise a reality.
  • Enterprise-Grade UI: We are proud that our ShadCN implementation looks like a finished SaaS product rather than a hackathon prototype. The data visualization (Recharts) integrates seamlessly with the AI's output.

What we learned

  • The Power of Genkit: We learned how much faster development moves when you have a framework like Genkit to manage prompts and flows, rather than managing raw API calls and error handling manually.
  • Legal Nuance: We gained a deeper appreciation for the LMA structure. We learned that "standard" forms rarely remain standard, and building AI that adapts to these deviations is the key to value.
  • Frontend-Backend Synergy: We learned how to better leverage Server Actions in Next.js to keep our client-side code clean while handling heavy AI processing on the server.

What's next for LoanPulse AI

  • Direct Banking API Integration: Currently, users upload financial data manually. We plan to integrate with Open Banking APIs to pull live company financials and automatically flag covenant breaches in real-time.
  • Drafting Agents: We want to build an agent that not only spots a breach but drafts the "Waiver Request" letter to the lender automatically.
  • Multi-Jurisdiction Support: Expanding our model's training to handle loan agreements from US (NY Law) and EU jurisdictions beyond just LMA standards.

Built With

Share this project:

Updates