Inspiration

I was inspired by watching my parents struggle to find the best mortgage option that truly fit their budget, age, and situation. I often had to manually calculate multiple what-if scenarios to help them decide , that’s when I thought, why not let AI do this reasoning itself? The idea was to create a system that learns from patterns of people with similar profiles and suggests practical strategies automatically. I also wanted to challenge myself by learning Spring Boot and implementing a real-world ML pipeline combining Python microservices with enterprise-grade architecture. This project became a way to merge personal motivation with technical growth.

What it does

Mortgage Optimizer predicts whether a homeowner would qualify for a mortgage and recommends the best repayment strategy, extend, baseline, lump-sum, or downsize , based on their financial situation. It blends machine learning models for predictive accuracy with rule-based logic to handle real-world banking constraints, producing transparent and explainable recommendations that help users make confident financial decisions.

How I built it

I built the frontend using React + Vite and styled it with Tailwind CSS for a clean, modern interface. To speed up development, I used prompt engineering to generate boilerplate components and iteratively refined them. On the backend, I designed two datasets, one predicting pass/fail mortgage approvals, and another recommending repayment strategies (extend, baseline, lump-sum, downsize). When the model showed overfitting or poor generalization, I implemented rule-based overrides to ensure realistic and explainable outcomes. The system connects through a FastAPI microservice (Python) linked to a Spring Boot backend (Java), forming a hybrid full-stack architecture that manages data flow, model inference, and API communicatation.

Challenges I ran into

Creating a synthetic dataset with tens of thousands of rows that remained realistic and statistically consistent was difficult. Balancing between overfitting and underfitting the ML models required multiple iterations and parameter tuning. Another major challenge was setting up and integrating Spring Boot with FastAPI , configuring endpoints, managing dependencies, and ensuring both frameworks communicated smoothly took significant debugging and learning.

Accomplishments that I'm proud of

I’m proud that I was able to design the full workflow, from dataset generation and model training to frontend integration and backend orchestration, and make the system function cohesively. Even though the model still has room for improvement, it successfully demonstrates how AI and business rules can work together to simplify financial decision-making. This project pushed me far outside my comfort zone and showed me how much I’ve grown as an engineer.

📘 What I Learned

Through this project, I learned how to:

  • Build and connect Spring Boot + FastAPI microservices in a real-world architecture.
  • Create and preprocess custom ML datasets for classification and strategy recommendations.
  • Identify and address overfitting and underfitting in traditional ML pipelines.
  • Integrate multiple languages (Python and Java) in a scalable, full-stack environment.

What's next for MortgageOptimizer

Next, I plan to refine the model with larger, real-world financial datasets, improve explainability with SHAP/LIME visualization, and develop a more interactive frontend dashboard showing payment breakdowns and approval probability. I also aim to integrate cloud-based deployment (Docker + CI/CD) to make the app accessible to users and financial advisors who could benefit from personalized, AI-guided insights.

Built With

Share this project:

Updates