Blog.Core Framework
repository·master·Indexed 26 days ago
https://github.com/anjoy8/blog.coreAn enterprise-level, full-stack permission framework built on .NET Core 6.0 and Vue 2.x. It features a robust RBAC system, multi-tenancy support, and a modular architecture using a repository + service pattern. The framework integrates SqlSugar ORM for support of MySQL, SQL Server, SQLite, Oracle, and PostgreSQL, and utilizes Autofac for dependency injection, IdentityServer4 for authentication, and Redis for caching.
What's inside Blog.Core
- Blog.Core is an enterprise-grade, out-of-the-box full-stack permission framework featuring a .NET Core 6.0 API backend and Vue 2.x frontend with RBAC (Role-Based Access Control). It is designed for rapid development of business systems and supports various deployment scenarios including microservices and containerization.
Overview of Blog.Core Framework
masterBlog.Core is an enterprise-class back-to-back separation framework designed for .NET Core 5.0 API, Vue 2.x, and RBAC (Role-Based Access Control). It is optimized for high concurrency, capable of handling 400~500 concurrent requests on a single deployment under normal conditions.
Key architectural features include:
- Layered Architecture: Uses a 'repository + service + interface' pattern.
- Database Support: Uses SQLSUGAR ORM and supports free switching between MySQL, SQL Server, SQLite, Oracle, PostgreSQL, and others.
- AOP Support: Provides 4 types of Aspect-Oriented Programming (AOP) facets: logging, caching, auditing, and transactions.
- Code Generation: Supports T4 code templates and a 'DbFirst' approach to automatically generate the four-layer project files.
- Authentication: Uniformly integrates IdentityServer4 (IDS4).
Review the system environment and technology stack
masterThe project is built using the following stack:
System Environment
- OS: Windows 10, Windows Server R2
- Database: SQL Server 2012
- IDE: Visual Studio 2017
Back-end Technology
- Framework: .NET Core 2.0 API
- API Docs: Swagger (RESTful style)
- Pattern: Repository + Service Warehousing mode
- Programming: Async/await, AOP (Aspect-Oriented Programming)
- DI/IOC: AUTOFAC (lightweight IOC and DI)
- Security: JWT Permission Authentication
- Cross-Domain: CORS and Nginx cross-domain proxy
Database & Caching
- ORM: Sqlsugar (Lightweight ORM, Codefirst, T4 Template generation)
- Mapping: AutoMapper
- Caching: Redis (Lightweight Distributed cache)
Front-end Technology
- Core: Vue 2.0 (Vue2 + VueRouter2 + Webpack + Axios + vue-cli + Vuex)
- UI Library: ElementUI
- SSR: Nuxt.js
Install Blog.Core.Webapi.Template via NuGet
masterYou can use theBlog.Core.Webapi.TemplateNuGet package to quickly scaffold your own project structure.Access official documentation and learning resources
masterThe project provides official documentation for basic operations such as getting started, configuring data, and connecting to a database. Additionally, there are supplemental articles and video resources available.
- Official Documentation: http://apk.neters.club/.doc/
- Important Articles & Videos: https://mvp.neters.club/
Initialize a new Blog.Core project
masterTo get started with a new project, you can use the
Blog.Core.Webapi.TemplateNuGet package or the provided automation scripts.Quick Start via Download:
- Download the project.
- Compile the solution.
- Run the application.
By default, the project will automatically generate seed data and use
Sqliteas the database. API documentation is available viaSwagger.Access learning demos via BlogArti
masterIf the mainblog.coreproject is too complex for initial learning, you can use the standalone sub-demos provided in theBlogArtirepository to study specific implementations and patterns.Review the Vue Front-end learning catalogue
masterThe repository includes a learning path for front-end development using the Vue ecosystem, covering:
- Vue Basics: JS Object-oriented, ES6, directives, computed properties, watchers, style binding, and lifecycle.
- Vue Components: Component details and project descriptions.
- Actual Combat (Practical Implementation): Building a personal blog using Axios, VueRouter, and Vuex.
- Authentication: Implementing JWT authorization and login with Vuex.
- SSR (Server Side Rendering): Introduction to SSR, Nuxt.js foundations, and asynchronous dual-end rendering.
- Advanced Nuxt.js: Dynamic routing, isomorphism, and permission validation based on Vuex.
Review the .NET Core Back-end learning catalogue
masterThe repository includes a comprehensive learning path for .NET Core back-end development, covering topics such as:
- Project Construction: Framework bis and API project building.
- API Documentation: Using Swagger 3.1, 3.2, and handling multi-version control.
- Security: JWT permission verification, resolving expiration issues, and dynamic permission allocation.
- Architecture: Repository + Service warehousing mode, Dependency Injection (IOC), and AOP (Aspect-Oriented Programming) for logging and caching.
- Data & ORM: Lightweight ORM usage, asynchronous generic warehousing, and automatic database initialization.
- Cross-Domain: CORS solutions and cross-domain mode comparisons.
- Templates: Creating custom .NET templates.
Supported Databases and ORM
masterBlog.Core integrates SqlSugar as its ORM component, supporting various database engines including:
- MySql
- SqlServer
- Sqlite
- Oracle
- Postgresql
- Dameng (达梦)
- Kingbase (人大金仓)
Core API Controllers for RBAC
masterThe API layer is based on button-level RBAC authorization. The following controllers are essential for the framework's permission logic and should not be deleted:
BaseApiController.cs(API base class)DepartmentController(Departments)ImgController(Images)LoginController(Login)ModuleController(Interfaces/Modules)PermissionController(Menus)RoleController(Roles)TasksQzController(Task Scheduling)UserController(Users)UserRoleController(User-Role relationships)
Core Component Modules
masterBlog.Core integrates several industry-standard components to provide a complete development ecosystem:
- Dependency Injection: Uses Autofac for DI and provides batch service injection.
- Caching & Messaging: Provides Redis for caching and Redis Message Queuing, as well as RabbitMQ and an EventBus.
- API Documentation: Includes Swagger for API file documentation.
- Security: Supports CORS cross-domain requests and encapsulates JWT custom policy authorization.
- Performance & Monitoring: Uses Miniprofiler for interface performance analysis and Log4Net (integrated with
iLogger) for logging. - Real-time & Scheduling: Uses SignalR for duplex communication and Quartz.net for task scheduling.
- Traffic Control: Includes
iprateLimitingfor API rate limiting.