Skip to content

Introduction to the code

The basics

The solution is written in C# and TypeScript and it is using the latest LTS versions og .NET and Node 18 and the latest major version of React.

The websites and APIs have been created with ASP.NET Core and the persistence-project uses EF Core with code-first-migrations.

Architecture

Bizzkit Blueprint uses the Clean Architecture approach to organize the solution. This is also known as Onion Architecture.

The core of the solution is a domain model that describes the main entities in the business domain. On top of this we have an application layer that mostly consists of interfaces and service implementations that are completely agnostic to the actual external dependencies to the solution. Then around that we have the infrastructure- and integration-projects that implement interfaces from the application layer using actual external dependencies. Finally, we have the presentation layer that binds it all together using dependency injection. The presentation layer contains a website for the webshop and some backoffice functionality.

The inter-dependencies between the projects in the solution can be drawn like this:

flowchart TB
    S[Shared]
    D[Domain]
    A[Application]
    subgraph G[Intergration]
        direction TB
        CMS
        PIM
        DAM
        Mail
        IAM
        ECS
    end
    subgraph I[Infrastructure]
        direction TB
        Persistence
        Email["Email generator"]
        Seeder["Data Seeder"]
    end
    subgraph P[Presentation]
        direction TB
        Website
        Administration
        Webhooks
    end
    subgraph T["Task runners"]
        direction TB
        JobServer
        Console["Management Console"]
    end
    D --> S
    I --> A
    A --> D
    G --> A
    P --> I
    P --> G
    T --> I
    T --> G

Building the solution

Note, that you need to build the backend of the website before you can build the frontend. This is because the backend build generates TypeScript-code that the frontend then uses.

Backend

We try our best to make sure the solution is compatible with both Visual Studio and Rider in the latest version. So to build the backend, you can just open the solution in one of these and build it.

Building the solution from commandline using the latest dotnet SDK is as simple as you would expect:

dotnet build

Frontend

To build the frontend of the website you can either run the script src\Blueprint.Presentation.Website\frontend-build.cmd (Windows) or src/Blueprint.Presentation.Website/frontend-build.sh (Mac/Linux) or use node inside the src\Blueprint.Presentation.Website\ClientApp-directory:

npm ci
npm run build:prod

You build the administration frontend and email generator in a similar manner.

Static code analysis

The solution makes heavy use of static code analysis to help prevent common programming mistakes and keep everything clean.

You can control the warning-levels of these rules in the .editorconfig at the root of the project (in here you can also tweak various formatting settings).