Skip to content

This project is an Web API Open-Source Boilerplate Template that includes NET 8, Web API standards, clean n-tier architecture, GraphQL service, Redis, Mssql, Mongo databases and User Auditing (Identity) with a lot of best practices.

License

Notifications You must be signed in to change notification settings

sinantok/aspnetcore-webapi-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASP.NET Core Web Api Template

This project is an Web API Open-Source Boilerplate Template that includes Net 8, Web API standards, clean n-tier architecture, GraphQL service, Redis, Mssql, Mongo databases and User Auditing (Identity) with a lot of best practices.

Releases

v1.0, v2.0, v3.0, v4.0

v4.0

Follow these steps to get started with this Boilerplate Template.

Download the Extension

Make sure Visual Studio 2019 is installed on your machine with the latest SDK. Download from Visual Studio Marketplace. Install it on your machine.

Follow these Steps to get started.

enter image description here

You Solution Template is Ready!

enter image description here

Alternatively you can also clone the Repository.

  1. Clone this Repository and Extract it to a Folder.
  2. Change the Connection Strings for the "DefaultConnection" and "IdentityConnection" in the appsettings.json
  3. Run the following commands on Powershell in the Projecct's Directory.
  • dotnet restore
  • dotnet ef database update -Context IdentityContext
  • dotnet ef database update -Context ApplicationDbContext
  • dotnet run (OR) Run the Solution using Visual Studio

Swagger

You can view endpoints with swagger enter image description here

HealthCheck

You can check the status of the services with HealthCheck

Default Roles & Credentials

As soon you build and run your application, default users and roles get added to the database.

Default Roles:

  • SuperAdmin
  • Admin
  • Moderator
  • Basic

Here are the credentials for the default user.

You can use these default credentials to generate valid JWTokens at the ../api/account/authenticate endpoint.

Technologies

  • .Net 8 WebApi
  • .NET 8
  • REST Standards
  • GraphQL
  • MSSQL
  • MongoDB
  • Microsoft Identity
  • Redis
  • SeriLog(seq)
  • AutoMapper
  • Smtp / Mailkit
  • Swagger Open Api
  • Health Checks

Features

  • Net 8
  • N-Tier Architecture
  • Restful
  • GraphQl
  • Entity Framework Core - Code First
  • Repository Pattern - Generic
  • UnitOfWork
  • Redis Caching
  • Response Wrappers
  • Microsoft Identity with JWT Authentication
  • Role based Authorization
  • Identity Seeding
  • Database Seeding
  • Custom Exception Handling Middlewares
  • Serilog
  • Automapper
  • Swagger UI
  • Healthchecks
  • SMTP / Mailkit / Sendgrid Email Service
  • Complete User Management Module (Register / Generate Token / Forgot Password / Confirmation Mail)
  • User Auditing
  • Pagination
  • Refit
  • Fluent Validation
  • Unit Test
  • .Net 8 migration
  • MongoDb Operations
  • Docker Support docker-compose.yml and Dockerfile

Purpose of this Project

This template project has been developed to ensure that the necessary structures are not installed over and over again when creating each new WebAPI project. In addition, the structures that should be in a WepAPI are developed with a clean architecture and up-to-date technologies.

Prerequisites

  • Visual Studio 2019 Community and above
  • .NET 8 SDK and above
  • Basic Understanding of Architectures and Clean Code Principles

Give a Star ⭐️

If you found this Implementation helpful or used it in your Projects, do give it a star. Thanks!

Licensing

sinantok/aspnetcore-webapi-template Project is licensed with the MIT License.

About the Author

Sinan Tok