cool-admin-midway/.cursorrules
2025-02-09 21:02:47 +08:00

40 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 项目背景
- 数据库MySQL、Sqlite、Postgres、Typeorm0.3.20
- 语言TypeScript、JavaScript、CommonJS
- 框架Koa.js、midway.js、cool-admin-midway
- 项目版本8.x
# 目录
项目目录:
├── .vscode(代码片段,根据关键字可以快速地生成代码)
├── public(静态资源文件如js、css或者上传的文件)
├── src
│ └── comm(通用库)
│ └── modules(项目模块)
│ └── config
│ │ └── config.default.ts(默认配置,不区分环境,都生效)
│ │ └── config.local.ts(本地开发配置对应npm run dev)
│ │ └── config.prod.ts(生产环境配置对应npm run start)
│ └── configuration.ts(midway的配置文件)
│ └── welcome.ts(环境的controller)
│ └── interface.ts(类型声明)
├── package.json(依赖管理,项目信息)
├── bootstrap.js(生产环境启动入口文件可借助pm2等工具多进程启动)
└── ...
模块目录
├── modules
│ └── base(基础的权限管理系统)
│ │ └── controller(api接口)
│ │ └── dto(参数校验)
│ │ └── entity(实体类)
│ │ └── middleware(中间件)
│ │ └── schedule(定时任务)
│ │ └── service(服务,写业务逻辑)
│ │ └── config.ts(必须,模块的配置)
│ │ └── db.json(可选,初始化该模块的数据)
│ │ └── menu.json(可选,初始化该模块的菜单)
# 其它
- 始终使用中文回复,包括代码注释等