Back to skills
extension
Category: Development & EngineeringNo API key required

service-best-practice

To assist developers in writing Services according to the project guidelines, following the best practices of the tRPC + Service + DAO architecture. It provides guidance on Service structure, dependency injection, error handling, code examples, templates, boilerplate code generation, and best practice validation. Use this when creating or refactoring Service files in your codebase.

personAuthor: jakexiaohubgithub

Service 最佳实践

使用说明

  1. 阅读 Service 最佳实践指南 了解完整规范与代码示例
  2. 完成后使用 检查清单 逐项验证

重要: Service 不得直接导入 db,必须通过 DAO 依赖注入;完成后强制对照检查清单