Skip to main content
net10.0

TenonAdmin 数据层:SqlSugar 单实例 + CodeFirst 建表 + 幂等种子 + 审计/软删/数据范围全局过滤器 + 开放泛型仓储。

Published
Jul 21, 2026
2mo ago
Total Downloads
2.6K
2,570

Install

dotnet add package TenonAdmin.SqlSugar --version 0.2.1
ProductVersions
.NET
net10.0

README

English | 简体中文 | 日本語

🔗 Live Demo  ·  📖 Docs  ·  📋 Changelog


TenonAdmin is not a copy-and-customize admin template — it packages users, roles, menus, data permissions, logging and more into NuGet packages you plug into an existing project with three lines of code. Works out of the box, replaceable on demand.

Install the NuGet package:

dotnet add package TenonAdmin

Or run the sample project included in the repo:

dotnet run --project backend/samples/MinimalHost

On first startup it creates the database, seeds initial data, and prints a randomly generated super-admin password to the console.

Integrating into an existing project takes three lines:

builder.Services.AddTenonAdmin(builder.Configuration);
var app = builder.Build();
app.MapTenonAdmin();

This registers JWT auth, RBAC, data permissions, and all management endpoints automatically.

Backend

  • Auth — Account/password + captcha, JWT + refresh-token rotation, login lockout, online sessions & force-logout
  • RBAC — Roles, three-level menus (directory / page / button), button-level permission codes, role-menu authorization
  • Data permissions — All / this org / org & children / self only / custom orgs, auto-applied via ORM global filters
  • Multi-app portal — App management, independent menu trees, app selection & switching
  • Organization — Org tree, positions, multi-role users with a primary org
  • Notifications — In-app notices & announcements, targetable to everyone / roles / users
  • Dictionary & config — Dict types + items + key-value config, cached with event-driven invalidation
  • Logging — Auto-recorded operation logs with sensitive-input masking
  • File management — Upload/download, size limits, extension whitelist, path-traversal protection
  • Replaceable — Services registered via TryAdd + interfaces + virtual steps — swap without forking
  • Multi-database — SQLite (default) / MySQL / SQL Server / PostgreSQL
  • Multi-replica — Optional Redis cache, cross-replica rate-limit counters, per-replica snowflake worker IDs

Frontend

  • Contract-generated API — OpenAPI → schema.d.ts, end-to-end type safety
  • Dynamic routing — Backend menu tree drives route registration; multi-app portal with seamless switching
  • Button-level permissions — v-auth directive gates buttons by route-based permission codes
  • ProTable (column-driven) — One columns array drives search form, dict rendering, and column settings
  • Design-token system — Four-layer CSS variable tokens, light/dark themes in parity (follows system / manual toggle)
  • i18n — vue-i18n with runtime language switching
  • Three login-page skins — Switchable out of the box, style-isolated
  • In-house component library — FormContainer (modal/drawer two-in-one), StatusSwitch (pessimistic-update toggle), dict suite, OrgTreeSelect, FileUpload (chunked / resumable / instant), PasswordStrength, ECharts wrappers, and more

Project Status

The API may still change before 1.0 — breaking changes are called out in the changelog. Development happens on the dev branch.

License

Apache License 2.0

Changes from Previous Version

No structural changes between v0.2.0 and v0.2.1.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.