Have you ever wanted to create event management system? You can treat this repositorium as an example or template! There are many predefined features that you can adjust to your requirements. You don't have to worry about Auth stuff etc. List of implemented function you can find below. This project, focus mainly on backend side of application. I've planned to add frontend layer (ASP.NET MVC project), so stay tuned for updates. For this moment, you have to add frontent client by yourself.
- .Net 5 / ASP.NET Core 5
- FluentValidation
- Automapper
- SixLabors.ImageSharp (for thumbnails and other image operations)
- Microsoft.AspNetCore.Authentication.JwtBearer
- MongoDB.Driver
- AspNetCore.HealthChecks.MongoDb
- xUnit
- Fluentassertions
- Moq
- WebApplicationFactory (for integration tests)
- Docker / docker-compose
- REST Api
- DDD
- CQRS (Simlified version - without MediatR, handlers etc.)
- Repository pattern
- SOLID
Presented solution works on docker containers. After cloning this repository and running commands shown below, there's no need to set up anything. Building takes a while, but please be patient - docker has to download and build all images.
When the solution starting process is completed, in your docker desktop you should see something similar to:
MongoDbSettings__ConnectionString=mongodb://root:password@mongoDB:27017
JwtSettings__Secret=Super_secret_key_123!
MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=password
dotnet dev-certs https --clean
dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p Qwerty1234!
dotnet dev-certs https --trust
$ docker-compose build
$ docker-compose up
If you want to run solution without docker. You should set secrets:
$ dotnet user-secrets init
$ dotnet user-secrets set MongoDbSettings:ConnectionString mongodb://localhost:27017
$ dotnet user-secrets set JwtSettings:Secret super_secret_key_123!
There are 97 integration tests and 76 unit tests. I'm still working on it. As soon as possible, I'll cover much more code with unit tests.
-
Api service - https://localhost:443
Documentation of Api service, can be found on: https://localhost/swagger/index.html
It's interactive and pretty simple in use, so there's no need to explain details. After executing any command, you will see CURL examples.
UI layer doesn't exist yet. This is what I want to add in the future.