The tech stack used in the project is as follows:
- .Net Core - Framework
- C# - Backend
- Angular - Front End
- Microsoft SQL Server - Database
- Swagger - API Documentation
- Database
Run the following sql script file using Microsoft SQL Server. The following database objects should be created. Note that the name of the database should be treemanagerdb, else you will need to change the Entity Framework configuration on the .Net Core application. The Forced Matrix table should be created as per requirement, the included scripts creates a 3x3 Froced Matrix. If you will be needing a Forced Matrix with 3x5 configuration then adjust the script as necessary.
IMPORTANT! The User table is pre-populated by the script, it is assumed that these Users are already existing before inserting any Nodes to Binary Tree and Forced Matrix
IMPORTANT! The table name format for Forced Matrix should be ForcedMatrix(X)x(Y), where X = Child Limit and Y = Level Limit e.g. ForcedMatrix3x5
Link to Database Scripts here.
- Backend
Open BladeportBinaryTreeManager solution and compile using Visual Studio 2019. The Angular application is housed inside wwwroot folder of the BladeportBinaryTreeManager.Web project.
- API
The APIs are documented via swagger which can be accessed by web address\index.html e.g. https://localhost:44358/index.html on local.
You will be needing Angular CLI to execute the angular app locally via ng serve command.
-
Run the .Net Core application (F5) via Visual Studio 2019. The landing page should be the Swagger API documentation.
-
Navigate to the Angular application BladeportBinaryTreeManager.Web/wwwrooot/app/ and execute ng serve command to compile and start dev server.
-
Angular CLI will expose a local server address, navigate to it and the landing page containing both Binary Tree and ForcedMatrix3x3 should display. No tree will dispay if you haven't inserted any nodes yet via API.
-
Insert Nodes by using the following parameters on Swagger:
- If you reached the limit for Forced Matrix, the 3x3 configuration should look like the tree below: