Skip to content

othmaan/finance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loan 💰 Planner

Test cases result

Preview

Run executable

  1. Project is an a IntelliJ IDEA project.
  2. Go to personal-finance/target. (Download from releases)
  3. java -jar personal-finance-0.0.1-SNAPSHOT.jar

Example

Request

curl -d '{"loanAmount": "5000", "nominalRate": "5", "duration": "24", "startDate": "2018-01-01T00:00:01Z"}' -H "Content-Type: application/json" -X POST http://localhost:8080/planner/generate-plan

Response

[
    {
        "borrowerPaymentAmount": "219.36",
        "date": "2019-12-11T03:33:08",
        "initialOutstandingPrincipal": "218.37",
        "interest": "0.91",
        "principal": "218.45",
        "remainingOutstandingPrincipal": "0.0"
    },
    {
        "borrowerPaymentAmount": "219.36",
        "date": "2019-12-11T03:33:08",
        "initialOutstandingPrincipal": "218.37",
        "interest": "0.91",
        "principal": "218.45",
        "remainingOutstandingPrincipal": "0.0"
    },
    ...
    {
        "borrowerPaymentAmount": "219.36",
        "date": "2019-12-11T03:33:08",
        "initialOutstandingPrincipal": "218.37",
        "interest": "0.91",
        "principal": "218.45",
        "remainingOutstandingPrincipal": "0.0"
    }
    ...
]

File structure

root/src/com/lendico/finance
|
|-- FinanceApplication.java			* Spring Application root
|
|-- JerseyConfig.java			        * Resources configuration
│  
|-- planner/					* Loan planner use case
|        ├── algorithm     	                * All algorithms
|        ├── client     	                * Client request/response
|        ├── model     	                        * Business models
|        ├── operation     	        	* Business operations
|        └── resource                           * Resource endpoint
|        
|
|-- common/					* Contains common classes
|	|
|	├── exception/                          * Exception package    
|       |    └── ApiException.java
|       |
|       ├── protocol/                           * Common interfaces
|       |    ├── BusinessToClient.java
|	|    └── ClientToBusiness.java
|       |
|       └── util/                               * Utils package
|             ├── Constants.java		    
|             └── Utils.java
|
|
|
|-- test/					* All test cases
|        ├── ...     	
|        └── ...   
|
...

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published