XiHan.BasicApp 后端开发

SkillDev tools

Guides your agent through building, reviewing, and testing backend modules in the XiHan.BasicApp framework.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the XiHan.BasicApp 后端开发 skill

About this capability

Use when implementing, refactoring, reviewing, or testing XiHan.BasicApp backend modules. Covers Dynamic API, DDD/CQRS, SqlSugar, entities, repositories, permissions, tenancy, transactions, seeding, and background resources; use the full-stack contract skill for protocol changes spanning frontend an

What this skill tells your AI

The instructions your AI receives, as published by xihanfun/xihan.basicapp in .agents/skills/backend-development/SKILL.md and read by ahel’s review.

开始前读 references/backend.md,并检查所属模块 README、相邻实体、服务、仓储、权限、种子和测试。

架构边界

  • Saas 承载租户、身份、RBAC/ABAC 与平台基础能力;AI、Chat、CodeGeneration、Printing、Workflow 是显式依赖的可选模块。
  • 普通业务 API 使用 [DynamicApi] Application Service/Query Service,不建立 Controller 或 Minimal API 平行入口。
  • 业务规则在 Domain,命令与查询编排在 Application,SqlSugar 实现在 Infrastructure。
  • 写操作沿用 [UnitOfWork(true)];受保护操作使用模块权限常量和 [PermissionAuthorize(...)]。
  • 全局记录使用 TenantId = 0;软删除实体的唯一索引包含 IsDeleted 和隔离所需 TenantId。
  • 异步方法接受并传递 CancellationToken,不吞异常、不返回伪成功。
  • Framework 默认内存实现保持零外部依赖;BasicApp 在应用层注册分布式 Provider。

契约与验证

改变 DTO、服务名、方法、权限或菜单路径时,同时加载 ../fullstack-contracts/SKILL.md。先跑所属模块测试,再运行:

dotnet build backend/XiHan.BasicApp.slnx -c Release --no-restore
dotnet test --solution backend/XiHan.BasicApp.slnx -c Release --no-build

实体、应用服务、仓储、种子、测试和必要升级脚本应形成同一功能闭环。

Signals

GitHub stars
225
Forks
58
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
xihan-basicapp-backend-development
Source
github.com/xihanfun/xihan.basicapp