└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Exercise 2 | 3 | The goal of the project is to build a simple business loan application system. 4 | 5 | The system consists of the following: 6 | 7 | - Frontend 8 | - Backend 9 | 10 | The backend would integrate with third-party providers such as: 11 | 12 | - Decision engine - This is where the final application will be 13 | submitted to present the outcome of the application. 14 | - Accounting software providers will provide a balance sheet for a selected business of the user. 15 | 16 | Below is a sequence diagram to help visually understand the flow. 17 | 18 | ```mermaid 19 | 20 | sequenceDiagram 21 | Actor User as User 22 | participant FE as Frontend 23 | participant BE as Backend 24 | participant ASP as Accounting Software 25 | participant DE as Decision Engine 26 | 27 | User ->> FE: Start Application 28 | 29 | FE ->> BE: Initiate Application 30 | BE ->> FE: Initiate Complete 31 | 32 | User ->> FE: Fill Business Details & Loan amount 33 | User ->> FE: Select Accounting provider 34 | User ->> FE: Request Balance Sheet 35 | FE ->> BE: Fetch Balance Sheet 36 | BE ->> ASP: Request Balance Sheet 37 | ASP ->> BE: Return Balance Sheet 38 | BE ->> FE: Return Details for Review 39 | 40 | User --> FE: Review Complete 41 | User ->> FE: Submit Application 42 | 43 | FE ->> BE: Request outcome 44 | BE ->> BE: Apply Rules to summarise application 45 | BE ->> DE: Request Decision 46 | DE ->> BE: Returns outcome 47 | 48 | BE ->> FE: Application Result 49 | FE ->> User: Final Outcome 50 | 51 | ``` 52 | 53 | Assumptions: 54 | 55 | - You may choose from the following language: Javascript, Typescript, Python, Golang / HTML, CSS. 56 | - For frontend, you could use a framework such as React / Vue, though basic HTML is also acceptable. 57 | - The accounting software and decision engine are already implemented. The backend should provide a simulation of the above. 58 | - The frontend can be very basic. 59 | - The accounting provider option on frontend would include Xero, MYOB and more in future. 60 | - A sample balance sheet received from Accounting provider: 61 | 62 | ```json 63 | 64 | sheet = [ 65 | { 66 | "year": 2020, 67 | "month": 12, 68 | "profitOrLoss": 250000, 69 | "assetsValue": 1234 70 | }, 71 | { 72 | "year": 2020, 73 | "month": 11, 74 | "profitOrLoss": 1150, 75 | "assetsValue": 5789 76 | }, 77 | { 78 | "year": 2020, 79 | "month": 10, 80 | "profitOrLoss": 2500, 81 | "assetsValue": 22345 82 | }, 83 | { 84 | "year": 2020, 85 | "month": 9, 86 | "profitOrLoss": -187000, 87 | "assetsValue": 223452 88 | } 89 | ] 90 | ``` 91 | 92 | ## Rules to be applied before sending to Decision Engine 93 | 94 | - If a business has made a profit in the last 12 months. The final value to be sent with a field `"preAssessment": "60"` which means the Loan is favored to be approved 60% of the requested value. 95 | If the average asset value across 12 months is greater than the loan amount then `"preAssessment": "100"` 96 | - Default value to be used `20` 97 | 98 | ## The Final output to be sent to the decision engine would contain minimum details such as 99 | 100 | - Business Details such as: 101 | - Name 102 | - Year established 103 | - Summary of Profit or loss by the year 104 | - preAssessment value as per the rules 105 | 106 | ## Judging Criteria 107 | 108 | - Engineering principles & standards 109 | - System extensibility & Scalability 110 | - Testability 111 | - Brevity and Simplicity 112 | 113 | ## Bonus Points 114 | 115 | - Docker 116 | 117 | ## FAQ 118 | 119 | ### What is the time-limit on exercise ? 120 | 121 | There is none, ensure you submit your best attempt and as soon as you possibly can. 122 | 123 | ### How to submit ? 124 | 125 | Submit a GitHub / Bitbucket repo for review. No ZIP files! 126 | --------------------------------------------------------------------------------