Inspiration
The inspiration for LoanGuard came from witnessing the frustration of small lenders and financial institutions struggling with outdated loan management systems. We saw lending officers spending 10+ minutes manually entering loan data into spreadsheets, making errors, and discovering high-risk loans too late. In an era where you can transfer money instantly with a tap, why was loan tracking still stuck in the spreadsheet age? We wanted to bring the same seamless experience that consumer banking apps provide to the world of loan portfolio management. With the growing emphasis on ESG (Environmental, Social, and Governance) metrics in lending, we also saw an opportunity to help institutions track sustainable lending practices which is something no existing platform offered in an integrated way.
What it does
LoanGuard is an intelligent loan portfolio management platform that revolutionizes how lenders track and manage loans. Here's what it does:
Instant Loan Import: Connect to any of 10,000+ US financial institutions (Chase, Bank of America, Wells Fargo, Capital One, etc.) in 30 seconds via Plaid integration. Loans are automatically imported with all details—no manual data entry required.
Automated Risk Assessment: Every loan gets a real-time risk score (0-100) based on a multi-factor algorithm that analyzes loan amount, interest rate, duration, and payment history. As payments are made or missed, risk scores update automatically.
Live Portfolio Dashboard: Get instant visibility into your entire loan portfolio with interactive charts showing total loans, outstanding amounts, overdue counts, average risk scores, loan status distribution, and performance trends over time.
Smart Alerts System: Receive real-time notifications for overdue payments, high-risk loans crossing thresholds, and significant portfolio changes. Never miss a critical event again.
Payment Tracking: Record and monitor payment history for each loan, view payment schedules, and track borrower payment behavior over time.
ESG Metrics Integration: First loan platform with built-in Environmental, Social, and Governance compliance tracking—helping institutions meet sustainable lending standards and investor ESG requirements.
Real-time Updates: All data syncs live across devices using Supabase real-time subscriptions. No page refreshes needed—see changes as they happen.
How we built it
We built LoanGuard using a modern, production-ready tech stack focused on performance, security, and developer experience:
Frontend Architecture: Built with Next.js 14 (App Router) and React 19, leveraging server components for optimal performance and reduced bundle sizes. TypeScript 5 ensures type safety across the entire application. We used Tailwind CSS 4 with shadcn/ui components for a beautiful, accessible, and responsive design system. Interactive data visualizations are powered by Recharts, and smooth animations by Framer Motion.
Backend Infrastructure: Supabase provides our PostgreSQL database with built-in authentication and Row-Level Security (RLS) policies protecting all data. We wrote Deno-based Supabase Edge Functions to handle Plaid integration—one function creates link tokens for bank connections, another exchanges public tokens and imports loan data.
Banking Integration: Integrated Plaid API to connect with 10,000+ financial institutions. We implemented proper CORS handling, error management, and timeout configurations to ensure reliable bank connections. The system automatically maps Plaid liability data (credit cards, student loans, mortgages) to our loan schema.
Real-time Features: Implemented Supabase real-time subscriptions using postgres_changes to provide live dashboard updates without polling or page refreshes. This gives users instant feedback as loans are added, updated, or paid off.
Security Implementation: Every table has Row-Level Security policies ensuring users only see their own data. Server-side authentication verification protects all routes. Input validation using Zod schemas prevents injection attacks. JWT-based authentication with secure token handling.
Development Workflow: Used Git for version control with a feature-branch workflow. Configured the project for Vercel deployment with optimized build settings. Implemented proper error boundaries and loading states for excellent UX.
Challenges we ran into
Plaid Integration Complexity: Getting the Plaid Link flow working correctly was more challenging than expected. We had to debug CORS issues between our Edge Functions and Plaid's API, handle various error states (institution downtime, invalid credentials, token expiration), and properly map Plaid's liability data structure to our loan schema. We also had to implement proper timeout handling since some bank connections can take 20-30 seconds.
Real-time Subscription Management: Implementing Supabase real-time subscriptions without memory leaks or duplicate subscriptions required careful lifecycle management. We had to ensure subscriptions were properly cleaned up when components unmounted and handle edge cases like network disconnections and reconnections.
Risk Scoring Algorithm: Designing a fair, accurate risk scoring algorithm was iterative. We experimented with different weighting factors for loan amount, interest rate, and duration. We had to balance making the algorithm sophisticated enough to be useful but simple enough to be explainable and transparent to users.
Type Safety Across Boundaries: Maintaining type safety between the database schema, API responses, and frontend components required generating TypeScript types from the Supabase schema and keeping them in sync as the schema evolved. We used Supabase's built-in type generation but had to handle custom types and edge cases.
Authentication Flow: Implementing a smooth authentication experience with proper server-side verification, protected routes, and session management across server and client components in Next.js 14's App Router required understanding the nuances of React Server Components and when to use client-side vs server-side authentication checks.
ESG Metrics Design: Determining which ESG metrics to track and how to structure them in the database required research into sustainable lending practices and industry standards. We wanted the feature to be useful without overwhelming users with too many data points.
Accomplishments that we're proud of
Seamless Plaid Integration: We're extremely proud of achieving one-click bank connection with automatic loan import. Going from "Connect Bank" to seeing your loans in the dashboard in 30 seconds feels magical—it's a 95% time reduction compared to manual entry.
Production-Ready Architecture: Built a fully functional, secure, scalable application using industry best practices—proper authentication, Row-Level Security, real-time capabilities, type safety, responsive design, and error handling. This isn't just a prototype; it's deployment-ready.
Real-time User Experience: The live dashboard updates feel incredibly responsive. Watching charts update in real-time as loans are added or payments recorded creates a delightful user experience that feels modern and professional.
Comprehensive Feature Set: Despite the tight development timeline, we delivered a complete loan management platform—not just basic CRUD operations, but automated risk assessment, smart alerts, payment tracking, ESG metrics, interactive analytics, and a beautiful onboarding experience.
ESG Innovation: We're proud to be the first loan platform integrating ESG metrics directly into the core product. This addresses a real market need as sustainable investing grows 35%+ annually.
Accessible Design: Used shadcn/ui and Radix UI primitives to ensure the application is accessible to users with disabilities, following WCAG guidelines for contrast, keyboard navigation, and screen reader support.
What we learned
Fintech Integration Complexity: Integrating with financial APIs like Plaid taught us about the importance of robust error handling, timeout management, and graceful degradation. Financial systems have unique reliability requirements and edge cases.
Real-time Architecture: Building real-time features with Supabase subscriptions taught us about WebSocket management, subscription lifecycle, memory management, and the trade-offs between real-time updates and server load.
Next.js 14 App Router: Gained deep understanding of React Server Components, the server/client boundary, when to use server vs client components, data fetching patterns, and how to optimize for performance while maintaining great DX.
Database Design for Multi-tenancy: Learned best practices for Row-Level Security policies in PostgreSQL, how to structure tables for multi-tenant applications, and the importance of indexes for query performance at scale.
Risk Assessment Modeling: Learned about financial risk factors, how to weight different variables in risk calculations, and the importance of transparency in automated decision-making systems.
User Experience in Fintech: Learned that financial applications require extra attention to trust indicators, clear error messages, data accuracy, and transparency. Users need to feel confident in the numbers they're seeing.
ESG Standards: Researched sustainable lending practices and learned about environmental, social, and governance criteria in financial services—an increasingly important area as impact investing grows.
What's next for Loanguard
Predictive Analytics with Machine Learning: Implement ML models to predict loan default probability based on historical payment patterns, borrower behavior, and macroeconomic indicators. This would give lenders proactive insights beyond our current rule-based risk scoring.
Mobile Applications: Develop native iOS and Android apps using React Native or Flutter, allowing lenders to monitor portfolios and receive push notifications on the go. Mobile-first design for on-the-go loan management.
Automated Payment Reminders: Build an automated communication system that sends SMS and email reminders to borrowers before payments are due, reducing late payments and improving collection rates.
Advanced ESG Analytics: Expand ESG metrics to include carbon footprint calculations for financed projects, social impact scoring, diversity and inclusion metrics for borrowers, and automated ESG reporting for institutional investors.
Multi-Currency Support: Add support for international currencies and cross-border loans, enabling global lending operations and currency risk management.
Integration Marketplace: Create integrations with accounting software (QuickBooks, Xero), CRM systems (Salesforce, HubSpot), and other fintech tools to create a complete lending ecosystem.
Collaborative Features: Add team management capabilities with role-based access control, comment threads on loans, task assignments, and audit logs for enterprise customers.
White-Label Solution: Offer a white-label version of LoanGuard that fintech platforms and banks can rebrand and embed into their own products as a loan management widget.
Regulatory Compliance Tools: Add built-in compliance checking for lending regulations (TILA, RESPA, Fair Lending), automated reporting for regulatory filings, and audit trail functionality.
Advanced Portfolio Analytics: Implement portfolio stress testing, scenario analysis, concentration risk analysis, and custom reporting with exportable dashboards.
API for Third-Party Integration: Launch a public API allowing other platforms to leverage LoanGuard's risk scoring algorithm and ESG analytics as a service, creating a new B2B revenue stream.
Built With
- nextjs
- react
- shadcn
- sql
- supabase
- tailwind
- typescript
Log in or sign up for Devpost to join the conversation.