├── _config.yml ├── src ├── DemoModules │ ├── BookLibrary │ │ ├── Content │ │ │ └── module.css │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ └── Book │ │ │ │ └── AvailableBooks.cshtml │ │ ├── Dtos │ │ │ ├── ReturnBookDTO.cs │ │ │ └── RentBookDTO.cs │ │ ├── ModuleDefiniation.cs │ │ ├── ViewModels │ │ │ ├── BookListViewModel.cs │ │ │ └── BookDetailsViewModel.cs │ │ ├── Migrations │ │ │ └── Migration.1.0.0.cs │ │ ├── BookLibrary.csproj │ │ ├── DAL │ │ │ └── BookDAL.cs │ │ └── Controllers │ │ │ └── BookController.cs │ ├── DemoPlugin1 │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ └── Plugin1 │ │ │ │ └── HelloWorld.cshtml │ │ ├── Content │ │ │ └── module.css │ │ ├── plugin.json │ │ ├── Models │ │ │ ├── TestClass.cs │ │ │ └── BookViewModel.cs │ │ ├── ModuleDefiniation.cs │ │ ├── .template.config │ │ │ └── template.json │ │ ├── CoolCatModuleTemplate.nuspec │ │ ├── Migrations │ │ │ ├── Migration.1.0.0.cs │ │ │ └── Migration.1.1.0.cs │ │ ├── DemoPlugin1.csproj │ │ └── Controllers │ │ │ └── Plugin1Controller.cs │ ├── DemoPlugin2 │ │ ├── Views │ │ │ ├── Plugin2 │ │ │ │ └── HelloWorld.cshtml │ │ │ └── _ViewStart.cshtml │ │ ├── ModuleDefiniation.cs │ │ ├── LoadHelloWorldEventHandler.cs │ │ ├── DemoPlugin2.csproj │ │ ├── Controllers │ │ │ └── Plugin2Controller.cs │ │ ├── Migrations │ │ │ └── Migration.1.0.0.cs │ │ └── NotificationProvider.cs │ └── BookInventory │ │ └── BookInventory │ │ ├── Views │ │ ├── _ViewStart.cshtml │ │ └── BookInventory │ │ │ ├── Add.cshtml │ │ │ └── Books.cshtml │ │ ├── Content │ │ └── module.css │ │ ├── ModuleDefiniation.cs │ │ ├── Models │ │ └── Book.cs │ │ ├── ViewModels │ │ ├── BookListViewModel.cs │ │ └── BookDetailViewModel.cs │ │ ├── Dtos │ │ ├── UpdateBookDto.cs │ │ └── AddBookDto.cs │ │ ├── Migrations │ │ ├── Migration.1.1.0.cs │ │ └── Migration.1.0.0.cs │ │ ├── BookInEventHandler.cs │ │ ├── BookOutEventHandler.cs │ │ ├── NotificationProvider.cs │ │ ├── BookInventory.csproj │ │ ├── DataStores │ │ ├── AvailableBookQuery.cs │ │ └── BookDetailsQuery.cs │ │ ├── Controllers │ │ └── BookInventoryController.cs │ │ └── DAL │ │ └── BookDAL.cs ├── CoolCat │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── User │ │ │ └── Index.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ └── Shared │ │ │ ├── Error.cshtml │ │ │ ├── _CookieConsentPartial.cshtml │ │ │ └── _ValidationScriptsPartial.cshtml │ ├── Areas │ │ └── Admin │ │ │ ├── _ViewStart.cshtml │ │ │ ├── Controllers │ │ │ ├── HomeController.cs │ │ │ ├── PluginsController.cs │ │ │ └── SystemController.cs │ │ │ └── Views │ │ │ ├── Home │ │ │ └── Dashboard.cshtml │ │ │ ├── Plugins │ │ │ ├── Add.cshtml │ │ │ ├── Assemblies.cshtml │ │ │ ├── Index.cshtml │ │ │ └── Document.cshtml │ │ │ └── System │ │ │ ├── SiteSettings.cshtml │ │ │ ├── Login.cshtml │ │ │ └── Setup.cshtml │ ├── dockerfile │ ├── wwwroot │ │ ├── logo2.png │ │ ├── favicon.ico │ │ ├── logo_small.png │ │ ├── js │ │ │ ├── site.js │ │ │ └── setup.js │ │ ├── lib │ │ │ ├── jquery-validation-unobtrusive │ │ │ │ └── LICENSE.txt │ │ │ ├── jquery-validation │ │ │ │ └── LICENSE.md │ │ │ ├── bootstrap │ │ │ │ ├── LICENSE │ │ │ │ └── dist │ │ │ │ │ └── css │ │ │ │ │ └── bootstrap-reboot.min.css │ │ │ └── jquery │ │ │ │ └── LICENSE.txt │ │ └── css │ │ │ └── site.css │ ├── PresetModules │ │ ├── BookInventory.zip │ │ ├── BookLibrary.zip │ │ ├── DemoPlugin1.zip │ │ └── DemoPlugin2.zip │ ├── Models │ │ ├── SiteSettings.cs │ │ ├── SetupModulesModel.cs │ │ └── ErrorViewModel.cs │ ├── appsettings.Development.json │ ├── Controllers │ │ ├── UserController.cs │ │ ├── HomeController.cs │ │ └── CommonController.cs │ ├── appsettings.json │ ├── Dtos │ │ └── LoginDTO.cs │ ├── Utilities │ │ └── PresetPluginLoader.cs │ ├── Program.cs │ ├── CoolCat.csproj │ └── Startup.cs ├── dockerfile ├── InternalModules │ └── PluginManagement │ │ ├── Views │ │ └── _ViewStart.cshtml │ │ ├── Content │ │ └── module.css │ │ ├── plugin.json │ │ ├── ModuleDefiniation.cs │ │ ├── PluginManagement.csproj │ │ └── Controllers │ │ └── PluginController.cs ├── TestPlugins │ ├── BookLibrary │ │ └── BookLibrary.zip │ ├── DemoPlugin1 │ │ └── DemoPlugin1.zip │ ├── DemoPlugin2 │ │ └── DemoPlugin2.zip │ └── BookInventory │ │ └── BookInventory.zip ├── CoolCat.Core │ ├── Contracts │ │ ├── IAuthorization.cs │ │ ├── INotification.cs │ │ ├── IModule.cs │ │ ├── IDataStoreQuery.cs │ │ ├── ICollectibleAssemblyLoadContextProvider.cs │ │ ├── INotificationRegister.cs │ │ ├── IMigration.cs │ │ ├── IRefenerceLoader.cs │ │ ├── IMvcModuleSetup.cs │ │ ├── INotificationProvider.cs │ │ ├── IDataStore.cs │ │ ├── IDbConnectionFactory.cs │ │ ├── IDocumentation.cs │ │ ├── ISystemManager.cs │ │ ├── IReferenceContainer.cs │ │ └── IPluginManager.cs │ ├── Models │ │ ├── SiteSettings.cs │ │ ├── ConnectionStringSetting.cs │ │ └── ModuleDefiniation.cs │ ├── Consts │ │ ├── GlobalConst.cs │ │ └── SiteSettingConst.cs │ ├── DTOs │ │ ├── SiteSettingsDTO.cs │ │ └── AddPluginDTO.cs │ ├── DomainModel │ │ ├── CachedReferenceItemKey.cs │ │ ├── QueryDocumentItem.cs │ │ ├── PluginConfiguration.cs │ │ ├── ModuleBase.cs │ │ ├── DependanceItem.cs │ │ ├── BaseMigration.cs │ │ ├── Version.cs │ │ └── PluginPackage.cs │ ├── ViewModels │ │ ├── SiteSettingsViewModel.cs │ │ ├── KeyValueViewModel.cs │ │ ├── PluginViewModel.cs │ │ ├── PluginListItemViewModel.cs │ │ └── PageRouteViewModel.cs │ ├── Repositories │ │ ├── ISiteRepository.cs │ │ ├── IUnitOfWork.cs │ │ ├── Command.cs │ │ └── IPluginRepository.cs │ ├── Exceptions │ │ ├── WrongFormatConfigurationException.cs │ │ └── MissingConfigurationFileException.cs │ ├── Attributes │ │ ├── Page.cs │ │ ├── NoneRequestParameter.cs │ │ ├── ResponseType.cs │ │ └── RequestParameterType.cs │ ├── CoolCat.Core.csproj │ ├── Configurations │ │ └── DependanceConfiguration.cs │ ├── BusinessLogic │ │ └── SystemManager.cs │ ├── PluginsLoadContexts.cs │ ├── Helpers │ │ ├── DefaultReferenceContainer.cs │ │ └── DefaultReferenceLoader.cs │ └── CollectibleAssemblyLoadContext.cs ├── _config.yml ├── conf │ └── my.cnf ├── DemoReferenceLibrary │ ├── Demo.cs │ └── DemoReferenceLibrary.csproj ├── CoolCat.Database │ ├── Plugins.sql │ ├── PluginMigrations.sql │ ├── CoolCat.Database.refactorlog │ └── CoolCat.Database.sqlproj ├── CoolCat.Core.Mvc │ ├── Compiler │ │ ├── CoolCatAssemblyPart.cs │ │ ├── CoolCatModuleCompiledItemLoader.cs │ │ ├── CoolCatViewAssemblyPart.cs │ │ ├── CoolCatModuleViewCompiledItem.cs │ │ ├── CoolCatViewCompilerProvider.cs │ │ └── CoolCatViewCompiler.cs │ ├── Extensions │ │ ├── HttpRequestExtension.cs │ │ └── CollectibleAssemblyLoadContextExtension.cs │ ├── CoolCat.Core.Mvc.csproj │ ├── Infrastructure │ │ ├── CoolCatActionDescriptorChangeProvider.cs │ │ ├── CoolCatController.cs │ │ ├── CoolCatRouteConfiguration.cs │ │ ├── NotificationRegister.cs │ │ ├── DefaultDataStore.cs │ │ ├── ServiceCollectionExtensions.cs │ │ ├── CoolCatModuleDocumentation.cs │ │ └── CoolCatStartup.cs │ └── MvcModuleSetup.cs ├── .dockerignore ├── CoolCat.Core.Test │ ├── CoolCat.Core.Test.csproj │ └── VersionTest.cs ├── docker-compose.yml └── CoolCat.Core.Repository.MySql │ ├── Migrations │ ├── 202007262334.cs │ ├── 202007202310.cs │ └── 202005282045.cs │ ├── CoolCat.Core.Repository.MySql.csproj │ ├── MySqlConnectionFactory.cs │ ├── SiteRepository.cs │ └── UnitOfWork.cs ├── images └── logo.png ├── doc ├── images │ ├── logo.png │ ├── load_way.png │ ├── logo_small.png │ └── 20200726215825.png └── Question.md ├── init └── init.sql ├── .github └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── README.md /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /src/DemoModules/BookLibrary/Content/module.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/CoolCat/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamondlu/CoolCat/HEAD/images/logo.png -------------------------------------------------------------------------------- /src/dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamondlu/CoolCat/HEAD/src/dockerfile -------------------------------------------------------------------------------- /src/CoolCat/Areas/Admin/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_AdminLayout"; 3 | } 4 | -------------------------------------------------------------------------------- /doc/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamondlu/CoolCat/HEAD/doc/images/logo.png -------------------------------------------------------------------------------- /doc/images/load_way.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamondlu/CoolCat/HEAD/doc/images/load_way.png -------------------------------------------------------------------------------- /src/CoolCat/dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamondlu/CoolCat/HEAD/src/CoolCat/dockerfile -------------------------------------------------------------------------------- /doc/images/logo_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamondlu/CoolCat/HEAD/doc/images/logo_small.png -------------------------------------------------------------------------------- /doc/images/20200726215825.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamondlu/CoolCat/HEAD/doc/images/20200726215825.png -------------------------------------------------------------------------------- /src/CoolCat/wwwroot/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lamondlu/CoolCat/HEAD/src/CoolCat/wwwroot/logo2.png -------------------------------------------------------------------------------- /src/DemoModules/BookLibrary/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /src/DemoModules/DemoPlugin1/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /src/DemoModules/DemoPlugin2/Views/Plugin2/HelloWorld.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | 3 | } 4 | 5 |
9 |
12 | CoolCat is a framework to help you create a dynamic plugin
system under ASP.NET Core MVC.
13 |
14 |
15 |
17 | This is the admin page 18 |
19 |
11 |
13 | CoolCat is a framework to help you create a dynamic plugin
system under ASP.NET Core MVC.
14 |
16 | 17 | /Admin/System/Login is the admin login page, the fake login account is admin/admin 18 |
19 || Assembly Name | 12 |Version | 13 |
|---|---|
| @row.ReferenceName | 22 |@row.Version | 23 |
| No Data. | 30 ||
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 | -------------------------------------------------------------------------------- /src/CoolCat.Core.Mvc/Infrastructure/CoolCatController.cs: -------------------------------------------------------------------------------- 1 | using CoolCat.Core.Contracts; 2 | using Microsoft.AspNetCore.Mvc; 3 | 4 | namespace CoolCat.Core.Mvc.Infrastructure 5 | { 6 | public class CoolCatController : Controller 7 | { 8 | private string _moduleName = string.Empty; 9 | private IDataStore _dataStore; 10 | 11 | public CoolCatController(string moduleName, IDataStore dataStore) 12 | { 13 | _moduleName = moduleName; 14 | _dataStore = dataStore; 15 | } 16 | 17 | protected string Query(string moduleName, string queryName, string parameter) 18 | { 19 | return _dataStore.Query(moduleName, queryName, parameter, source: _moduleName); 20 | } 21 | 22 | public override RedirectToActionResult RedirectToAction(string actionName, string controllerName) 23 | { 24 | return base.RedirectToAction(actionName, controllerName, new { Area = _moduleName }); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/CoolCat.Core/Configurations/DependanceConfiguration.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | 3 | namespace CoolCat.Core.Configurations 4 | { 5 | public class DependanceConfiguration 6 | { 7 | public RuntimeTarget RuntimeTarget { get; set; } 8 | 9 | public CompilationOptions CompilationOptions { get; set; } 10 | 11 | public JObject Targets { get; set; } 12 | 13 | public JObject Libraries { get; set; } 14 | } 15 | 16 | public class RuntimeTarget 17 | { 18 | public string Name { get; set; } 19 | 20 | public string Signature { get; set; } 21 | } 22 | 23 | public class CompilationOptions 24 | { 25 | 26 | } 27 | 28 | public class LibraryConfiguration 29 | { 30 | public string Type { get; set; } 31 | 32 | public string Serviceable { get; set; } 33 | 34 | public string Sha512 { get; set; } 35 | 36 | public string Path { get; set; } 37 | 38 | public string HashPath { get; set; } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /src/CoolCat.Core.Repository.MySql/MySqlConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | using CoolCat.Core.Contracts; 2 | using CoolCat.Core.Models; 3 | using Microsoft.Extensions.Options; 4 | using MySql.Data.MySqlClient; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Data; 8 | using System.Linq; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace CoolCat.Core.Repository.MySql 13 | { 14 | public class MySqlConnectionFactory : IDbConnectionFactory 15 | { 16 | private MySqlConnection _mySqlConnection = null; 17 | private ConnectionStringSetting _setting = null; 18 | 19 | public MySqlConnectionFactory(IOptions