Loan Agent
Description
This simple app helps to understand whether customer eligible or not to take a loan.
Simplifications
Several compromises were needed to make the app simple and to deliver it fast:
- user cannot input own personal code, instead it can be chosen from predefined list. In future this screen can be replaced with proper search screen
- we do not show the reason why decision is negative. For now we just show the decision itself or some basic error states (like person not found in dataset)
- app is not localized, not in text, nor in values
- code wise all closures are implicitly capture self to avoid
[weak self]
complications. On MVP stage even minor memory leaks won't affect the product and user experience. - unit tests were omitted
- UI tests were omitted
- snapshot tests were omitted
- accessibility additional support were omitted
- no any animations were used
Potential targets for improvement
- Mock dataset should be replaced with network request to the server
- List of predefined user IDs should be replaced with proper online search
- Statuses and decisions should be separated to give a more intuitive state of the app on any of stages (like offline state, no server response, decision reasoning, etc.)
Architecture
From UI perspective main entry point is ConteView/ViewModel pair. It uses MVVM pattern to separate UI and app logic. DataLayer provides all needed data and covers (potential) network requests to get user data. DecisionEngine provides calculation of loan decision. Potentially can be used as a separate framework to unify decision logic between platforms