Skip to content

Tenon-Net/TenonAdmin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

402 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文 | 日本語

TenonAdmin — Three lines of code to plug a complete RBAC kernel into any ASP.NET Core project, with five-layer NuGet package architecture

License Stars Forks NuGet .NET 10 Build

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

02 Quick Start — Install the NuGet package, three lines of code, and it just works

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.

01 Features — Backend permission kernel + frontend management UI

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 permissionsv-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

About

A zero-config, extensible ASP.NET Core admin system with RBAC, data permissions, and NuGet-first delivery.

Topics

Resources

License

Security policy

Stars

18 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors