Skip to content

alico/asp-net-6-mvc-boilerplate

Repository files navigation

ASP.NET Core 6.x MVC Boiler plate

An ASP.NET Core 6.x MVC project template for a quick start.

Versions:
Framework .NET 6.x
Language C# 10

Functionalities / Features

  • User/Role Management with ASP.NET Identity
  • Hangfire
      Dashboard
      Authorization
      Custom Queue/Worker management
  • Swagger
      API Documentation
  • Logging with Serilog
      SQL Implementation
      Custom RequestId
  • Admin Panel
      Campaign Management
      API Credential Management
      Hangfire Dashboard Access
  • Campaign Management
      Campaign State Management by market (Open / PreSeason / PostSeason)
  • Response Caching
  • Markup Minification
  • Response Compression
  • Error Handling
  • Generic Repository
  • Code First
  • Generic Response Wrapper as a Middleware
  • RESTful API support
  • Routing
  • Cache Services
  • Globalization and Localization
      Determining the culture by the URL or a route parameter
  • Site Settings Management
  • Encyription
  • Automated Tests
      A scalable test automation infrastructure with Selenium + NUnit + Bogus
      Fakers
      User Tests
      Browser drivers (Chrome, Edge, Firefox)

How to run on your local machine?

You just need to replace the connection strings for the main and hangfire in appsettings.json with yours. Check the user privileges in the connection strings, the user should be able to create a database.

image

IIS Express should be chosen from the launch configuration drop down.

image

If you need to work with multiple environments then replace the connection strings in equivalent appsettings.{env}.json.

image

Layers and Structure

image

1-Data

Contains only database CRUD operations via a generic repository.

  • BoilerPlate.Data
      Data Contexts
      Repositories
      Extensions
  • BoilerPlate.Data.Contracts
      Contracts
  • BoilerPlate.Data.Entities
      Database Objects

2-Service

All business services, contracts and entities are in this layer. Contains only database CRUD operations via a generic repository.

  • BoilerPlate.Service
      Business Services
  • BoilerPlate.Service.Contracts
      Contracts
  • BoilerPlate.Service.Entities
      Business Objects

3-Web

Web application and it's entities place in this layer.

  • BoilerPlate.Web
      MVC Application
  • BoilerPlate.Service.Contracts
      Contracts
  • BoilerPlate.Web.Entities
      Models and API request/response models

4-Test

Test automations with Selenium + NUnit + Bogus

  • BoilerPlate.Test
      Drivers
      Fakers
      PageObjects
      UserTests

5-Common

  • BoilerPlate.Bootstrapper
      Dependencies
      Middlewares
      Attributes
      Localization
  • BoilerPlate.Utils
      Configuration
      Constants
      Enums
      Exceptions
      Extensions
      Helpers
  • BoilerPlate.Web.Entities
      View Models
      API Models