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.
v1.0, v2.0, v3.0, v4.0
Follow these steps to get started with this Boilerplate Template.
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!
Alternatively you can also clone the Repository.
- 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
You can view endpoints with swagger
You can check the status of the services with HealthCheck
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 - superadmin@gmail.com / Password - 123Pa$$word!
You can use these default credentials to generate valid JWTokens at the ../api/account/authenticate endpoint.
- .Net 8 WebApi
- .NET 8
- REST Standards
- GraphQL
- MSSQL
- MongoDB
- Microsoft Identity
- Redis
- SeriLog(seq)
- AutoMapper
- Smtp / Mailkit
- Swagger Open Api
- Health Checks
- 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
andDockerfile
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.
- Visual Studio 2019 Community and above
- .NET 8 SDK and above
- Basic Understanding of Architectures and Clean Code Principles
If you found this Implementation helpful or used it in your Projects, do give it a star. Thanks!
sinantok/aspnetcore-webapi-template Project is licensed with the MIT License.
- Github github.com/sinantok
- Linkedin - Sinan Tok