The app is build with extensive testing -- more than 35 tests are covering all the entirity of BLL interfaces.
The project is organized into several layers:
- Presentation: Contains the logic to display UI using blazor
- Business Logic Layer (BLL): Contains the services responsible for the business logic. DTOs -- are the models here.
- Data Access Layer (DAL): Contains the repositories responsible for data access. Entities -- are the models here. They contain the data models representing the database entities.
- Repository Pattern: Abstracts the data layer, providing a clear separation between data access and business logic.
- Compsite: Used to create cache that stores the entire tree during one session.
- Dependency Injection: Ensures loose coupling and enhances testability. Provided by Blazor.
- Data Mapper is used for the database, provided by Microsoft with Entity Framework.
- Anemic domain model is used to manage business logic. DTOs represent the real-life structure and services provide the functionality.
- Async/Await: Utilized throughout to ensure non-blocking operations.
- .NET SDK installed
- Docker for PostgreSQL database (if using the database repository)
Clone the repository:
git clone https://github.com/RoundRonin/FamilyTree.git
cd FamilyTree
Install Dependencies:
dotnet restore
WARNING! Env file is shipped with the project as .env.sample (copy and remove .sample to use)
.env should look like this:
POSTGRES_USER=mahUsername
POSTGRES_PASSWORD=mahPassword
POSTGRES_DB=FamilyTreeDB
HOST=localhost
PORT=5432
First, launch the container.
To start:
docker-compose up -d
To stop:
docker-compose down
From the root of the project run migrations
cd DAL
dotnet ef migrations add InitialCreate --startup-project ..\Presentation\
dotnet ef database update --startup-project ..\Presentation\�
dotnet run
Apps is available at: http://localhost:5000/
- Microsoft.EntityFrameworkCore: Core EF package.
- Microsoft.EntityFrameworkCore.Design: Design-time tools for EF.
- Microsoft.EntityFrameworkCore.Tools: Command-line tools for EF.
- DotNetEnv
And some other packages for testing
- xUnit
- moq
- EntityFrameworkCore.InMemory
This project was developed using Visual Studio, git.
Feel free to not contirbute at all!