Giter VIP home page Giter VIP logo

realworld-aspnetcore's Introduction

RealWorld Example App

ASP.NET Core codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API

This codebase was created to demonstrate a fully fledged fullstack application built with ASP.NET Core including CRUD operations, authentication, routing, pagination, and more.

We've gone to great lengths to adhere to the ASP.NET Core community style guides & best practices.

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

How it works

Aside from ASP.NET Core, numerous technologies are used within this solution including:

The architecture and design of this project is based on the Clean Architecture design pattern. The application is broken down into multi-project solutions, where each project is considered to reside in a particular layer of the application.

The Core Project

The Core project is the center of the Clean Architecture design, and all other project dependencies should point toward it. As such, it has very few external dependencies and should not be dependent on data access and other infrastructure concerns so those dependencies are inverted. This is achieved by adding interfaces or abstractions within Core that are implemented by layers outside of Core.

The Application Project

Often referred to as the Use Case layer, the Application project contains all the business logic for the application. This project implements CQRS (Command Query Responsibility Segregation), with each business use case represented by a single command or query.

The Infrastructure Project

Application's dependencies on external resources should be implemented here, in classes defined in the Infrastructure project. These classes should implement interfaces defined in the Core project.

In a typical ASP.NET Core web application, these implementations include the Entity Framework (EF) DbContext, any EF Core Migration objects that have been defined, and data access implementation classes. The most common way to abstract data access implementation code is through the use of the Repository design pattern.

The Web Project

The entry point of the application is the ASP.NET Core web project. The Program.cs file is responsible for configuring the application and wiring up implementation types to interfaces.

In order to wire up dependency injection during app startup, the Program.cs file may need to reference other projects.

Getting started

The solution-level docker-compose.yml file is configured to run the application in a containerized environment. To run the application, execute the following command from the root of the repository:

docker-compose up

The application will be available at http://localhost:5000/swagger.

realworld-aspnetcore's People

Contributors

minhlong149 avatar

Stargazers

Tim Pham avatar  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.