Title: "LoanLens Project Submission"
Author: "Joy Njoroge"
Inspiration
Growing up in Kenya, I witnessed the "Sign-on-the-Spot" crisis. Most borrowers are pressured at a lender’s desk to sign 50-page contracts they don't understand. I watched families lose assets to "shock risk" clauses and predatory default hikes buried in fine print. I built LoanLens to be the AI "shield" I wish they had, moving the world from predatory to predictable by ending the information asymmetry between lenders and borrowers.
What it does
LoanLens is a multimodal AI auditor that translates dense legal jargon into plain truth. Users can upload PDFs or snap photos of loan papers at the desk. The system performs three core functions:
- Predictive Auditing: Flags "life-sucker" terms like 50% default interest hikes and hidden final payments.
- Fairness Scoring: Provides an objective 0–100 benchmark of contract safety.
- The Comparison Engine: Allows users to compare up to 5 loans side-by-side to identify the mathematically "Safer Choice."
- Borrower Risk Assesment: A tool that can be used by borrowers to asses their risk and get advice on whether to take a loan or not.
How I built it
I engineered a high-performance, serverless stack solo in 30 days. The frontend is built with React 18 and TypeScript, using Vite for speed and TanStack Query for state management. The "brain" of the app lives in Supabase Edge Functions, where I integrated Gemini 2.5 Flash to handle high-speed multimodal OCR and legal reasoning.
To ensure transparency, I built a math engine to calculate the Effective Annual Rate (EAR), including total fees:
$$\text{EAR} = \left(1 + \frac{r}{m}\right)^m - 1 + \frac{F}{P}$$
And the amortization balance ($B_k$) after ($k$) payments:
$$B_k = B_{k-1} - (M - (B_{k-1} \times r))$$
Challenges I ran into
- The Data Desert: Sourcing authentic predatory loan documents across 5 languages (English, Swahili, French, Spanish, and Italian) for testing was a massive manual hurdle.
- Hardware Realities: Because lenders often won't let you leave the office with papers, I had to optimize the OCR specifically for "messy" phone-camera photos taken under pressure at a bank desk.
- Creative Stretch: As a solo programmer, balancing deep-stack engineering with product design and video storytelling was a significant personal marathon.
- LLM Constraints: Early iterations used Google Gemini for rapid prototyping and evaluation. This required careful prompt optimization and batching to stay within rate and quota limits, informing our strategy for a scalable paid or self-hosted inference layer.
Why Lenders Should Want LoanLens
LoanLens is not anti-lender; it is anti-default. When borrowers fully understand repayment schedules, penalty clauses, and interest-rate dynamics before signing, default rates drop. Defaults are bad business: they trigger costly recovery processes, asset impairment, legal overhead, and reputational risk. By making loan terms transparent at the point of signing, LoanLens:
- Reduces avoidable defaults caused by misunderstood payment structures and rate escalations.
- Improves portfolio quality, especially for long-term and variable-rate products.
- Protects lenders legally by creating proof that borrowers were informed in plain language.
- Builds trust and retention, turning borrowers into repeat, lower-risk customers.
Also, it can be a platform to advertise loans. There is a recommended loans tab for that. In short: an informed borrower is a more profitable borrower. LoanLens aligns borrower protection with lender sustainability.
Accomplishments that I am proud of
- Multilingual Support: Successfully implemented a pipeline that handles financial jargon in Swahili, French, and Italian.
- Comparison Logic: Building a system that can "tie-break" two loans with identical interest rates but different predatory risk profiles.
- Solo MVP: Taking a complex fintech vision from an idea to a fully functional, cloud-deployed auditor in one month.
What we learned
- Transparency is Viability: Ethical lenders actually benefit from this tool because informed borrowers have significantly lower default rates.
- Multimodal Utility: AI isn't just for text; its ability to "see" a blurry photo of a document and extract legal logic is the key to financial justice in emerging markets.
- Simplicity is Power: A single "Fairness Score" is more effective at protecting a borrower than a 100-page legal guide.
What's next for Loanlens Web Application
- Native Mobile App: Integrated high-res scanning with offline-first capabilities for remote areas.
- Jargon-to-Dialect Bridge: Using AI to explain complex English loan terms directly in native languages like Arabic, Indian, Swahili, or Gikuyu.
- Lender API: A B2B dashboard for SACCOs and micro-lenders to audit their own contracts for fairness and sustainability.
Built With
- gemini
- react
- supabase
- tailwind
- tanstackquery
- typescript
- vite
Log in or sign up for Devpost to join the conversation.