Giter Club home page Giter Club logo

aspdotnet-template's Introduction

ASP.NET Core Template

The purpose of this repository is to standardize development and deployment workflow for ASP.NET Core based server side development. It contains a sample web API application built with .NET Core.

Best practices related to .NET Development have been followed while developing this template application. It is however, not absolute and any improvement in this template is highly encouraged. :star: :rocket: :octocat:

Badges

build

Contributions

Please read CONTRIBUTING.md before starting to contribute in this project.

Table of Contents

Pre-requisites

  • Git Version Control System
  • .NET 6 SDK & Runtime
  • EF Core Command Line Tool v 6.0.0+
  • PostgreSQL v13.2 / SQL Server 2017 Express Edition+ with SQL Server Authentication enabled
  • Visual Studio 2022 Community Edition / Visual Studio Code with OmniSharp extension installed / JetBrains Rider
  • Docker v20.10.6 build 370c289 or above
  • Docker Compose v3.7+
  • Additional setup needed for generating unit test coverage reports described here

Structure

Solution Projects

Project Type Project Name Usage
ASP.NET Core Web API ASP.NET-Core.WebAPI Main web API project
.NET Core Class Library NET-Core.Library.Domain Application domain logic de-coupled
.NET Core Console Application NET-Core.Console.DB.PostgreSQL Sample PostgreSQL database configurations with Entity Framework (EF) Core migration pre-configured
.NET Core Console Application NET-Core.Console.DB.SqlServer Sample SQL Server database configurations with Entity Framework (EF) Core migration pre-configured
XUnit NET-Core.XUnit.UnitTests Unit testing project

Repository Root Miscellaneous Items

Item Name Type Purpose
.github Directory Contains GitHub Action scripts (CI/CD)
.vs Directory Contains Visual Studio setting files
.dockerignore File Contains definitions of files to be ignored by Docker Engine during image building process
.editorconfig File
.gitignore File Contains definitions of files to be ignored by Git
Scripts Directory Contains all scripts related to this repository
Scripts\repository-files-renamer.ps1 File This Powershell script file can be used to automatically renaming directories/files, replacing file contents to set up a new solution from this template repository
CONTRIBUTING.md File GitHub repository contributions mark-up file
docker-compose.yml File Docker compose file to build the application docker image along with PostgreSQL image, PostgreSQL specific migrations and with networking / volumes etc.
Dockerfile File Dockerization script file of the application
LICENSE.md File GitHub repository license mark-up file
README.md File GitHub repository readme mark-up file

Pre-configured Features:

  • Console logging using Serilog
  • Application monitoring using Sentry & New Relic
  • HTTPS redirection
  • Health check endpoint
  • CORS
  • Dependency Injection
  • EF Core with in-memory database setup or PostgreSQL or SQL Server database setup with Migrations and Seed Data
  • Data access from persistence medium through EF Core using Generic Repository Pattern, Unit of Work pattern
  • AutoMapping
  • Pagination in API response
  • Sample GET/POST/PUT/PATCH/DELETE APIs
  • Filtration, Sorting support on GET APIs through OData
  • HATEOAS complaint API response
  • Consistent & Machine readable error response using ProblemDetails
  • API Versioning
  • Open API documentation support using Swagger
  • Unit Testing setup using XUnit, Moq, Generic Repository Pattern
  • Code Coverage Report Generation setup with report summary in GitHub PR as Bot Comment
  • Git Ignore, Docker Ignore, Dockerfile and Docker Compose script for containerization
  • GitHub actions
  • Script to auto renaming components (files/directories, file contents) for setup of new solution from this template.

Known Issues

  • Containairization / Dockerization with HTTPS certification and PostgreSQL image
  • Containairization / Dockerization with HTTPS certification and SQL Server image

Learning

aspdotnet-template's People

Contributors

sk-shahnawaz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

aspdotnet-template's Issues

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.