Skip to content

Latest commit

 

History

History
 
 

back-end

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

YABT. Back-end

Technologies

  • ASP .NET Core 8
  • RavenDB 6.0.1

It has minimum third-party dependencies and heaps of best practices like the Domain Driven Design (DDD), Command Query Responsibility Segregation (CQRS), etc.

Overview of the solution

The main projects of the solution:

Project name Description
Database.Common Shared auxiliary structures used in DB models and DTOs on the WebAPI.
Database All entities and aggregates, plus DB-related settings and session. Note: this project is exposed only to Domain project.
Domain Queries and commands, domain layer logic.
WebAPI The application layer (API).

Solution diagram

NOTE: all tests are located under './tests' folder.

Getting Started

Firstly, check out the GIT repo.

Compile and run the tests

  1. Install .NET SDK v8.x.
    Note that while the back-end would run on any version of .NET 8, the embedded RavenDB used for the test project has a strong dependency on the .NET SDK version. Check the required version in the GitHub Action used to run tests.

  2. Open the solution and run the tests located under './tests' folder.
    The tests that work against a real embedded RavenDB database and cover multiple scenarios.

Run Web API (Swagger)

Once you can run tests of the solutions, it's time to spin off a database and run the API.

  1. Setup the database:
    1. Acquire a RavenDB instance . Use on of the free options:
      1. free cloud instance;
      2. download and install locally for your OS or Docker.
    2. Create a new database on the RavenDB server (see the docs).
    3. Import test data from /documentation/exported_data.ravendbdump file (see the docs)
    4. Set the address to the RavenDB server and the DB name in ./back-end/WebApi/appsettings.Development.json.
  2. Launch the solution (the WebAPI project).
  3. Open https://localhost:5001/swagger in the browser.

There is an unsophisticated authentication via a hard-coded API key to run the API end-points. Read a note in the Swagger prompt - it has a clue: Swagger screenshot

From here, the back-end is all yours.

Check out notes on the front-end if you'd like to run Angular UI as well.