Coder Social home page Coder Social logo

zwmyint / net6webapitemplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marlonajgayle/net6webapitemplate

0.0 0.0 0.0 221 KB

This is a multi-project solution dotnet template for creating an enterprise-level Web API using .NET 6 ASP.NET Core using the Clean Architecture principles and API best practices.

License: MIT License

C# 98.06% HTML 0.16% Dockerfile 1.78%

net6webapitemplate's Introduction

.NET 6 Web Template

Build CodeQL Boilerplate.Templates NuGet Package Boilerplate.Templates NuGet Package Downloads

This is a multi-project solution dotnet template for developing an enterprise-level Web API with.NET 6 ASP.NET Core, following Clean Architecture principles and API best practices. The .NET 6 Web Api Template consist of scafolding for API versioning, CQRS, email, localization, logging, IP rate limiting, JWT, Open API, validation, unit and integration testing.

Table of Contents

Prerequisites

You will need the following tools:

Instructions

  1. Install the latest .NET Core 6 SDK.
  2. Run dotnet new --install Net6WebTemplate::1.0.0-beta.2 to install the project template
  3. Then navigate to the location you would like to create to project
  4. Run dotnet new net6webapi -o "my-project" to create a new project

Docker Setup

ASP.NET Core Web API uses HTTPS and relies on certificates for trust, identity and encryption. To run Net5WebTemplate application Docker over HTTPS during development do the following:

  1. Generate certificate using 'dotnet dev-certs' (for localhost use Only!).

Note: Update the docker-compose file with dev-cert password used.

On Windows using Linux Containers

dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx  -p your_password
dotnet dev-certs https --trust

When using PowerShell, replace %USERPROFILE% with $env:USERPROFILE.

On macOS or Linux

dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p { password here }
dotnet dev-certs https --trust
  1. Build and run Docker containers run Docker compose located in the solution directory
docker-compose -f 'docker-compose.yml' up --build

Database Setup

To setup the SQL Server database following the instrcutions below:

  1. Reveiw the connection string in appsettings.Local.json and update the database name.
  2. Run dotnet ef migrations add Initial --context <ProjectName>DbContext to add migation with EF Core
  3. Run dotnet ef database update Initial to create application database.

Contributions

  • Demar-j - Implemented API endpoints, Unit and Integration tests.
  • mahousen - .

Credits

This solution's structure was heavily infuenced by Jason Taylor's Clean Architecture model. Icon made by Flat Icons from www.flaticon.com

Versions

The main branch is running .NET 6.0

License

This project is licensed under the MIT License - see the LICENSE.md main branch is running .NET 6.0 file for details.

net6webapitemplate's People

Contributors

marlonajgayle avatar demar-j avatar conradj3 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.