Mortgage Calculator is an application to calculate a mortgage installment for specific data. The following calculators are also planned to be implemented:
- to simulate mortgage overpayments
- to simulate a mortgage based on historical data
Clone the repository:
git clone https://github.com/kamilpiech97/mortgage-calculator.git
Then just follow the steps below:
- initialize
.env
file and customize if needed:
cp .env.example .env
- build and run containers:
make build
make run
- go to the PHP shell and there install composer packages, generate app key and migrate and seed database:
make php
composer install
php artisan key:generate
php artisan migrate --seed
exit
- go to the Node shell and there install npm packages and build assets:
make node
npm install
npm run build
exit
- open app in browser via that url:
localhost:1741
You can run PHPUnit test cases
make test
You can run PHP-CS-Fixer:
make fix
To use xDebug you need to set DOCKER_INSTALL_XDEBUG
flag to true
in your local .env
file. Then you need to rebuild
PHP container: docker-compose up --build -d php
. You can also set
up xDebug parameters in docker/dev/php/php.ini
file.
service | container name | default external port |
---|---|---|
web | mortgage-web | 1741 |
php | mortgage-php | |
database | mortgage-db-dev | 1742 |
database-test | mortgage-db-test | 1743 |
node | mortgage-node | 1744 |