Git Product home page Git Product logo

aspnetcore-realworld-example-app's Introduction

RealWorld Example App

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

CI

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

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

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

See my works for my personal Backend & Frontend RealWorld apps collection.

Usage

PostgreSQL

This project use PostgreSQL as main database provider. You can run it easily via docker-compose up -d.

Two databases will spin up, one for normal development and one dedicated for integrations tests. Indeed In-Memory testing are poorly suitable for real integrations tests for me. See Avoid In-Memory Databases for Tests.

Run app

make seed # migrate and fill db with fake data
make run

And that's all, go to http://localhost:5000/swagger

Validate API with Newman

Launch follow scripts for validating realworld schema :

make fresh # wipe all database for clean state
make run
npx newman run postman.json --global-var "APIURL=http://localhost:5000/api" --global-var="USERNAME=johndoe" --global-var="[email protected]" --global-var="PASSWORD=password"

Full test suite

This project is fully tested via xUnit, just run make test for launching it. All SQL queries are automatically showed up for easy debug and easy N+1 detection and coverage rapport will be generated. Use dotnet reportgenerator in order to generate HTML rapport.

Use make test-watch-app for realtime test watching, perfect for TDD.

Publishing

Use make publish for publishing the app. Be sure to have PostgreSQL running before. This will execute all pipeline with code format checking, building, testing then publishing under publish directory.

The local Dockerfile is suitable as production container.

aspnetcore-realworld-example-app's People

Contributors

adr1enbe4udou1n 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.