1 Star 0 Fork 0

AICodeDesign/system-design

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.cursorrules 56.71 KB
一键复制 编辑 原始数据 按行查看 历史
袁恩志 提交于 2024-12-20 01:41 . a
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003
version: "1.0.0"
rules:
backend:
jvm:
common: # JVM框架通用配置
patterns:
- "src/main/{language}/**/*"
- "src/test/{language}/**/*"
structure:
main:
- "src/main/"
- "{language}/"
- "controller/" # HTTP控制器
- "api/" # API接口控制器
- "web/" # Web页面控制器
- "service/" # 业务服务
- "impl/" # 服务实现
- "repository/" # 数据访问
- "jpa/" # JPA实现
- "r2dbc/" # R2DBC实现
- "domain/" # 领域模型
- "entity/" # 实体类
- "dto/" # 数据传输对象
- "vo/" # 视图对象
- "config/" # 配置类
- "db/" # 数据库配置
- "security/" # 安全配置
- "cache/" # 缓存配置
- "client/" # 外部服务客户端
- "feign/" # Feign客户端
- "http/" # HTTP客户端
- "factory/" # 工厂类
- "util/" # 工具类
- "constant/" # 常量类
- "exception/" # 异常类
- "resources/"
- "application.yml" # 主配置文件
- "application-{env}.yml" # 环境配置
- "bootstrap.yml" # 引导配置
- "logback.xml" # 日志配置
- "i18n/" # 国际化资源
- "db/migration/" # 数据库迁移脚本
test:
- "src/test/"
- "{language}/"
- "controller/" # 控制器测试
- "service/" # 服务测试
- "repository/" # 数据访问测试
- "resources/"
- "application-test.yml" # 测试配置
- "data/" # 测试数据
naming:
conventions:
controller:
pattern: "^[A-Z][a-zA-Z0-9]+Controller$"
examples:
- "UserController"
- "OrderController"
service:
pattern: "^[A-Z][a-zA-Z0-9]+Service$"
examples:
- "UserService"
- "OrderService"
repository:
pattern: "^[A-Z][a-zA-Z0-9]+Repository$"
examples:
- "UserRepository"
- "OrderRepository"
entity:
pattern: "^[A-Z][a-zA-Z0-9]+$"
examples:
- "User"
- "Order"
dto:
pattern: "^[A-Z][a-zA-Z0-9]+DTO$"
examples:
- "UserDTO"
- "OrderDTO"
dependencies:
core: # 核心依赖
spring-boot:
- "spring-boot-starter-web"
- "spring-boot-starter-validation"
- "spring-boot-starter-actuator"
quarkus:
- "quarkus-resteasy-reactive"
- "quarkus-hibernate-validator"
- "quarkus-smallrye-health"
micronaut:
- "micronaut-runtime"
- "micronaut-http-server-netty"
- "micronaut-validation"
data: # 数据访问
spring-boot:
- "spring-boot-starter-data-jpa"
- "spring-boot-starter-data-r2dbc"
quarkus:
- "quarkus-hibernate-orm"
- "quarkus-hibernate-reactive"
micronaut:
- "micronaut-data-jdbc"
- "micronaut-data-r2dbc"
security: # 安全框架
spring-boot:
- "spring-boot-starter-security"
- "spring-boot-starter-oauth2-resource-server"
quarkus:
- "quarkus-security"
- "quarkus-oidc"
micronaut:
- "micronaut-security"
- "micronaut-security-jwt"
cache: # 缓存支持
spring-boot:
- "spring-boot-starter-cache"
- "spring-boot-starter-data-redis"
quarkus:
- "quarkus-cache"
- "quarkus-redis-client"
micronaut:
- "micronaut-cache-caffeine"
- "micronaut-redis"
messaging: # 消息队列
spring-boot:
- "spring-boot-starter-amqp"
- "spring-boot-starter-kafka"
quarkus:
- "quarkus-smallrye-reactive-messaging"
- "quarkus-kafka-client"
micronaut:
- "micronaut-kafka"
- "micronaut-rabbitmq"
monitoring: # 监控工具
spring-boot:
- "spring-boot-starter-actuator"
- "micrometer-registry-prometheus"
quarkus:
- "quarkus-smallrye-health"
- "quarkus-micrometer-registry-prometheus"
micronaut:
- "micronaut-micrometer-core"
- "micronaut-management"
configuration:
patterns:
- "src/main/resources/application.yml"
- "src/main/resources/application-*.yml"
structure:
application:
server:
port: number
security:
enabled: boolean
datasource:
url: string
username: string
password: string
cache:
type: string
messaging:
bootstrap-servers: string
testing:
patterns:
- "src/test/{language}/**/*Test.{java,kt,groovy}"
- "src/test/{language}/**/*Spec.{java,kt,groovy}"
conventions:
- "单元测试覆盖"
- "集成测试支持"
- "测试容器使用"
- "Mock测试"
deployment:
docker:
patterns:
- "Dockerfile"
- "docker-compose.yml"
conventions:
- "多阶段构建"
- "基础镜像选择"
- "资源限制配置"
kubernetes:
patterns:
- "k8s/*.yml"
conventions:
- "部署配置"
- "服务配置"
- "资源配置"
documentation:
patterns:
- "src/main/docs/**/*.md"
- "README.md"
- "API.md"
conventions:
- "API文档"
- "配置说明"
- "部署文档"
ktor:
patterns:
- "src/main/{language}/**/*.{kt}"
- "src/test/{language}/**/*.{kt}"
structure:
main:
- "src/main/"
- "{language}/"
- "routes/" # 路由定义
- "api/" # API路由
- "web/" # Web路由
- "plugins/" # Ktor插件
- "Security.kt"
- "Serialization.kt"
- "Database.kt"
- "Monitoring.kt"
- "services/" # 业务服务
- "impl/"
- "models/" # 数据模型
- "entities/"
- "dtos/"
- "repositories/" # 数据访问
- "impl/"
- "config/" # 配置类
- "utils/" # 工具类
- "resources/"
- "application.conf" # HOCON配置
- "logback.xml"
- "db/"
- "migrations/"
test:
- "src/test/"
- "{language}/"
- "routes/"
- "services/"
- "resources/"
- "application-test.conf"
dependencies:
core:
- "ktor-server-core"
- "ktor-server-netty"
- "ktor-server-content-negotiation"
data:
- "exposed-core"
- "exposed-dao"
- "exposed-jdbc"
security:
- "ktor-server-auth"
- "ktor-server-auth-jwt"
monitoring:
- "ktor-server-metrics-micrometer"
- "ktor-server-call-logging"
grails:
patterns:
- "grails-app/**/*.{groovy,java,kt}"
- "src/test/**/*.{groovy,java,kt}"
structure:
main:
- "grails-app/"
- "controllers/" # 控制器
- "api/"
- "web/"
- "services/" # 服务层
- "domain/" # 领域类
- "views/" # GSP视图
- "i18n/" # 国际化
- "conf/" # 配置
- "taglib/" # 标签库
- "utils/" # 工具类
- "src/"
- "main/groovy/" # 额外源码
- "integration-test/groovy/" # 集成测试
- "test/groovy/" # 单元测试
- "conf/"
- "application.yml"
- "application.groovy"
- "logback.groovy"
dependencies:
core:
- "grails-web"
- "grails-gorm"
data:
- "grails-datastore-gorm"
- "grails-datastore-gorm-hibernate5"
security:
- "spring-security-core"
- "spring-security-rest"
monitoring:
- "grails-actuator"
- "grails-metrics"
play:
patterns:
- "app/**/*.{java,scala}"
- "test/**/*.{java,scala}"
structure:
main:
- "app/"
- "controllers/" # 控制器
- "api/"
- "web/"
- "services/" # 服务层
- "models/" # 数据模型
- "views/" # 模板视图
- "filters/" # 过滤器
- "tasks/" # 后台任务
- "utils/" # 工具类
- "conf/"
- "application.conf"
- "routes" # 路由配置
- "evolutions/" # 数据库变更
- "logback.xml"
- "test/"
- "controllers/"
- "services/"
- "models/"
dependencies:
core:
- "play"
- "play-guice"
- "play-akka-http-server"
data:
- "play-jdbc"
- "play-slick"
- "play-ebean"
security:
- "play-auth"
- "play-pac4j"
monitoring:
- "play-metrics"
- "play-actuator"
nodejs:
nextjs:
patterns:
- "src/**/*.{js,ts,tsx}"
- "src/app/api/**/*.{js,ts}"
express:
patterns:
- "src/**/*.{js,ts}"
- "src/routes/**/*.{js,ts}"
koa:
patterns:
- "src/**/*.{js,ts}"
- "src/routes/**/*.{js,ts}"
nest:
patterns:
- "src/**/*.ts"
- "src/controllers/**/*.ts"
hapi:
patterns:
- "src/**/*.{js,ts}"
- "src/routes/**/*.{js,ts}"
adonis:
patterns:
- "app/**/*.{js,ts}"
- "app/Controllers/**/*.{js,ts}"
python:
django:
patterns:
- "app/**/*.py"
- "app/models/**/*.py"
fastapi:
patterns:
- "app/**/*.py"
- "app/routers/**/*.py"
flask:
patterns:
- "app/**/*.py"
- "app/routes/**/*.py"
tornado:
patterns:
- "app/**/*.py"
- "app/handlers/**/*.py"
golang:
gin:
patterns:
- "internal/**/*.go"
- "internal/handlers/**/*.go"
echo:
patterns:
- "internal/**/*.go"
- "internal/handlers/**/*.go"
beego:
naming:
conventions:
controller:
pattern: "^[A-Z][a-zA-Z0-9]+Controller$"
examples:
- "UserController"
- "OrderController"
service:
pattern: "^[A-Z][a-zA-Z0-9]+Service$"
examples:
- "UserService"
- "OrderService"
repository:
pattern: "^[A-Z][a-zA-Z0-9]+Repository$"
examples:
- "UserRepository"
- "OrderRepository"
model:
pattern: "^[A-Z][a-zA-Z0-9]+$"
examples:
- "User"
- "Order"
dto:
pattern: "^[A-Z][a-zA-Z0-9]+DTO$"
examples:
- "UserDTO"
- "OrderDTO"
dependencies:
core: # 核心依赖
- "github.com/beego/beego/v2"
- "github.com/beego/bee"
data: # 数据访问
- "github.com/beego/beego/v2/client/orm"
- "github.com/go-sql-driver/mysql"
- "github.com/lib/pq"
security: # 安全框架
- "github.com/beego/beego/v2/server/web/filter/auth"
- "github.com/golang-jwt/jwt"
cache: # 缓存支持
- "github.com/beego/beego/v2/client/cache"
- "github.com/go-redis/redis/v8"
monitoring: # 监控工具
- "github.com/beego/beego/v2/core/logs"
- "github.com/prometheus/client_golang"
configuration:
patterns:
- "src/main/resources/config/*.{yaml,conf}"
- "src/main/resources/config/*/*.{yaml,conf}"
structure:
application:
appname: string
httpport: number
runmode: string
security:
enablexsrf: boolean
xsrfkey: string
jwt:
secret: string
expires: number
database:
driver: string
source: string
cache:
driver: string
config: string
log:
level: string
filename: string
testing:
patterns:
- "src/test/go/**/*_test.go"
dependencies:
- "github.com/beego/beego/v2/core/logs"
- "github.com/smartystreets/goconvey"
conventions:
- "单元测试覆盖"
- "集成测试支持"
- "测试容器使用"
- "Mock测试"
structure:
main:
- "src/test/"
- "go/"
- "controllers/" # 控制器测试
- "api/" # API测试
- "services/" # 服务测试
- "models/" # 模型测试
- "integration/" # 集成测试
- "resources/"
- "config/" # 测试配置
- "data/" # 测试数据
- "mocks/" # Mock数据
deployment:
docker:
patterns:
- "Dockerfile"
- "docker-compose.yml"
conventions:
- "多阶段构建"
- "基础镜像选择"
- "资源限制配置"
structure:
dockerfile:
- "构建阶段"
- "测试阶段"
- "运行阶段"
compose:
- "应用服务"
- "数据库服务"
- "缓存服务"
- "监控服务"
kubernetes:
patterns:
- "k8s/*.yml"
conventions:
- "���署配置"
- "服务配置"
- "资源配置"
monitoring:
metrics:
patterns:
- "src/main/go/**/metrics/**"
conventions:
- "应用指标"
- "请求计数"
- "响应时间"
- "错误率"
- "业务指标"
- "系统指标"
logging:
patterns:
- "src/main/go/**/logging/**"
conventions:
- "结构化日志"
- "日志级别"
- "链路追踪"
format:
pattern: |
{
"timestamp": "",
"level": "",
"trace_id": "",
"service": "",
"message": "",
"context": {}
}
tracing:
patterns:
- "src/main/go/**/tracing/**"
conventions:
- "分布式追踪"
- "链路上下文"
- "采样策略"
documentation:
patterns:
- "docs/**/*.md"
- "README.md"
- "API.md"
structure:
docs:
- "architecture/" # 架构文档
- "overview.md"
- "components.md"
- "api/" # API文档
- "overview.md"
- "endpoints.md"
- "development/" # 开发文档
- "setup.md"
- "guidelines.md"
- "deployment/" # 部署文档
- "docker.md"
- "kubernetes.md"
- "monitoring/" # 监控文档
- "metrics.md"
- "logging.md"
conventions:
- "文档及时更新"
- "版本号同步"
- "示例代码"
- "故障排除"
rust:
actix:
patterns:
- "src/**/*.rs"
- "src/handlers/**/*.rs"
rocket:
patterns:
- "src/**/*.rs"
- "src/routes/**/*.rs"
api:
rest:
conventions:
- "使用复数名词作为资源标识"
- "使用HTTP动词表示操作"
- "版本号放在URL中"
- "使用kebab-case命名URL"
patterns:
- "**/api/v[0-9]+/**"
graphql:
conventions:
- "使用PascalCase命名类型"
- "使用camelCase命名字段"
- "分页使用cursor"
patterns:
- "**/graphql/**/*.graphqls"
- "**/graphql/**/*.gql"
grpc:
conventions:
- "使用PascalCase命名服务"
- "使用PascalCase命名消息"
- "使用snake_case命名字段"
patterns:
- "**/proto/**/*.proto"
microservices:
naming:
service:
pattern: "^[a-z][a-z0-9-]*-service$"
maxLength: 64
gateway:
pattern: "^[a-z][a-z0-9-]*-gateway$"
maxLength: 64
conventions:
- "服务间通信使用异步消息"
- "每个服务独立数据库"
- "服务间数据最终一致性"
patterns:
- "**/services/**"
- "**/gateway/**"
messaging:
kafka:
naming:
topic:
pattern: "^[a-z][a-z0-9.-]*$"
maxLength: 255
consumer:
pattern: "^[a-z][a-z0-9-]*-consumer$"
producer:
pattern: "^[a-z][a-z0-9-]*-producer$"
rabbitmq:
naming:
exchange:
pattern: "^[a-z][a-z0-9.-]*$"
queue:
pattern: "^[a-z][a-z0-9.-]*$"
routing:
pattern: "^[a-z][a-z0-9.-]*$"
micronaut:
standard:
patterns:
- "src/main/{language}/**/*.{java,kt,groovy}"
- "src/test/{language}/**/*.{java,kt,groovy}"
structure:
main:
- "src/main/"
- "{language}/"
- "controller/" # HTTP控制器
- "api/" # API接口控制器
- "web/" # Web页面控制器
- "service/" # 业务服务
- "impl/" # 服务实现
- "repository/" # 数据访问
- "jpa/" # JPA实现
- "r2dbc/" # R2DBC实现
- "domain/" # 领域模型
- "entity/" # 实体类
- "dto/" # 数据传输对象
- "vo/" # 视图对象
- "config/" # 配置类
- "db/" # 数据库配置
- "security/" # 安全配置
- "cache/" # 缓存配置
- "client/" # 外部服务客户端
- "feign/" # Feign客户端
- "http/" # HTTP客户端
- "factory/" # 工厂类
- "util/" # 工具类
- "constant/" # 常量类
- "exception/" # 异常类
- "resources/"
- "application.yml" # 主配置文件
- "application-{env}.yml" # 环境配置
- "bootstrap.yml" # 引导配置
- "logback.xml" # 日志配置
- "i18n/" # 国际化资源
- "db/migration/" # 数据库迁移脚本
test:
- "src/test/"
- "{language}/"
- "controller/" # 控制器测试
- "service/" # 服务测试
- "repository/" # 数据访问测试
- "resources/"
- "application-test.yml" # 测试配置
- "data/" # 测试数据
reactive: # 响应式结构
patterns:
- "src/main/{language}/**/*.{java,kt,groovy}"
structure:
main:
- "src/main/{language}/"
- "handler/" # 请求处理器
- "router/" # 路由定���
- "service/" # 响应式服务
- "repository/" # 响应式存储
- "client/" # 响应式客户端
naming:
conventions:
controller:
pattern: "^[A-Z][a-zA-Z0-9]+Controller$"
examples:
- "UserController"
- "OrderController"
service:
pattern: "^[A-Z][a-zA-Z0-9]+Service$"
examples:
- "UserService"
- "OrderService"
repository:
pattern: "^[A-Z][a-zA-Z0-9]+Repository$"
examples:
- "UserRepository"
- "OrderRepository"
entity:
pattern: "^[A-Z][a-zA-Z0-9]+$"
examples:
- "User"
- "Order"
dto:
pattern: "^[A-Z][a-zA-Z0-9]+DTO$"
examples:
- "UserDTO"
- "OrderDTO"
dependencies:
core:
- "micronaut-runtime"
- "micronaut-http-server-netty"
- "micronaut-validation"
data:
- "micronaut-data-jdbc"
- "micronaut-data-r2dbc"
- "micronaut-jpa"
security:
- "micronaut-security"
- "micronaut-security-jwt"
cache:
- "micronaut-cache-caffeine"
- "micronaut-redis"
messaging:
- "micronaut-kafka"
- "micronaut-rabbitmq"
monitoring:
- "micronaut-micrometer-core"
- "micronaut-management"
configuration:
patterns:
- "src/main/resources/application.yml"
- "src/main/resources/application-*.yml"
structure:
application:
micronaut:
application:
name: string
server:
port: number
security:
enabled: boolean
token:
jwt:
enabled: boolean
netty:
worker:
threads: number
router:
static-resources:
enabled: boolean
metrics:
enabled: boolean
datasources:
default:
url: string
username: string
password: string
redis:
uri: string
kafka:
bootstrap:
servers: string
aot: # 提前编译配置
enabled: true
conventions:
- "使用GraalVM Native Image"
- "配置反射规则"
- "资源包含规则"
testing:
patterns:
- "src/test/{language}/**/*Test.{java,kt,groovy}"
- "src/test/{language}/**/*Spec.{java,kt,groovy}"
conventions:
- "使用@MicronautTest"
- "使用TestResources"
- "模拟外部服务"
- "数据库测试"
deployment:
docker:
patterns:
- "Dockerfile"
- "docker-compose.yml"
conventions:
- "多阶段构建"
- "基础镜像选择"
- "资源限制配置"
kubernetes:
patterns:
- "k8s/*.yml"
conventions:
- "部署配置"
- "服务配置"
- "资源配置"
monitoring:
metrics:
- "JVM指标"
- "HTTP指标"
- "数据库指标"
health:
- "应用健康检查"
- "依赖服务检查"
tracing:
- "请求追踪"
- "SQL追踪"
documentation:
patterns:
- "src/main/docs/**/*.md"
- "README.md"
- "API.md"
conventions:
- "API文档"
- "配置说明"
- "部署文档"
frontend:
web:
vue-app:
patterns:
- "src/components/**/*.vue"
- "src/pages/**/*.vue"
- "src/store/**/*.{js,ts}"
react-app:
patterns:
- "src/components/**/*.{jsx,tsx}"
- "src/pages/**/*.{jsx,tsx}"
- "src/store/**/*.{js,ts}"
angular:
patterns:
- "src/app/components/**/*.ts"
- "src/app/pages/**/*.ts"
- "src/app/services/**/*.ts"
svelte:
patterns:
- "src/components/**/*.svelte"
- "src/routes/**/*.svelte"
- "src/stores/**/*.{js,ts}"
nuxt:
patterns:
- "pages/**/*.vue"
- "components/**/*.vue"
- "layouts/**/*.vue"
- "middleware/**/*.{js,ts}"
- "plugins/**/*.{js,ts}"
- "composables/**/*.{js,ts}"
- "utils/**/*.{js,ts}"
- "server/**/*.{js,ts}"
- "assets/**/*.{css,scss,less}"
conventions:
- "页面使用index命名默认页"
- "组件使用PascalCase"
- "布局使用default作为默认"
- "API路由放在server/api目录"
- "使用auto-imports优化导入"
naming:
pages:
pattern: "^[a-z][a-z0-9-]*$"
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
composables:
pattern: "^use[A-Z][a-zA-Z0-9]+$"
next:
patterns:
- "app/**/*.{jsx,tsx}"
- "app/**/*.{js,ts}"
- "components/**/*.{jsx,tsx}"
- "lib/**/*.{js,ts}"
- "styles/**/*.{css,scss}"
- "public/**/*"
- "middleware.{js,ts}"
conventions:
- "使用App Router"
- "组件使用PascalCase"
- "API路由放在app/api目录"
- "使用Server Components"
- "遵循React Server Components约定"
naming:
pages:
pattern: "^(page|layout|loading|error|not-found)\\.(jsx|tsx)$"
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
hooks:
pattern: "^use[A-Z][a-zA-Z0-9]+$"
structure:
app:
- "layout.tsx"
- "page.tsx"
- "loading.tsx"
- "error.tsx"
- "not-found.tsx"
- "template.tsx"
- "default.tsx"
api:
- "route.ts"
analog:
patterns:
- "src/app/**/*.{ts,html}"
- "src/content/**/*.md"
- "src/routes/**/*.ts"
- "src/styles/**/*.{css,scss}"
- "src/lib/**/*.ts"
conventions:
- "使用独立组件"
- "使用Signal状态管理"
- "使用内容集合"
- "遵循Angular风格指南"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+Component$"
services:
pattern: "^[A-Z][a-zA-Z0-9]+Service$"
pipes:
pattern: "^[A-Z][a-zA-Z0-9]+Pipe$"
directives:
pattern: "^[A-Z][a-zA-Z0-9]+Directive$"
structure:
content:
- "blog"
- "docs"
- "pages"
routes:
- "+content"
- "+state"
- "+layout"
common:
seo:
patterns:
- "**/*head*.{jsx,tsx,vue}"
- "**/*meta*.{jsx,tsx,vue}"
conventions:
- "使用动态元数据"
- "优化Open Graph标签"
- "实现结构化数据"
performance:
conventions:
- "使用图片优化"
- "实现延迟加载"
- "优化字体加载"
- "使用流式渲染"
accessibility:
conventions:
- "使用ARIA属性"
- "确保键盘可访问"
- "提供替代文本"
- "使用语义化HTML"
internationalization:
patterns:
- "**/locales/**/*.{json,yaml}"
- "**/i18n/**/*.{js,ts}"
conventions:
- "使用命名空间"
- "支持复数形式"
- "处理日期格式"
- "处理数字格式"
state:
patterns:
- "**/store/**/*.{js,ts}"
- "**/states/**/*.{js,ts}"
conventions:
- "使用不可变状态"
- "实现状态持久化"
- "处理异步状态"
- "实现状态重置"
api:
patterns:
- "**/api/**/*.{js,ts}"
- "**/services/**/*.{js,ts}"
conventions:
- "使用类型安全的API调用"
- "实现请求缓存"
- "处理错误边界"
- "实现请求重试"
testing:
patterns:
- "**/*.test.{js,ts}"
- "**/*.spec.{js,ts}"
- "**/tests/**/*.{js,ts}"
- "**/cypress/**/*.{js,ts}"
- "**/playwright/**/*.{js,ts}"
conventions:
- "使用组件测试"
- "实现E2E测试"
- "测试错误场景"
- "测试性能指标"
styling:
patterns:
- "**/*.module.{css,scss}"
- "**/styles/**/*.{css,scss}"
- "**/*.styled.{js,ts}"
conventions:
- "使用CSS Modules"
- "实现响应式设计"
- "使用CSS变量"
- "实现主题切换"
desktop:
electron:
base: # 基础结构
patterns:
- "src-electron/**/*.rs"
- "src-electron/electron.conf.json"
structure:
src-electron:
- "src/"
- "main.rs"
- "app.rs"
- "menu.rs"
- "cmd.rs"
- "error.rs"
- "services/"
- "mod.rs"
- "storage.rs"
- "window.rs"
- "utils/"
- "mod.rs"
- "config.rs"
- "Cargo.toml"
- "electron.conf.json"
- "build.rs"
naming:
files:
pattern: "^[a-z][a-z0-9_]*\\.rs$"
modules:
pattern: "^[a-z][a-z0-9_]*$"
structs:
pattern: "^[A-Z][a-zA-Z0-9]+$"
conventions:
core:
- "使用命令模式通信"
- "状态管理集中化"
- "错误处理统一化"
- "窗口管理模块化"
security:
- "启用CSP"
- "限制文件系统访问"
- "配置允许的API"
vue: # Vue项目结构
patterns:
- "src/**/*.vue"
- "src/**/*.{js,ts}"
structure:
src:
- "components/"
- "common/"
- "layout/"
- "widgets/"
- "views/"
- "main/"
- "settings/"
- "router/"
- "index.ts"
- "routes/"
- "store/"
- "modules/"
- "index.ts"
- "composables/"
- "useTauri.ts"
- "assets/"
- "images/"
- "styles/"
- "utils/"
- "types/"
- "App.vue"
- "main.ts"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
pages:
pattern: "^[A-Z][a-zA-Z0-9]+View$"
stores:
pattern: "^use[A-Z][a-zA-Z0-9]+Store$"
conventions:
- "使用组合式API"
- "使用TypeScript"
- "使用Pinia状态管理"
- "集成Tauri API"
react: # React项目结构
patterns:
- "src/**/*.{jsx,tsx}"
- "src/**/*.{js,ts}"
structure:
src:
- "components/"
- "common/"
- "layout/"
- "widgets/"
- "pages/"
- "main/"
- "settings/"
- "routes/"
- "index.tsx"
- "AppRoutes.tsx"
- "store/"
- "slices/"
- "hooks/"
- "hooks/"
- "useTauri.ts"
- "assets/"
- "images/"
- "styles/"
- "utils/"
- "types/"
- "App.tsx"
- "main.tsx"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
pages:
pattern: "^[A-Z][a-zA-Z0-9]+Page$"
hooks:
pattern: "^use[A-Z][a-zA-Z0-9]+$"
conventions:
- "使用函数组件"
- "使用TypeScript"
- "使用Redux Toolkit"
- "集成Tauri API"
svelte: # Svelte项目结构
patterns:
- "src/**/*.svelte"
- "src/**/*.{js,ts}"
structure:
src:
- "components/"
- "common/"
- "layout/"
- "widgets/"
- "routes/"
- "+page.svelte"
- "+layout.svelte"
- "stores/"
- "lib/"
- "tauri/"
- "assets/"
- "images/"
- "styles/"
- "utils/"
- "types/"
- "app.html"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
stores:
pattern: "^[a-z][a-zA-Z0-9]+Store$"
conventions:
- "使用TypeScript"
- "使用SvelteKit"
- "集成Tauri API"
angular: # Angular项目结构
patterns:
- "src/renderer/**/*.ts"
- "src/renderer/**/*.html"
- "src/renderer/**/*.scss"
structure:
renderer:
- "src/"
- "app/"
- "components/"
- "common/"
- "layout/"
- "widgets/"
- "pages/"
- "main/"
- "settings/"
- "services/"
- "electron/"
- "electron.service.ts"
- "window/"
- "ipc/"
- "core/"
- "guards/"
- "interceptors/"
- "models/"
- "shared/"
- "pipes/"
- "directives/"
- "store/"
- "actions/"
- "effects/"
- "reducers/"
- "selectors/"
- "assets/"
- "images/"
- "styles/"
- "i18n/"
- "environments/"
- "styles/"
- "index.html"
- "main.ts"
- "polyfills.ts"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+Component$"
services:
pattern: "^[A-Z][a-zA-Z0-9]+Service$"
pages:
pattern: "^[A-Z][a-zA-Z0-9]+PageComponent$"
guards:
pattern: "^[A-Z][a-zA-Z0-9]+Guard$"
conventions:
- "使用TypeScript"
- "使用SCSS样式"
- "使用NgRx状态管理"
- "遵循Angular风格指南"
- "集成Electron IPC"
tauri:
base: # Tauri基础结构
patterns:
- "src-tauri/**/*.rs"
- "src-tauri/tauri.conf.json"
structure:
src-tauri:
- "src/"
- "main.rs"
- "app.rs"
- "menu.rs"
- "cmd.rs"
- "error.rs"
- "services/"
- "mod.rs"
- "storage.rs"
- "window.rs"
- "utils/"
- "mod.rs"
- "config.rs"
- "Cargo.toml"
- "tauri.conf.json"
- "build.rs"
naming:
files:
pattern: "^[a-z][a-z0-9_]*\\.rs$"
modules:
pattern: "^[a-z][a-z0-9_]*$"
structs:
pattern: "^[A-Z][a-zA-Z0-9]+$"
conventions:
core:
- "使用命令模式通信"
- "状态管理集中化"
- "错误处理统一化"
- "窗口管理模块化"
security:
- "启用CSP"
- "限制文件系统访问"
- "配置允许的API"
vue: # Vue项目结构
patterns:
- "src/**/*.vue"
- "src/**/*.{js,ts}"
structure:
src:
- "components/"
- "common/"
- "layout/"
- "widgets/"
- "views/"
- "main/"
- "settings/"
- "router/"
- "index.ts"
- "routes/"
- "store/"
- "modules/"
- "index.ts"
- "composables/"
- "useTauri.ts"
- "assets/"
- "images/"
- "styles/"
- "utils/"
- "types/"
- "App.vue"
- "main.ts"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
pages:
pattern: "^[A-Z][a-zA-Z0-9]+View$"
stores:
pattern: "^use[A-Z][a-zA-Z0-9]+Store$"
conventions:
- "使用组合式API"
- "使用TypeScript"
- "使用Pinia状态管理"
- "集成Tauri API"
react: # React项目结构
patterns:
- "src/**/*.{jsx,tsx}"
- "src/**/*.{js,ts}"
structure:
src:
- "components/"
- "common/"
- "layout/"
- "widgets/"
- "pages/"
- "main/"
- "settings/"
- "routes/"
- "index.tsx"
- "AppRoutes.tsx"
- "store/"
- "slices/"
- "hooks/"
- "hooks/"
- "useTauri.ts"
- "assets/"
- "images/"
- "styles/"
- "utils/"
- "types/"
- "App.tsx"
- "main.tsx"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
pages:
pattern: "^[A-Z][a-zA-Z0-9]+Page$"
hooks:
pattern: "^use[A-Z][a-zA-Z0-9]+$"
conventions:
- "使用函数组件"
- "使用TypeScript"
- "使用Redux Toolkit"
- "集成Tauri API"
svelte: # Svelte项目结构
patterns:
- "src/**/*.svelte"
- "src/**/*.{js,ts}"
structure:
src:
- "components/"
- "common/"
- "layout/"
- "widgets/"
- "routes/"
- "+page.svelte"
- "+layout.svelte"
- "stores/"
- "lib/"
- "tauri/"
- "assets/"
- "images/"
- "styles/"
- "utils/"
- "types/"
- "app.html"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
stores:
pattern: "^[a-z][a-zA-Z0-9]+Store$"
conventions:
- "使用TypeScript"
- "使用SvelteKit"
- "集成Tauri API"
angular: # Angular项目结构
patterns:
- "src/**/*.ts"
- "src/**/*.html"
- "src/**/*.scss"
structure:
src:
- "app/"
- "components/"
- "common/"
- "layout/"
- "widgets/"
- "pages/"
- "main/"
- "settings/"
- "services/"
- "tauri/"
- "tauri.service.ts"
- "window/"
- "commands/"
- "core/"
- "guards/"
- "interceptors/"
- "models/"
- "shared/"
- "pipes/"
- "directives/"
- "store/"
- "actions/"
- "effects/"
- "reducers/"
- "selectors/"
- "assets/"
- "images/"
- "styles/"
- "i18n/"
- "environments/"
- "styles/"
- "index.html"
- "main.ts"
- "polyfills.ts"
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+Component$"
services:
pattern: "^[A-Z][a-zA-Z0-9]+Service$"
pages:
pattern: "^[A-Z][a-zA-Z0-9]+PageComponent$"
guards:
pattern: "^[A-Z][a-zA-Z0-9]+Guard$"
conventions:
- "使用TypeScript"
- "使用SCSS样式"
- "使用NgRx状态管理"
- "遵循Angular风格指南"
- "集成Tauri命令API"
common: # 通用配置
config:
patterns:
- "src-tauri/tauri.conf.json"
- "vite.config.ts"
- ".cargo/config.toml"
conventions:
- "使用统一配置文件"
- "环境变量管理"
- "构建优化配置"
commands:
naming:
pattern: "^[a-z][a-z0-9_]*$"
structure:
- "src-tauri/src/commands/"
- "app.rs"
- "fs.rs"
- "window.rs"
conventions:
- "命令分类管理"
- "错误处理统一"
- "参数类型安全"
testing:
patterns:
- "src-tauri/tests/**/*.rs"
- "src/**/*.test.{js,ts,jsx,tsx}"
- "src/**/*.spec.{js,ts,jsx,tsx}"
conventions:
- "Rust单元测试"
- "前端组件测试"
- "E2E测试集成"
packaging:
patterns:
- "src-tauri/tauri.conf.json"
- "package.json"
conventions:
- "版本号同步"
- "资源打包优化"
- "多平台构建配置"
development:
patterns:
- ".vscode/"
- "scripts/"
conventions:
- "开发环境配置"
- "调试工具集成"
- "热重载支持"
assets:
structure:
- "src-tauri/icons/"
- "public/"
- "images/"
- "fonts/"
- "src/assets/"
- "images/"
- "styles/"
- "icons/"
frontend-common:
naming:
components:
pattern: "^[A-Z][a-zA-Z0-9]+$"
pages:
pattern: "^[A-Z][a-zA-Z0-9]+Page$"
hooks:
pattern: "^use[A-Z][a-zA-Z0-9]+$"
conventions:
- "组件目录结构统一"
- "状态管理规范"
- "由管理规范"
- "Tauri API集成规范"
database:
sql:
patterns:
- "src/main/resources/db/migration/*.sql"
- "src/main/resources/db/changelog/*.{sql,xml,yaml,json}"
- "src/main/resources/schema/*.sql"
naming:
table:
pattern: "^[a-z][a-z0-9_]*$"
prefix: "t_"
maxLength: 64
column:
pattern: "^[a-z][a-z0-9_]*$"
prefix: "c_"
maxLength: 64
index:
pattern: "^idx_[a-z0-9_]+$"
maxLength: 64
foreignKey:
pattern: "^fk_[a-z0-9_]+$"
maxLength: 64
conventions:
- "使用小写字母和下划线"
- "表名使用单数形式"
- "主键命名为 id"
- "外键命名为 {table_name}_id"
- "创建时间字段命名为 created_at"
- "更新时间字段命名为 updated_at"
- "删除标记字段命名为 deleted"
- "版本号字段命名为 version"
nosql:
patterns:
- "src/main/resources/mongodb/*.json"
- "src/main/resources/redis/*.conf"
- "src/main/resources/elasticsearch/*.json"
naming:
collection:
pattern: "^[a-z][a-z0-9_]*$"
maxLength: 64
key:
pattern: "^[a-z][a-z0-9:_]*$"
maxLength: 128
conventions:
- "MongoDB集合名使用复数形式"
- "Redis键使用号分隔"
- "ES索引使用小写字母"
build:
tools:
maven:
patterns:
- "pom.xml"
- "mvnw"
- ".mvn/**"
conventions:
- "使用属性管理版本"
- "使用dependencyManagement管理依赖"
- "使用pluginManagement管理插件"
gradle:
patterns:
- "build.gradle"
- "build.gradle.kts"
- "settings.gradle"
- "settings.gradle.kts"
- "gradlew"
- ".gradle/**"
conventions:
- "使用buildSrc管理依赖"
- "使用复合构建"
- "用版本目录"
sbt:
patterns:
- "build.sbt"
- "project/**"
conventions:
- "使用多项目构建"
- "使用插件管理"
dependencies:
maven:
scopes:
- "compile"
- "implementation"
- "testImplementation"
- "api"
- "runtime"
- "provided"
conventions:
- "使用BOM管理��本"
- "排除传递依赖使用exclusions"
gradle:
configurations:
- "implementation"
- "api"
- "testImplementation"
- "compileOnly"
- "runtimeOnly"
conventions:
- "使用platform管理版本"
- "用exclude排除依赖"
sbt:
scopes:
- "compile"
- "test"
- "provided"
conventions:
- "使用%%区分Scala版本"
- "使用exclusions排除依"
quality:
checkstyle:
patterns:
- "config/checkstyle/*.xml"
rules:
- "命名规范"
- "代码格式"
- "代码复杂度"
spotbugs:
patterns:
- "config/spotbugs/*.xml"
rules:
- "空指针检查"
- "并发问题检查"
- "安全漏检查"
pmd:
patterns:
- "config/pmd/*.xml"
rules:
- "代码规范"
- "最佳实践"
- "性能优化"
docs:
patterns:
- "docs/**/*.md"
- "README.md"
- "CHANGELOG.md"
- "API.md"
conventions:
- "使用Markdown格式"
- "包含示例代码"
- "包含API文档"
- "包含变更日志"
config:
patterns:
- "src/main/resources/application.{yml,properties}"
- "src/main/resources/application-*.{yml,properties}"
- "src/main/resources/bootstrap.{yml,properties}"
- "src/main/resources/bootstrap-*.{yml,properties}"
- ".env"
- ".env.*"
- "config/**/*"
conventions:
- "使用YAML格式"
- "使用profile区分环境"
- "敏感信息使用密文"
- "配置项使用小写字母和横线"
security:
patterns:
- "src/main/resources/**/*.keystore"
- "src/main/resources/**/*.truststore"
- "src/main/resources/**/*.jks"
- "src/main/resources/**/*.p12"
conventions:
- "密钥文件不提交到版本控制"
- "密码使用环境变量"
- "证书使用密文存储"
authentication:
conventions:
- "使用JWT令牌"
- "实现刷新机制"
- "加密敏感信息"
patterns:
- "**/security/**/*.{java,kt}"
authorization:
conventions:
- "基于角色控制"
- "最小权限原则"
- "审计关键操作"
patterns:
- "**/security/**/*.{java,kt}"
test:
unit:
naming:
pattern: "^.*Test$|^.*Spec$"
conventions:
- "使用given-when-then格式"
- "每个测试只验证一个行为"
- "避免测试私有方法"
patterns:
- "**/test/**/*Test.{java,kt}"
- "**/test/**/*Spec.{groovy,scala}"
integration:
naming:
pattern: "^.*IT$|^.*IntegrationTest$"
conventions:
- "使用测试器"
- "清理测试数据"
- "避免测试依赖"
patterns:
- "**/test/**/*IT.{java,kt}"
- "**/test/**/*IntegrationTest.{java,kt}"
e2e:
naming:
pattern: "^.*E2E$"
conventions:
- "使用页面对象模式"
- "处理异步操作"
- "验证关键流程"
patterns:
- "**/e2e/**/*.{js,ts}"
cicd:
github:
workflows:
patterns:
- ".github/workflows/*.yml"
conventions:
- "使用语义化版本"
- "使用多段构建"
- "缓存依赖项"
gitlab:
patterns:
- ".gitlab-ci.yml"
conventions:
- "使用阶段划分"
- "使用依赖缓存"
- "使用变量替换"
jenkins:
patterns:
- "Jenkinsfile"
conventions:
- "使用声明式流水线"
- "使用共享库"
- "使用参数化构建"
monitoring:
metrics:
patterns:
- "**/metrics/**"
conventions:
- "使用有意义的指标名"
- "添加适当的标签"
- "记录关键业务指标"
logging:
patterns:
- "**/logs/**"
conventions:
- "使用结构化日志"
- "包含追踪ID"
- "分级记录日志"
tracing:
patterns:
- "**/trace/**"
conventions:
- "记录关键操作"
- "添加业务标签"
- "控制采样"
nodejs:
common: # Node.js通用配置
patterns:
- "src/**/*.{js,ts}"
- "test/**/*.{js,ts}"
structure:
main:
- "src/"
- "controllers/" # 控制器层
- "api/" # API控制器
- "web/" # Web控制器
- "services/" # 业务服务层
- "impl/" # 服务实现
- "models/" # 数据模型
- "entities/" # 实体
- "dtos/" # 数据传输对象
- "repositories/" # 数据访问层
- "middlewares/" # 中间件
- "auth/" # 认证中间件
- "validation/" # 验证中间件
- "error/" # 错误处理
- "config/" # 配置
- "database.ts"
- "redis.ts"
- "queue.ts"
- "utils/" # 工具
- "types/" # 类型定义
- "constants/" # 常量定义
- "test/"
- "unit/" # 单元测试
- "integration/" # 集成测试
- "e2e/" # E2E测试
- "config/"
- "default.json"
- "{env}.json"
express:
testing:
<<: *common_test_deploy_monitor_doc
dependencies:
- "jest"
- "supertest"
- "ts-jest"
ext: "ts"
nest:
testing:
<<: *common_test_deploy_monitor_doc
dependencies:
- "@nestjs/testing"
- "jest"
- "supertest"
ext: "ts"
golang:
gin:
testing:
<<: *common_test_deploy_monitor_doc
dependencies:
- "testing"
- "testify"
- "gomock"
ext: "go"
echo:
testing:
<<: *common_test_deploy_monitor_doc
dependencies:
- "testing"
- "testify"
- "gomock"
ext: "go"
python:
fastapi:
testing:
<<: *common_test_deploy_monitor_doc
dependencies:
- "pytest"
- "pytest-asyncio"
- "httpx"
ext: "py"
django:
testing:
<<: *common_test_deploy_monitor_doc
dependencies:
- "pytest"
- "pytest-django"
- "factory-boy"
ext: "py"
flask:
naming:
conventions:
controller:
pattern: "^[A-Z][a-zA-Z0-9]+Controller$"
examples:
- "UserController"
- "OrderController"
service:
pattern: "^[A-Z][a-zA-Z0-9]+Service$"
examples:
- "UserService"
- "OrderService"
repository:
pattern: "^[A-Z][a-zA-Z0-9]+Repository$"
examples:
- "UserRepository"
- "OrderRepository"
model:
pattern: "^[A-Z][a-zA-Z0-9]+$"
examples:
- "User"
- "Order"
dto:
pattern: "^[A-Z][a-zA-Z0-9]+DTO$"
examples:
- "UserDTO"
- "OrderDTO"
dependencies:
core: # 核心依赖
- "flask"
- "flask-restful"
- "flask-cors"
- "flask-marshmallow"
data: # 数据访问
- "flask-sqlalchemy"
- "flask-migrate"
- "pymongo"
security: # 安全框架
- "flask-jwt-extended"
- "flask-security"
- "flask-bcrypt"
cache: # 缓存支持
- "flask-caching"
- "redis"
monitoring: # 监控工具
- "flask-prometheus-metrics"
- "structlog"
tornado:
naming:
conventions:
controller:
pattern: "^[A-Z][a-zA-Z0-9]+Handler$"
examples:
- "UserHandler"
- "OrderHandler"
service:
pattern: "^[A-Z][a-zA-Z0-9]+Service$"
examples:
- "UserService"
- "OrderService"
repository:
pattern: "^[A-Z][a-zA-Z0-9]+Repository$"
examples:
- "UserRepository"
- "OrderRepository"
model:
pattern: "^[A-Z][a-zA-Z0-9]+$"
examples:
- "User"
- "Order"
dto:
pattern: "^[A-Z][a-zA-Z0-9]+DTO$"
examples:
- "UserDTO"
- "OrderDTO"
dependencies:
core: # 核心依赖
- "tornado"
- "tornado-cors"
- "marshmallow"
data: # 数据访问
- "sqlalchemy"
- "alembic"
- "motor"
security: # 安全框架
- "python-jose"
- "passlib"
- "bcrypt"
cache: # 缓存支持
- "aioredis"
- "cachetools"
monitoring: # 监控工具
- "prometheus-client"
- "structlog"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aicode-design/system-design.git
git@gitee.com:aicode-design/system-design.git
aicode-design
system-design
system-design
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385