

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# 项目背景2- 数据库:MySQL、Sqlite、Postgres、Typeorm(0.3.20版本, 不使用外键方式,如@ManyToOne、@OneToMany等)3- 语言:TypeScript、JavaScript、CommonJS4- 框架:Koa.js、midway.js、cool-admin-midway5- 项目版本:8.x67# 目录8项目目录:9 ├── .vscode(代码片段,根据关键字可以快速地生成代码)10 ├── public(静态资源文件,如js、css或者上传的文件)11 ├── src12 │ └── comm(通用库)13 │ └── modules(项目模块)14 │ └── config15 │ │ └── config.default.ts(默认配置,不区分环境,都生效)16 │ │ └── config.local.ts(本地开发配置,对应npm run dev)17 │ │ └── config.prod.ts(生产环境配置,对应npm run start)18 │ └── configuration.ts(midway的配置文件)19 │ └── welcome.ts(环境的controller)20 │ └── interface.ts(类型声明)21 ├── package.json(依赖管理,项目信息)22 ├── bootstrap.js(生产环境启动入口文件,可借助pm2等工具多进程启动)23 └── ...2425 模块目录26 ├── modules27 │ └── base(基础的权限管理系统)28 │ │ └── controller(api接口)29 │ │ └── dto(参数校验)30 │ │ └── entity(实体类)31 │ │ └── middleware(中间件)32 │ │ └── schedule(定时任务)33 │ │ └── service(服务,写业务逻辑)34 │ │ └── config.ts(必须,模块的配置)35 │ │ └── db.json(可选,初始化该模块的数据)36 │ │ └── menu.json(可选,初始化该模块的菜单)3738 # 其它39- 始终使用中文回复,包括代码注释等40- `@midwayjs/decorator`,已弃用,使用`@midwayjs/core`41- 不要使用自定义sql来操作数据库,而是使用typeorm的api,统计相关的可以考虑使用原生sql42- Controller中不允许重写`add`、`delete`、`update`、`info`、`list`、`page`方法43- Controller不需要加@Provide()注解44- page接口关联表查询一般写在Controller的pageQueryOp中,尽量不要使用自定义sql45- Entity字段使用驼峰命名,如:studentNo46- Entity不允许使用@ManyToOne、@OneToMany等外键关系47- Entity的BaseEntity引用固定为:`import { BaseEntity } from '../../base/entity/base';`,禁止修改层级48- 创建api接口时,不要多层级如:`/student/detail`,改为`/studentDetail`,用驼峰法;49- 本项目是版本8.x,所有代码都需要按照新的写法进行编写,如Entity字典的配置50- 文件的命名不要使用驼峰法,而是使用下划线法,如:student_info.entity.ts,另外禁止太啰嗦,比如:student模块下的学生信息,不要写成:student_info, 而是写成info.ts,班级信息:class.ts,不要写成student_class.ts51- 创建模块代码需要读取.cursor/rules的module.mdc、controller.mdc、service.mdc、db.mdc,其它的rules根据需要进行参考
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| cool-team-official/cool-admin-midway.cursor/rules/authority.mdc · 3.3k | Cursor rules | security | 54/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/cache.mdc · 3.3k | Cursor rules | no sections | 58/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/controller.mdc · 3.3k | Cursor rules | api | 46/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/db.mdc · 3.3k | Cursor rules | setupdatabase | 62/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/event.mdc · 3.3k | Cursor rules | no sections | 45/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/module.mdc · 3.3k | Cursor rules | no sections | 50/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/service.mdc · 3.3k | Cursor rules | database | 54/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/socket.mdc · 3.3k | Cursor rules | no sections | 58/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/task.mdc · 3.3k | Cursor rules | style | 58/100 | today | |
| cool-team-official/cool-admin-midway.cursor/rules/tenant.mdc · 3.3k | Cursor rules | no sections | 50/100 | today |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| enuno/unifi-mcp-server.cursorrules · 226 | .cursorrules | setuptestlint-formatstyle+7 | 93/100 | today | |
| fall-out-bug/sdp_lab.cursorrules · 0 | .cursorrules | setupbuildtestlint-format+3 | 86/100 | 14 days ago | |
| bashdeban/fastmind.cursorrules · 5 | .cursorrules | buildtestlint-formattypes+5 | 81/100 | 14 days ago | |
| storybookjs/storybook.cursorrules · 91k | .cursorrules | teststylearchdo-not+1 | 78/100 | 14 days ago | |
| forem/forem.cursorrules · 23k | .cursorrules | teststyletypesdatabase+4 | 71/100 | 14 days ago | |
| aiurda/devcontext.cursorrules · 47 | .cursorrules | archdo-notagent-behaviourdocs | 65/100 | 13 days ago | |
| wodsmith/thewodapp.cursorrules · 2 | .cursorrules | testlint-formatstylearch+4 | 64/100 | 14 days ago | |
| NickCirv/engram.cursorrules · 139 | .cursorrules | testarchdependencies | 63/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/cool-team-official-cool-admin-midway-cursorrules)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.