ARCHITECTURE

Architecture

Contexts

All database contexes are placed here. Mongo and EntityFramework contexes are separed with namespaces and folders as Mongo and EntityFramework


Controllers

All AspNet Controllers are placed here. They are seperated by version. Versionning rule is v{ver}, as sample v1, v2 or v3...

v1

This namespace contains Version 1.0 Controllers and works with MongoDb and PostgreSQL at same time. This version will be depreciated soon.

v2

This namespace contains Version 2.0 Controllers and they work with only PostgreSQL and New Bearer Authentication Scheme.


Dtos

This folder includes all Data Transfer Objects and they're seperated by Request, Response and Service folders.


Exceptions

This folder contains custom exceptions which is inherited from BaseException. BaseException is handled by Middleware and returns a status code from exception. Exceptions can be thrwon in anywhere like Repository.


Helpers

This folder includes helper codes and extensions which is undependent from any context. They are generic helper codes.


Interfacfes

This fodler includes all interfaces in project.


Mappings

This folder contains AutoMapper Profile objects. They define mappings between Dtos and Models. Also this mappings is used for Projection to database queries.


Middleware

This folder contains middleware processes like, Authentication, Authorization and Exception Handling. Also ActionFilters are here too.


Models

All the database models are here. Also They're foldered by database provider like EntityFramework.


Repositories

All repositories with database query are here. Only this repository objects can reach database data! You can not use DbContext except repository. If you need reach database for custom reason, just create a repository to do that and resolve that repository from Dependency Injection Container.


Services

Normally this layer must be a logic layer. But in this project and this version, it has only services which don't touch database and external api integrations.


Validations

This folder includes model validations. You mustn't use if for check any of property in codebase! All validations must be placed here instead of inline if. These validations are provided by FluentValidation.


Dependencies

Library Description Version
App.Metrics This is an analitics tool to calculate web project's performance. It saves datas to InfluxDb. We see these datas in Grafana Panel v2.1.0
App.Metrics.AspNetCore.Health Extension of App.Metrics v2.0.0
App.Metrics.AspNetCore.Health.EndPoints Extension of App.Metrics v2.0.0
App.Metrics.AspNetCore.Health.Hosting Extension of App.Metrics v2.0.0
App.Metrics.AspNetCore.Mvc Extension of App.Metrics v2.0.0
App.Metrics.Formatters.InfluxDb Extension of App.Metrics v2.0.0
App.Metrics.Reporting.InfluxDb Extension of App.Metrics v2.0.0
Applyze.Shared.Abstractions This library is for cross-api usage. This is common library which includes Applyze Shared Abstractions. v1.0.6
Applyze.Shared.Extensions This library is for cross-api usage. This is common library which includes Applyze Shared Abstractions. v1.0.6
AspNetCoreRateLimit rate limiting solution designed to control the rate of requests that clients can make to a Web API or MVC app based on IP address or client ID. v3.0.5
AspNetCore.MarkdownDocumenting This library publishes local markdown documentations from Docs folder in project on Web Application. v1.1.3
AspNet.Security.OAuth.Providers A collection of security middleware that you can use in your ASP.NET Core application to support social authentication providers. v2.1.0
AutoFilterer This library provides QueryString to LINQ conversion to automate filterings and queries. v1.0.2
AutoMapper This is a object mapping and projection library. Projection can be applied directly to Entity Framework Database queries instead of using long Select statements. v8.1.1
AutoMapper.Extensions.Microsoft.DependencyInjection AutoMapper extension to use AutoMapper over all abstractions with Dependency Injection v8.1.1
CAP CAP is a library based on .Net standard, which is a solution to deal with distributed transactions, also has the function of EventBus, it is lightweight, easy to use, and efficiently. v2.5.1
CAP.AzureServiceBus Azure ServiceBus implementation as ServiceBus of CAP. v2.5.1
CAP.InMemoryStorage InMemoryStorage implementation as Database of CAP. v2.5.1
CAP.Kafka Kafka implementation as ServiceBus of CAP. v2.5.1
CAP.MongoDB MongoDB implementation as Database of CAP. v2.5.1
CAP.MySql MySql implementation as Database of CAP. v2.5.1
CAP.PostgreSql PostgreSql implementation as Database of CAP. v2.5.1
CAP.RabbitMQ RabbitMQ implementation as ServiceBus of CAP. v2.5.1
CAP.SqlServer SqlServer implementation as Database of CAP. v2.5.1
FluentEmail Send email from .NET or .NET Core. A bunch of useful extension packages make this dead simple and very powerful. v2.5.1
FluentEmail.Smtp Smtp provider for FluentEmail. v2.5.2
FluentValidation.AspNetCore A small validation library for .NET that uses a fluent interface and lambda expressions for building validation rules. v8.4.0
Gelf.Extensions.Logging GELF provider for Microsoft.Extensions.Logging for sending logs to Graylog, Logstash and more from .NET Standard 1.3+ compatible components. v1.5.0
Microsoft.AspNetCore.App Main SDK of AspNetCore which aims .Net Core Framework v2.2.0
Microsoft.AspNetCore.Mvc.Versioning A Library to apply versionning to REST API Controllers by Microsoft v3.1.3
Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer A Library to explore versionned api metas and it used to provide datas to swagger. v3.2.0
EntityFrameworkCore Base Entity Framework Library on .Net core v2.2.4
EntityFrameworkCore.InMemory In-Memory database implementation of Entity Framework v2.2.4
Microsoft.NETCore.App Main SDK of .NET CORE v2.2.0
Microsoft.VisualStudio.Azure.Containers.Tools.Targets Docker Tools for Visual Studio v1.7.12
Microsoft.VisualStudio.Web.CodeGeneration.Design Controller, View, Model, etc... scaff-holding libray. v2.2.3
MongoDB.Driver An Offical ORM Provider to communicate with a MongoDb v2.8.1
MongoDB.Driver.Core An Offical ORM Provider to communicate with a MongoDb v2.8.1
Npgsql.EntityFrameworkCore.PostgreSQL An Entity Framework implementation for PostgreSQL v2.2.4
StyleCop.Analyzers Implementation of the StyleCop rules using the .NET Compiler Platform. Where possible, code fixes are also provided to simplify the process of correcting violations. v1.1.118
Swashbuckle.AspNetCore Swagger tooling for API's built with ASP.NET Core. Generate beautiful API documentation, including a UI to explore and test operations, directly from your routes, controllers and models. v4.0.1