A Spring Boot application for managing home loan applications, customer data, and EMI calculations.
- Customer management
- Loan application processing
- EMI schedule generation and tracking
- RESTful API endpoints
- MySQL database integration
- Java 23
- Spring Boot 3.5.6
- Spring Data JPA
- Hibernate
- MySQL 8.0
- Maven
- Java 23 or higher
- Maven 3.6 or higher
- MySQL 8.0 or higher
- Create a MySQL database named
home_loan_nbfcs - The application will automatically create the required tables on startup
-
Copy the environment template:
cp .env.template .env
-
Edit
.envfile with your database credentials:DB_URL=jdbc:mysql://localhost:3306/home_loan_nbfcs DB_USERNAME=your-username DB_PASSWORD=your-password
-
Source the environment variables (or use your IDE's environment configuration):
source .env export DB_URL DB_USERNAME DB_PASSWORD
-
Build the project:
./mvnw clean install
-
Run the application:
./mvnw spring-boot:run
The application will start on http://localhost:8080
-
Apply for Loan
POST /loans/apply Content-Type: application/json { "customer": { "name": "John Doe", "email": "[email protected]", "phone": "1234567890", "address": "123 Main St" }, "amount": 500000, "tenureMonths": 240 } -
Approve Loan
POST /loans/{loanId}/approve -
Reject Loan
POST /loans/{loanId}/reject -
Get EMI Schedule
GET /loans/{loanId}/emis
The application creates the following tables:
customer- Customer informationloan_application- Loan application detailsemi- EMI schedule and payment tracking
Run the test suite:
./mvnw test- Database credentials are externalized to environment variables
- The
.envfile is excluded from version control - Never commit sensitive information to the repository
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License.# home-loan-application