MindedBanking
Considerations due to limited time available
- A user can only have one account
- One account can belong only to a user
- I did not differentiate between domain model and data entities but it is recommended
- Security has been omitted but it is very important and should be added
- The API is also serving the UI, this is not ideal but simplifies the project
- Most of the testing has been omitted to make sure the features are completed in a timely manner, but this is not acceptable for production code
- I leveraged the filter capability but for a good implementation of the controllers, it would be nice to have a standardized structure with Get, GetById, Patch, Delete
- The UI does not contain tests
- The UI is not properly responsive and not optimised to be consumed from different device types and sizes
- UI is not refined and could be improved also from a UX perspective
- UI Internationalization should be used
- The CreateTransactionCommand must be transactional along with all the sub queries and commands used for it's handling and validation, there is something in the Minded framework I need to review to leverate unit of work to make it work also for validations
Solution structure
UI Project
The UI project is written in Angular and placed in the folder MBApplicationUI
API Project
The apy project is MB.Application.Api, this is the entry point and uses Minded NuGet package (which I created), to create a Command/Query, Mediator and Decorator pattern.
QM.Business
Projects called QM.Business.* contains business logic and there is where commands, queries and corresponding handlers are placed.
QM.Data
Projects called QM.Data.* are coupled to the datasource and responsible to handle data connections. I did not use in this project the repository pattern, but in more complex scenarious, especially when dealing with legacy data sources, it is recommended.
Build
Execute the powershel command deployment.ps1, this will create on the local machine an empty database which will be updated using EF migrations. The angular app will be published in the wwwroot of .net Core app, once this last has started, a new browser window will open the target URL.
Alternatively, for manual configuration:
- Create a sql server database and update the connection string 'MindedBanking' in the MB.Application.Api>appsettings.json
- Execute apply EF migration using Update-Database from the 'Package Manager Console'
- Use 'ng build --output-path ..\MB.Application.Api\wwwroot' to build the angular application which will be placed in the wwwroot folder, served by the main api
- Start the .net core application and browse to https://localhost:5001