Zhontai Admin Documentation

repository·master·Indexed 23 days ago

https://github.com/zhontai/admin.core

A high-performance, decoupled backend permission management system built on .NET 10.0. It features a modern stack including FreeSql, Autofac, Mapster, and CAP, supporting CodeFirst schema synchronization, distributed transactions (TCC/SAGA), and multi-database support. The system includes a Vue3 Vite frontend (zhontai.ui.admin.vue3) and provides various dotnet templates for scaffolding projects, including Framework, GateWay, and IMServer modules.

Tokens
58K
Snippets
89
Records
291
Agent score
83%

What's inside Zhontai Admin

  1. Overview of Zhontai Admin Features

    master

    Zhontai Admin is a backend permission management system with frontend and backend separation. Key features include:

    • User & Role Management: Advanced querying, department linking, and role-based access control (RBAC).
    • Tenant Management: Automatic initialization of departments/roles for new tenants and plan management.
    • Permission & Interface Management: Tree-structured management of menus, permission points, and API interfaces.
    • Task Scheduling: Execution logs, retries, and email alerts.
    • File Management: Support for local storage or OSS uploads.
    • Print Templates: Drag-and-drop component designer with JSON data source configuration.
    • Logging: Comprehensive login and operation logs with IP tracking.
  2. Overview of zhontai.ui.admin.vue3

    master

    zhontai.ui.admin.vue3 is a front-end and back-end separated administrative permission management system. It is designed to reduce development workload by providing a framework that supports mobile, tablet, and PC devices, and includes built-in support for one-click microservice interface generation.

    Core Technology Stack:

    • Vue 3.x with Composition API (setup syntax sugar)
    • TypeScript
    • Vite
    • Element Plus
    • Vue Router Next
    • Pinia
  3. Overview of Zhontai Admin

    master

    Zhontai Admin is a decoupled (frontend/backend) permission management system built on .NET 10.0. It utilizes a modern technology stack including FreeSql (ORM), Autofac (DI), Mapster (Mapping), and CAP (Distributed Transactions).

    Key features include:

    • CodeFirst Support: Automatically synchronizes database schema and permission data from entity configurations upon startup.
    • Database Capabilities: Supports major domestic and international databases, read/write splitting, sharding, and distributed transactions (TCC/SAGA).
    • Comprehensive Management: Includes modules for User, Role, Department, Permission, Tenant, Dictionary, Task Scheduling, Cache, File Management, and more.
  4. Configure environment for zhontai.ui.admin.vue3

    master

    Before running the project, ensure your environment meets the following requirements:

    Node.js Version:

    • Must be Node 14.18+ or 16+. Vite does not support Node 12, 13, or 15 as they are End-of-Life (EOL).

    Browser Support:

    • Edge: ≥ 88
    • Firefox: ≥ 78
    • Chrome: ≥ 87
    • Safari: ≥ 13

    Note: Because Vue 3 and Element Plus do not support IE11, older versions of Internet Explorer are not supported.

    Online Preview:

  5. Setup and run zhontai.ui.admin.vue3

    master

    Follow these steps to clone, install dependencies, and run the project locally:

    1. Clone the repository
    2. Navigate to the specific UI directory
    3. Install dependencies using pnpm
    4. Run the development server
    5. Build for production (if needed)
    # 克隆项目
    git clone https://github.com/zhontai/Admin.Core.git
    
    # 进入项目
    cd ui\zhontai.ui.admin.vue3
    
    # 安装依赖
    pnpm install
    
    # 运行项目
    pnpm run dev
    
    # 打包发布
    pnpm run build
  6. Install the MyIMServer template

    master

    You can install the MyIMServer template either from a remote NuGet source or from a local .nupkg file.

    To install from NuGet:

    dotnet new install ZhonTai.Template.IMServer

    To install from a local file:

    dotnet new install F:\zhontai\Admin.Core\templates\ZhonTai.Template.IMServer.1.0.0.nupkg
  7. Install ZhonTai project templates

    master

    You can install the ZhonTai templates either from the NuGet gallery or from a local .nupkg file.

    To install from the NuGet gallery:

    dotnet new install ZhonTai.Template

    To install from a local package file:

    dotnet new install F:\zhontai\Admin.Core\templates\ZhonTai.Template.8.6.0.nupkg
    dotnet new install ZhonTai.Template
  8. Install the MyFramework template

    master

    You can install the MyFramework template either from NuGet.org or from a local .nupkg file using the dotnet new install command.

    To install from the official NuGet gallery:

    dotnet new install ZhonTai.Template.Framework

    To install from a local package file:

    dotnet new install E:\zhontai\templates\ZhonTai.Template.Framework.9.0.0.nupkg
  9. Create a New Project using Templates

    master

    You can scaffold a new project using the provided templates. This requires .NET version 10.0 or higher.

    1. Install the template:

      dotnet new install ZhonTai.Template.App
    2. Create the project: Use the dotnet new MyApp command with the following flags:

      • -n: Project name
      • -at: Application type
      • -ac: Account type
      • -p: Permission group ID
      • -gp: Permission group ID
      • -db: Database provider (e.g., MySql)

      Example:

      dotnet new MyApp -n MyCompanyName.MySys -at sys -ac sys -p 16010 -gp 16011 -db MySql
    3. Run the project: Set the generated {ProjectName}.Host as the startup project and run it via your IDE or use dotnet run within the host directory.

    # Installation template
    dotnet new install ZhonTai.Template.App
    
    # New the project
    dotnet new MyApp -n MyCompanyName.MySys -at sys -ac sys -p 16010 -gp 16011 -db MySql