Blog.Core Framework

repository·master·Indexed 26 days ago

https://github.com/anjoy8/blog.core

An 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.

Tokens
2.4K
Snippets
0
Records
18
Agent score
90%

What's inside Blog.Core

  1. Overview of Blog.Core

    master
    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.
  2. Overview of Blog.Core Framework

    master

    Blog.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).
  3. Review the system environment and technology stack

    master

    The 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
  4. Initialize a new Blog.Core project

    master

    To get started with a new project, you can use the Blog.Core.Webapi.Template NuGet package or the provided automation scripts.

    Quick Start via Download:

    1. Download the project.
    2. Compile the solution.
    3. Run the application.

    By default, the project will automatically generate seed data and use Sqlite as the database. API documentation is available via Swagger.

  5. Review the Vue Front-end learning catalogue

    master

    The 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.
  6. Review the .NET Core Back-end learning catalogue

    master

    The 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.
  7. Core API Controllers for RBAC

    master

    The 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)
  8. Core Component Modules

    master

    Blog.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 iprateLimiting for API rate limiting.