ASP.NET Core Web Api Template
This project is an Web API Open-Source Boilerplate Template that includes ASP.NET Core 5, 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
v3.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.
You Solution Template is Ready!
Repository.
Alternatively you can also clone the- Clone this Repository and Extract it to a Folder.
- Change the Connection Strings for the "DefaultConnection" and "IdentityConnection" in the appsettings.json
- 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
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.
- Email - [email protected] / Password - 123Pa$$word!
You can use these default credentials to generate valid JWTokens at the ../api/account/authenticate endpoint.
Technologies
- ASP.NET Core 5 WebApi
- .NET Core 5
- REST Standards
- GraphQL
- MSSQL
- MongoDB
- Microsoft Identity
- Redis
- SeriLog(seq)
- AutoMapper
- Smtp / Mailkit
- Swagger Open Api
- Health Checks
Features
- Net Core
- 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 5 migration
- MongoDb Operations
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 Core 5 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
- Github github.com/sinantok
- Linkedin - Sinan Tok