Learning Platform Technical Overview

Tolik Levytskyi
3 min readSep 29, 2022

For the past couple of years I’ve been working on an Asp.Net Core Angular Kubernetes project with my team with very strict engineering standards which is called the Learning Platform.

It is built on my App Modules. Further architecture I did from scratch, came up with all the technical tasks and guided the implementation with code reviews for all the commits.

Technologies: Asp.Net Core 8, Ef Core, SignalR, IdentityServer4, Hangfire, Docker, Kubernetes, Ansible, Angular 17, Angular Material, Sass, Wpf (used in Companion app).

We use automatic code analyzers to keep our codebase up to the standards. We also wrote several of our own analyzers. There is no file bigger than 520 lines and method bigger than 60 lines in the whole project (except for auto generated code). It is not possible to commit code if these analyzers show warnings, there are 0 warnings in the Learning Platform. SonarQube is used for additional code quality analysis.

SonarQube Backend Analysis Results

This is default SonarQube configuration, only 2 rules were changed: TODO tracking and allowed number of parameters in constructors.

Project is using Clean Code and Solid approaches with continuous integration on Jenkins, unit, integration xUnit and end to end Selenium tests. Backend is using Controller-Service-Repository approach, no logic in controllers, everything is in small services for better reuse. The whole infrastructure, including monitoring, logging, analytics, backup, data storage is on Kubernetes.

I wanted to avoid the situation when we had 80 entities in the system and for each of them there would be a lot of custom UI and backend code. Therefore, for the Create/Read/Update/Delete functionality, I have developed a Meta subsystem. Using conventions and custom attributes from models through reflection, we build metadata for each entity. Several components for CRUD operations are written on the frontend, which, based on this metadata, adjust themselves for each entity. Thus, very little new code is needed to add a new CRUD entity to the system and is typically done in 5 minutes, after this you get Create/Edit and List pages, and rest API, everything with appropriate roles and permissions.

SonarQube Frontend Analysis Results

This is default SonarQube configuration, only 2 rules were changed: TODO tracking and requirement for subtitles on videos.

Dependency injection is used everywhere including tests and Companion. Through Autofac, I made automatic registration of classes and interfaces.

The solution is divided into several separate projects, I try to divide it so that there are no unnecessary dependencies in the projects. Thus, our Companion Wpf application reuses a lot of logic from the web application, while not requiring dependency on technologies it does not need (such as Asp.Net Core, Swagger and other technologies specific to the Asp.Net website).

Infrastructure automation

I’ve directed automated creation of our whole infrastructure through Ansible. If you exclude image downloading time then on a clean Linux system in 5 minutes Ansible configures host OS and stands up 2 fully configured virtual machines (prod and staging) each with its own Kubernetes cluster and 12–15 Kubernetes run apps that we use (logging, backups, analytics, monitoring, databases, ci-cd, docker registry, Learning Platform itself) ready to go.

Have a new project?

Check out my App Modules to launch 12 months early and $100,000 under budget at no extra cost.

--

--