├── BoilerPlate.Web ├── Views │ ├── _ViewStart.cshtml │ ├── Home │ │ ├── Privacy.cshtml │ │ └── Index.cshtml │ ├── Shared │ │ ├── Components │ │ │ └── Home │ │ │ │ ├── Open.cshtml │ │ │ │ ├── ClosePreSeason.cshtml │ │ │ │ └── ClosedForSeason.cshtml │ │ ├── _ValidationScriptsPartial.cshtml │ │ ├── Footer.cshtml │ │ ├── Head.cshtml │ │ ├── GTM.cshtml │ │ ├── Error.cshtml │ │ ├── _Layout.cshtml │ │ └── _AdminLayout.cshtml │ ├── _ViewImports.cshtml │ ├── Account │ │ ├── SignIn.cshtml │ │ └── SignUp.cshtml │ ├── Admin │ │ └── SignIn.cshtml │ └── Settings │ │ └── Create.cshtml ├── wwwroot │ ├── favicon.ico │ ├── js │ │ └── site.js │ └── css │ │ └── site.css ├── appsettings.dev.Development.json ├── appsettings.production.Development.json ├── appsettings.dev.json ├── appsettings.staging.json ├── appsettings.production.json ├── appsettings.json ├── Dockerfile ├── Dockerfile.original ├── Program-old.cs ├── Controllers │ ├── HomeController.cs │ ├── AdminController.cs │ ├── ViewComponents │ │ └── HomeViewComponent.cs │ ├── SettingsController.cs │ ├── OrderController.cs │ └── BaseController.cs ├── BoilerPlate.Web.csproj └── Properties │ └── launchSettings.json ├── BoilerPlate.Service.Entities ├── Class1.cs └── BoilerPlate.Service.Entities.csproj ├── BoilerPlate.Web.Entities ├── ViewModels │ ├── Components │ │ └── Home │ │ │ ├── PostSeasonModel.cs │ │ │ ├── OpenModel.cs │ │ │ └── PreSeasonModel.cs │ ├── KeyValueModel.cs │ ├── ErrorViewModel.cs │ ├── SignInModel.cs │ └── SignUpModel.cs ├── CountryBaseModel.cs ├── ApiModels │ └── Order API │ │ ├── Request │ │ └── Order │ │ │ ├── Update │ │ │ ├── UpdateOrderRequestModel.cs │ │ │ ├── UpdateHiderModel.cs │ │ │ └── UpdateOrderModel.cs │ │ │ ├── Create │ │ │ ├── OrderModel.cs │ │ │ ├── UserModel.cs │ │ │ └── CreateOrderRequestModel.cs │ │ │ └── List │ │ │ └── ListRequestModel.cs │ │ └── Response │ │ └── OrderResponseModel.cs ├── BoilerPlate.Web.Entities.csproj └── SettingsModel.cs ├── BoilerPlate.Data.Entities ├── BoilerPlate.Data.Entities.csproj ├── BaseEntity.cs ├── CountryBaseEntity.cs ├── Country.cs ├── Cache.cs ├── ApplicationLogs.cs └── Setting.cs ├── BoilerPlate.Utils ├── Exceptions │ ├── APIErrorResponseWrapper.cs │ ├── ForbiddenException.cs │ ├── NotFoundException.cs │ ├── AuthenticationFailedException.cs │ ├── ApiErrorResponse.cs │ ├── ApiErrorResponseFactory.cs │ └── CustomException.cs ├── Configuration │ ├── CountryConfiguration.cs │ ├── Campaign.cs │ ├── ConnectionStrings.cs │ ├── Market.cs │ ├── ApplicationSettings.cs │ └── MarketConfiguration.cs ├── Enums │ ├── ApplicationUserRoles.cs │ ├── CampaignStatuses.cs │ └── Countries.cs ├── Authentication │ ├── ApplicationRole.cs │ └── ApplicationUser.cs ├── Helpers │ ├── ApiCaller │ │ ├── ContentType.cs │ │ ├── APICallResponseDTO.cs │ │ ├── APICallRequestDTO.cs │ │ └── RequestHelpers.cs │ ├── UrlHelper.cs │ ├── SerializationHelper.cs │ ├── SemaphoreLocker.cs │ ├── PredicateBuilder.cs │ ├── DateHelper.cs │ ├── SiteHelper.cs │ └── EnumHelper.cs ├── Constants │ ├── HangfireQueues.cs │ └── Constants.cs ├── Attributes │ └── IsTrueAttribute.cs ├── BoilerPlate.Utils.csproj └── Extensions │ ├── DistributedCaching.cs │ └── HttpRequestExtensions.cs ├── BoilerPlate.Service.Contract ├── IStatisticService.cs ├── IBulkOperationService.cs ├── IEmailService.cs ├── IEncryptionService.cs ├── ICacheService.cs ├── ICampaignService.cs ├── BoilerPlate.Service.Contract.csproj ├── ISettingService.cs └── IIdentityService.cs ├── BoilerPlate.Data.Contract ├── IDataContext.cs ├── BoilerPlate.Data.Contract.csproj ├── IHangfireDataContext.cs ├── IStatisticRepository.cs ├── ISettingRepository.cs └── IBaseRepository.cs ├── BoilerPlate.Test ├── Fakers │ ├── CreateOrderRequestModelFaker.cs │ ├── SignInModelFaker.cs │ └── OrderModelFaker.cs ├── TestBase.cs ├── TestConfig.cs ├── BoilerPlate.Test.csproj ├── PageObjects │ └── AdminSignInPageObject.cs ├── Drivers │ ├── WebDriver.cs │ └── WebDriverFactory.cs ├── BrowserTestBase.cs └── UserTests │ └── AdminTests.cs ├── .dockerignore ├── BoilerPlate.Bootstrapper ├── Authentication │ ├── EmailConfirmationTokenProviderOptions.cs │ ├── CustomEmailConfirmationTokenProvider.cs │ └── AppClaimsPrincipalFactory.cs ├── Authorization │ ├── HangfireAuthorizationFilter.cs │ ├── APIUserAuthorizeAttribute.cs │ └── CampaignSeasonAttribute.cs ├── ConfigurationExtension │ ├── HangfireConfigurationExtension.cs │ ├── SwaggerConfigurationExtension.cs │ └── EndpointConfigurationExtension.cs ├── RegisterSeedUsers.cs ├── LanguageRouteConstraint.cs ├── ServiceExtensions │ ├── BusinessServiceExtension.cs │ ├── ConfigurationServiceExtension.cs │ ├── LogExtension.cs │ ├── HangfireExtension.cs │ ├── MarketConfigurationExtension.cs │ ├── CultureExtension.cs │ └── RepositoryServiceExtension.cs ├── RouteDataRequestCultureProvider.cs ├── LocalizationConvention.cs ├── BoilerPlate.Bootstrapper.csproj ├── CultureAnchorTagHelper.cs ├── SecurityHeadersMiddleware.cs └── ResponseMiddleware.cs ├── BoilerPlate.Data ├── Repositories │ ├── StatisticRepository.cs │ ├── SettingRepository.cs │ └── BaseRepository.cs ├── BoilerPlate.Data.csproj └── DBContext │ ├── HangfireDataContext.cs │ ├── ApplicationDataContext.cs │ ├── BaseDataContext.cs │ ├── DbExtensions.cs │ └── ModelBuilderExtensions.cs ├── BoilerPlate.Service ├── StatisticService.cs ├── BulkOperationService.cs ├── BoilerPlate.Service.csproj ├── EmailService.cs ├── CacheService.cs ├── CampaignService.cs ├── EncryptionService.cs └── SettingService.cs └── README.md /BoilerPlate.Web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /BoilerPlate.Web/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alico/asp-net-6-mvc-boilerplate/HEAD/BoilerPlate.Web/wwwroot/favicon.ico -------------------------------------------------------------------------------- /BoilerPlate.Service.Entities/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace BoilerPlate.Service.Entities 4 | { 5 | public class Class1 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /BoilerPlate.Web.Entities/ViewModels/Components/Home/PostSeasonModel.cs: -------------------------------------------------------------------------------- 1 | namespace BoilerPlate.Web.Entities 2 | { 3 | public record PostSeasonModel : CountryBaseModel 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /BoilerPlate.Web/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |
Use this page to detail your site's privacy policy.
7 | -------------------------------------------------------------------------------- /BoilerPlate.Data.Entities/BoilerPlate.Data.Entities.csproj: -------------------------------------------------------------------------------- 1 |The campaign is open
-------------------------------------------------------------------------------- /BoilerPlate.Web/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /BoilerPlate.Web/appsettings.dev.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /BoilerPlate.Web/Views/Shared/Footer.cshtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /BoilerPlate.Web/appsettings.production.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /BoilerPlate.Web.Entities/ViewModels/KeyValueModel.cs: -------------------------------------------------------------------------------- 1 | namespace BoilerPlate.Web.Entities 2 | { 3 | public record KeyValueModel 4 | { 5 | public string Key { get; set; } 6 | 7 | public string Value { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /BoilerPlate.Web/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /BoilerPlate.Utils/Exceptions/APIErrorResponseWrapper.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace BoilerPlate.Utils 4 | { 5 | public class APIErrorResponseWrapper 6 | { 7 | [JsonProperty("error")] 8 | public object Error { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /BoilerPlate.Utils/Exceptions/ForbiddenException.cs: -------------------------------------------------------------------------------- 1 | namespace BoilerPlate.Utils 2 | { 3 | public class ForbiddenException : CustomException 4 | { 5 | public ForbiddenException(string message = "Not Authorized.") : base(message) 6 | { 7 | 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /BoilerPlate.Utils/Exceptions/NotFoundException.cs: -------------------------------------------------------------------------------- 1 | namespace BoilerPlate.Utils 2 | { 3 | public class NotFoundException : CustomException 4 | { 5 | public NotFoundException(string message = "Couldn't find this item!") : base(message) 6 | { 7 | 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /BoilerPlate.Web.Entities/ViewModels/Components/Home/PreSeasonModel.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace BoilerPlate.Web.Entities 3 | { 4 | public record PreSeasonModel : CountryBaseModel 5 | { 6 | public SignUpModel SignUpModel { get; set; } 7 | public string OpeningDate { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /BoilerPlate.Data.Entities/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace BoilerPlate.Data.Entities 5 | { 6 | [Serializable] 7 | public class BaseEntity
12 | Request ID: @Model.RequestId
13 |
18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |
20 |21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |
26 | -------------------------------------------------------------------------------- /BoilerPlate.Bootstrapper/LanguageRouteConstraint.cs: -------------------------------------------------------------------------------- 1 | using BoilerPlate.Utils; 2 | using Microsoft.AspNetCore.Http; 3 | using Microsoft.AspNetCore.Routing; 4 | using System.Linq; 5 | 6 | namespace BoilerPlate.Bootstrapper 7 | { 8 | public class LanguageRouteConstraint : IRouteConstraint 9 | { 10 | public bool Match(HttpContext httpContext, IRouter route, string routeKey, RouteValueDictionary values, RouteDirection routeDirection) 11 | { 12 | if (!values.ContainsKey("culture")) 13 | return false; 14 | 15 | var cultureSlugs = EnumHelper.GetEnumList