Loan Discovery is a full-stack loan discovery, comparison, and financial planning platform. It combines a React/Vite frontend with a Spring Boot API and MySQL persistence to help users compare loans, estimate eligibility and EMI, save profiles, and review curated banking data.
The application is organized as a small monorepo:
- loan/ contains the React frontend.
- backend/ contains the Spring Boot API and persistence layer.
- tools/ contains project utilities and analysis scripts.
- PROJECT_DEEP_ANALYSIS.txt contains a deeper technical snapshot of the repository.
The product currently focuses on four areas:
- A premium landing experience that introduces the app and drives sign up.
- Authenticated loan tools such as eligibility, EMI, comparison, recommendations, and IFSC lookup.
- Persistent user data for profiles and saved comparisons.
- Admin visibility with analytics and operational status panels.
- JWT-based authentication with register and login flows.
- User profile save/load APIs for personal and loan details.
- Saved comparison management with create, list, and delete operations.
- EMI and affordability tools for loan planning.
- Bank, branch, and IFSC lookup utilities.
- Admin analytics for usage and platform insights.
- Premium, responsive UI with reusable component primitives.
- React 19
- Vite
- React Router
- Tailwind CSS
- Framer Motion
- Lucide icons
- Recharts
- Three.js
- Spring Boot 3.2.5
- Java 21
- Spring Web
- Spring Security
- Spring Data JPA
- Validation
- JWT
- MySQL Connector
- Maven wrapper for backend builds
- PowerShell on Windows
- ESLint for frontend linting
- Vite production builds
Loan-Discovery-Web-Application/
├─ backend/ Spring Boot API, entities, services, repositories, config
├─ loan/ React frontend, UI components, pages, assets, utilities
├─ tools/ Support scripts and analysis helpers
└─ PROJECT_DEEP_ANALYSIS.txt Deep project inventory and architecture notes
The frontend lives in loan/ and is built as a premium dashboard-style web app.
Production frontend: https://loan-discovery-app.vercel.app/
/- marketing and landing page/login- authentication screen/signup- registration screen/dashboard- protected app workspace
- Animated landing hero and interactive rates sections.
- Shared UI primitives for cards, buttons, inputs, alerts, tables, and forms.
- Theme-aware layouts with reusable page containers and premium panels.
- Protected dashboard tabs for profile, loan profile, EMI, eligibility, comparisons, recommendations, IFSC lookup, and admin analytics.
- Browser-based session persistence for auth tokens and profile state.
The backend lives in backend/ and exposes the APIs consumed by the frontend.
Production backend: https://loan-discovery-app.onrender.com
- User registration and login with JWT issuance.
- BCrypt password hashing.
- Personal and loan profile persistence.
- Saved comparison storage.
- Admin statistics endpoint.
- Bank, branch, and IFSC lookup APIs.
- Global market hotspot endpoint.
- The backend is configured for MySQL only.
- There is no H2 fallback in the intended runtime setup.
- Database credentials and JWT settings are provided through environment variables.
POST /api/auth/registerPOST /api/auth/login
GET /api/profile/mePUT /api/profile/personalPUT /api/profile/loan
GET /api/comparisonsPOST /api/comparisonsDELETE /api/comparisons/{id}
GET /api/admin/stats
GET /api/ifsc/{code}GET /api/banks/search?q=...GET /api/banks/by-city?city=...GET /api/banks/names
GET /api/global-market/hotspots
- Node.js 18+ for the frontend
- Java 21 for the backend
- MySQL 8+ accessible from the backend
- A shell capable of running PowerShell commands on Windows
Tracked templates are included at backend/.env.example and loan/.env.example.
For local development, private .env files are also supported at backend/.env and loan/.env. These files are git-ignored and should contain your real secrets and local URLs.
| Variable | Required | Description | Example |
|---|---|---|---|
SPRING_DATASOURCE_URL |
Yes | MySQL JDBC connection string | jdbc:mysql://localhost:3306/loan_discovery?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC |
SPRING_DATASOURCE_USERNAME |
Yes | MySQL username | root |
SPRING_DATASOURCE_PASSWORD |
Yes | MySQL password | your-password |
JWT_SECRET |
Yes | Secret used to sign JWTs | replace-with-a-long-random-secret |
JWT_EXPIRATION_MS |
No | Token lifetime in milliseconds | 86400000 |
ADMIN_EMAIL |
No | Email used to identify admin access | hardik.bhalekar10@gmail.com |
Legacy DB_URL, DB_USERNAME, and DB_PASSWORD are still accepted for local backward compatibility.
| Variable | Required | Description | Example |
|---|---|---|---|
VITE_API_BASE_URL |
No | Backend API base URL | http://localhost:8080/api |
VITE_ADMIN_EMAIL |
No | Email used to reveal admin UI | hardik.bhalekar10@gmail.com |
For production on Vercel, set VITE_API_BASE_URL to https://loan-discovery-app.onrender.com/api.
Open a PowerShell terminal in backend/. You can either fill in backend/.env or set the variables manually in the terminal.
$env:SPRING_DATASOURCE_URL="jdbc:mysql://localhost:3306/loan_discovery?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC"
$env:SPRING_DATASOURCE_USERNAME="root"
$env:SPRING_DATASOURCE_PASSWORD="your-mysql-password"
$env:JWT_SECRET="replace-with-a-long-random-secret"
$env:ADMIN_EMAIL="hardik.bhalekar10@gmail.com"
Set-Location 'C:\Users\ASUS\Documents\Backend\Loan-Discovery-Web-Application\backend'
.\mvnw.cmd spring-boot:runIf port 8080 is already in use, run the backend on another port in that same terminal:
$env:PORT="8081"
.\mvnw.cmd spring-boot:runTo verify the backend compiles without running it:
Set-Location 'C:\Users\ASUS\Documents\Backend\Loan-Discovery-Web-Application\backend'
.\mvnw.cmd -q -DskipTests compileOpen a separate terminal in loan/. Fill in loan/.env if you want to override the default local API URL or admin email, then run:
npm install
npm run devFor a production build check:
npm run buildThe backend can be deployed to Render as a Java web service.
- A web service created from this repository.
- A reachable MySQL database. Render does not provide MySQL natively, so use an external MySQL host.
- The backend environment variables listed above.
This repository includes render.yaml for the backend service.
Set these in the Render service:
SPRING_DATASOURCE_URLSPRING_DATASOURCE_USERNAMESPRING_DATASOURCE_PASSWORDJWT_SECRETJWT_EXPIRATION_MSif you want a custom token lifetimeADMIN_EMAILAPP_CORS_ALLOWED_ORIGINSwith your frontend URL, for examplehttps://your-frontend.onrender.com
Render does not load the repository .env files automatically. Copy the real values from your private local .env files into the Render dashboard or blueprint environment settings.
The Render blueprint uses:
- Build:
chmod +x mvnw && ./mvnw clean package -DskipTests - Start:
java -jar target/*.jar
The app now listens on Render’s PORT automatically, so no extra port override is needed.
Current production backend URL: https://loan-discovery-app.onrender.com
The frontend can be deployed to Vercel with the project root set to loan/.
- Root directory set to
loan VITE_API_BASE_URL=https://loan-discovery-app.onrender.com/apiVITE_ADMIN_EMAILif you want to override the default admin email
This repository includes loan/vercel.json so React Router routes such as /login, /signup, and /dashboard rewrite to index.html instead of returning a Vercel 404: NOT_FOUND page.
https://loan-discovery-app.vercel.app/
The following checks have been validated locally during development:
- Backend compile using the Maven wrapper.
- Frontend production build using Vite.
- Keep
SPRING_DATASOURCE_URL,SPRING_DATASOURCE_USERNAME, andSPRING_DATASOURCE_PASSWORDaligned with your local MySQL instance. - Keep
VITE_API_BASE_URLpointed at the backend when running the frontend locally. - The dashboard is protected in the UI and redirects to login when the session is missing.
- Auth tokens and user data are stored in browser storage.
- If the admin tab does not appear, confirm the signed-in email matches the admin email configured in the frontend.
The current implementation roadmap for the app is:
- JWT authentication.
- Frontend JWT integration.
- Profile save/load APIs.
- Saved comparisons APIs and UI.
- Admin analytics API and UI.
- Production hardening.
- If the backend fails to start with a MySQL access denied error, confirm the username and password in
SPRING_DATASOURCE_USERNAMEandSPRING_DATASOURCE_PASSWORD. - If Render fails with
UnknownHostException, re-check the hostname insideSPRING_DATASOURCE_URL. - If startup fails with
Port 8080 was already in use, stop the existing Java process on8080or run withPORT=8081. - If the frontend cannot reach the API, confirm
VITE_API_BASE_URLpoints to the running backend. - If Vercel shows
404: NOT_FOUNDon/login,/signup, or/dashboard, confirm loan/vercel.json is deployed and the Vercel project root isloan. - If protected pages bounce back to login, clear browser storage and sign in again.
- If the admin experience is missing, verify the configured admin email in both backend and frontend environments.
- loan/README.md for frontend-specific notes.
- backend/README.md for backend-specific setup.
- PROJECT_DEEP_ANALYSIS.txt for the deep project inventory and architecture snapshot.