GithubHelp home page GithubHelp logo

e-r-j-r / binarytreeapi Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 24.56 MB

API for Binary Tree and Forced Matrix tree structure

C# 33.75% TSQL 17.56% JavaScript 33.67% TypeScript 8.21% HTML 0.51% CSS 6.30%

binarytreeapi's Introduction

README

Binary Tree Manager Project


alt text


Architecture

The tech stack used in the project is as follows:

  1. .Net Core - Framework
  2. C# - Backend
  3. Angular - Front End
  4. Microsoft SQL Server - Database
  5. Swagger - API Documentation
Setup
  1. 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.


alt text

  1. Backend

Open BladeportBinaryTreeManager solution and compile using Visual Studio 2019. The Angular application is housed inside wwwroot folder of the BladeportBinaryTreeManager.Web project.


alt text


  1. 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.


alt text


You will be needing Angular CLI to execute the angular app locally via ng serve command.


alt text

Local Execution
  1. Run the .Net Core application (F5) via Visual Studio 2019. The landing page should be the Swagger API documentation.

  2. Navigate to the Angular application BladeportBinaryTreeManager.Web/wwwrooot/app/ and execute ng serve command to compile and start dev server.

  3. 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.

  4. Insert Nodes by using the following parameters on Swagger:

Binary Tree insert node binary tree


Forced Matrix insert node forced matrix


  1. If you reached the limit for Forced Matrix, the 3x3 configuration should look like the tree below:

forced matrix


binarytreeapi's People

Contributors

e-r-j-r avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.