This is a web application built using Laravel that provides a mortgage loan calculator. It allows users to input loan details such as loan amount, interest rate, and loan term. The application generates an amortization schedule that shows the monthly payment breakdown, including the principal and interest components, for the entire loan term. It also supports fixed terms and extra repayments.
Follow the instructions below to set up and run the Mortgage Loan Calculator web application.
Before getting started, ensure that you have the following software installed:
- PHP (>= 7.4)
- Composer
- MySQL (or any other database of your choice)
- Clone the repository by running the following command in your terminal:
git clone <repository-url>
- Navigate to the project directory:
cd mortgage-loan-calculator
- Install the project dependencies using Composer:
composer install
- Create a copy of the
.env.example
file and rename it to.env
:
cp .env.example .env
- Generate an application key:
php artisan key:generate
-
Update the
.env
file with your database credentials. -
Run the database migrations to create the necessary tables:
php artisan migrate
- Serve the application locally:
php artisan serve
- Visit
http://localhost:8000
in your browser to access the application.
To run the unit tests for the application, use the following command:
php artisan test
The unit tests cover various scenarios for the loan calculation and ensure the accuracy of the results.
To contribute to this project, please follow these guidelines:
-
Create a fork of the main repository.
-
Clone your forked repository to your local machine.
git clone <your-forked-repository-url>
- Create a new branch to implement your changes.
git checkout -b feature/loan-calculation
-
Implement the necessary logic and make the desired changes.
-
Commit your changes with clear and descriptive commit messages.
-
Push your branch to your forked repository.
git push origin feature/loan-calculation
-
Create a pull request from your branch to the
main
branch of the main repository. -
Await feedback and address any comments or suggestions provided.
This project adheres to coding practices and patterns to ensure clean, maintainable, and readable code. Please follow these guidelines when making changes:
- Use proper naming conventions for variables, functions, and classes.
- Follow the PSR-12 coding style guidelines.
- Write unit tests to cover your code and ensure its correctness.
- Apply SOLID principles to maintain a high level of code quality.
- Avoid code smells and refactor any existing code if necessary.
- Write clean and meaningful commit messages.
This project is open source and available under the MIT License.
This project is based on Laravel, an excellent PHP framework. Special thanks to the Laravel community for their contributions and support.