backend

Solid

Backend development patterns for services, error handling, logging, caching. Use when building backend services, APIs, or microservices.

AI & Automation 39 stars 2 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
53
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 后端开发模式 本技能提供后端服务开发的最佳实践和模式,支持多语言按需加载。 ## 触发条件 - 构建后端服务 - 设计服务架构 - 实现业务逻辑层 - 配置中间件 - 处理错误和日志 - 性能优化(数据库、缓存、并发) ## 语言专属模式 根据项目技术栈,加载对应的语言专属文件: | 技术栈 | 加载文件 | 框架 | | ------------------ | --------------- | ------------------------ | | Python | `python.md` | FastAPI, Django, Flask | | TypeScript/Node.js | `typescript.md` | Express, NestJS, Fastify | | Java | `java.md` | Spring Boot, Quarkus | | Go | `go.md` | Gin, Echo, Fiber | | C# | `csharp.md` | ASP.NET Core | | Rust | `rust.md` | Axum, Actix-web, Rocket | **加载方式**: 检测项目中的 `pyproject.toml`/`package.json`/`pom.xml`/`go.mod`/`Cargo.toml` 等文件确定技术栈。 --- ## 通用架构模式 ### 分层架构 ``` ┌─────────────────────────────────────┐ │ Controller 层 │ 处理 HTTP 请求/响应 ├─────────────────────────────────────┤ │ Service 层 │ 业务逻辑 ├─────────────────────────────────────┤ │ Repository 层 │ 数据访问 ├─────────────────────────────────────┤ │ Model 层 │ 数据模型 └─────────────────────────────────────┘ ``` ### 通用目录结构 ``` src/ ├── controllers/ # 控制器(或 routes/handlers) ├── services/ # 业务逻辑 ├── repositories/ # 数据访问(或 dal/) ├── models/ # 数据模型(或 entities/) ├── middlewares/ # 中间件 ├── utils/ # 工具函数 ├── config/ # 配置 └── typ...

Details

Author
xiaobei930
Repository
xiaobei930/cc-best
Created
4 months ago
Last Updated
1 months ago
Language
JavaScript
License
MIT

Integrates with

Related Skills