-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.cursorrules
More file actions
30 lines (25 loc) · 1.58 KB
/
.cursorrules
File metadata and controls
30 lines (25 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Monorepo Cursor Rules
- Package Manager: pnpm (root lockfile only). Do not create nested lockfiles.
- Orchestration: Turborepo. Use root scripts: `pnpm dev|build|lint|test|codegen`. Filter with `--filter <pkg>`.
- Workspaces:
- `backend`: Express (CommonJS) + TypeScript. Generates `openapi.json` via `codegen`. Build outputs to `dist/**`.
- `frontend`: Next 14 app. Outputs `.next/**`. Imports shared types from `@forse/types`.
- `packages/types`: Type-only module `@forse/types`. No runtime side effects. Entry `src/index.ts`.
- `packages/tsconfig`: Shared TS configs.
Turbo pipeline (see `turbo.json`):
- `dev`: persistent, cache: false
- `codegen`: writes `**/openapi.json` (non-backend packages expose no-op `codegen`)
- `build`: depends on `^build` and `codegen`, outputs `dist/**`, `.next/**`, `openapi.json`, `**/openapi.json`
Conventions:
- Internal deps use `workspace:*`.
- Keep `@forse/types` strictly types; do not add runtime code.
- Do not reintroduce `frontend/lib/types/dynamic-form.ts`. Import from `@forse/types` instead.
- Avoid deep nesting and inline comments in code. Favor early returns and meaningful naming.
Agent Guidance:
- When adding a new package, add a minimal `codegen` script (no-op if unused) to keep pipeline uniform.
- Update `turbo.json` outputs for any new generated artifacts.
- If backend OpenAPI changes, ensure `generate-openapi.ts` remains the single source and that `/docs` reads from built path.
- Never commit sub-package lockfiles; remove them if found.
Commands:
- Run via root: `pnpm <script>` (Turbo fans out)
- Per-package: `pnpm --filter <name> <script>`