Git Product home page Git Product logo

backendchallenge's Introduction

BackendChallenge+

Getting Started

Tecnologies

  • .NET 7
  • Serilog
  • Docker

Setup

  1. Clone repo
  2. Go to root, and build the Docker image
docker build -t backend_challenge:dev -f Dockerfile .
  1. Run image
docker run -dp 5001:80 --name backend_challenge_api backend_challenge:dev

Architecture

Clean Architecture

In Clean Architecture, an application is divided into responsibilities and each of these responsibilities is represented as a layer.

It is based on the fact that the domain layer does not depend on any outer layer. The application layer only depends on the domain layer and the rest (usually presentation and data access) depends on the application layer. This is achieved with the implementation of service interfaces that will then have to be implemented by the external layers and with dependency injection.

Layers

  • Domain: it is the heart of the application and it has to be completely isolated from any dependency foreign to business logic or data. It can contain entities, value objects, events and domain services.
  • Application: it is the layer that contains the services that connect the domain with the outside world (outer layers). Here contracts, interfaces are defined.
  • Infrastructure: is the data access layer. It implements interfaces defined in the Application layer.
  • API: is the presentation layer. It handles requests and responses, and commonly communicates with the Application layer.

Patterns and methodologies used:

  • MediatR: For calling services to the application layer without making use of dependencies. Not only to avoid the issue of dependencies, but above all to structure the query calls (query) and commands (insertion/modification/deletion) in an easily understandable, developable and maintainable way.

  • CQRS: Architecture pattern that separates models for reading and writing data. The basic idea is that you can divide the operations of a system into two clearly differentiated categories:

    Consultas. These queries return a result without changing the state of the system and have no side effects..

    Comandos. These commands change the state of a system.

  • FluentValidation. It allows "isolating" the validations of the commands to have them in a single place and thus save code.

backendchallenge's People

Contributors

softx0 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.