Install the repository from GitHub.
git clone [email protected]:crynobone/asloan.git
cd asloan
Run Composer installation.
composer install --prefer-dist
composer run post-root-package-install
composer run post-create-project-cmd
Run the default migrations
php artisan migrate
Run the application using Laravel Serve
php artisan serve
Which going to output similar to following, you can access to page using the generated URL:
> PHP 7.4.3 Development Server (http://127.0.0.1:8000) started
Below are the user stories that I have covered in the application, also you can view the database diagram here.
- User can apply a loan.
- User can apply a loan with a specific term expiry date.
- User can apply for more than 1 loan.
- User can't apply loan with zero or negative amount.
- User can't apply loan with invalid loan duration (start date after end date).
- Application should be able to calculate next loan due date.
- Application should be able to calculate next loan due amount.
- Application should ensure due amount is equals to total loan balances if loan term ends less than 1 week.
- Application should ensure that customer shouldn't make first repayment in less than 4 days.
- User can make repayment to a loan.
- User can make full settlement to a loan. (handle by code but not UI)
- User can make repayment to a loan on specific time.
- User can't make repayment to a loan on different currency.
- User can't make repayment to a loan higher than outstanding amount.
- Application should disallow repayment if loan has no balance (loan completed).
- Application should create repayment schedule and repayment amount.
- Application should update
due_amount
anddue_at
after each repayment. due_amount
anddue_at
should reset after repayment occured.
- Application shouldn't create repayment schedule.
- Application shouldn't update
due_amount
anddue_at
. - Application need to ensure Loan has
completed_at
.