You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Monorepo: Turborepo + Yarn 4 workspaces. Angular 20 SSR app at `apps/lfx-changelog`, shared package at `packages/shared` (`@lfx-changelog/shared`), MCP server at `packages/mcp-server`. Express 5 backend, PostgreSQL + Prisma ORM, Auth0, OpenSearch, Slack OAuth, GitHub App webhooks, Datadog APM/RUM. See `docs/` for feature-level documentation.
6
+
7
+
---
8
+
9
+
## Styling
10
+
11
+
-**Tailwind CSS v4** — CSS-first config via `@theme` block in `styles.css`, no `tailwind.config.js`
12
+
-**`.css` files only** — no SCSS (Tailwind v4 CSS-first approach makes SCSS unnecessary)
13
+
-**Semantic color tokens** — use `bg-surface`, `text-text-primary`, `border-border` etc. (defined as CSS custom properties that swap in `.dark {}` block)
14
+
-**Light mode default** — dark mode toggled via `.dark` class on `<html>`
15
+
-**ALWAYS use Tailwind CSS in HTML first** instead of custom CSS classes
16
+
- Only use custom `.css` when absolutely necessary: complex animations (`@keyframes`), pseudo-elements, prose/markdown styling, complex state selectors
17
+
18
+
---
19
+
20
+
## Tooling Preferences
21
+
22
+
-**Prefer `yarn` workspace scripts/binaries over `npx`** when the tool is in the monorepo deps (e.g., `yarn prisma generate` instead of `npx prisma generate`)
23
+
-`npx` is allowed for one-off tools not in the workspace or when required by upstream docs/CI (e.g., `npx playwright`, `npx @modelcontextprotocol/inspector`, `npx tsx`)
24
+
-**Always use `docker compose`** instead of `docker-compose`
Copy file name to clipboardExpand all lines: .claude/rules/angular.md
+15-75Lines changed: 15 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,12 @@
1
-
# LFX Changelog — Project Rules
2
-
3
-
## Project Overview
4
-
5
-
Monorepo: Turborepo + Yarn 4 workspaces. Angular 20 SSR app at `apps/lfx-changelog`, shared package at `packages/shared` (`@lfx-changelog/shared`), MCP server at `packages/mcp-server`. Express 5 backend, PostgreSQL + Prisma ORM, Auth0, OpenSearch, Slack OAuth, GitHub App webhooks, Datadog APM/RUM. See `docs/` for feature-level documentation.
6
-
1
+
---
2
+
paths:
3
+
- 'apps/lfx-changelog/src/**'
4
+
- 'packages/shared/src/**'
7
5
---
8
6
9
-
##Angular Component Rules
7
+
# Angular Component Rules
10
8
11
-
###File Structure
9
+
## File Structure
12
10
13
11
-**NEVER inline templates or CSS** — always use separate `.html` and `.css` files (`templateUrl` / `styleUrl`), never `template:` or `styles:` in the component decorator
14
12
-**Components/directives in own subfolder** — e.g. `shared/components/button/button.component.ts`
@@ -17,7 +15,7 @@ Monorepo: Turborepo + Yarn 4 workspaces. Angular 20 SSR app at `apps/lfx-changel
-**Shared interfaces** in `packages/shared/src/interfaces/` — exported via `@lfx-changelog/shared`
214
195
-**App-specific interfaces** in `apps/lfx-changelog/src/app/shared/interfaces/`
215
196
- Group related interfaces in domain-specific files (e.g., `product.interface.ts`, `user.interface.ts`)
216
197
- Never define interfaces inside component files — move them to the shared folder
217
-
218
-
---
219
-
220
-
## Styling
221
-
222
-
-**Tailwind CSS v4** — CSS-first config via `@theme` block in `styles.css`, no `tailwind.config.js`
223
-
-**`.css` files only** — no SCSS (Tailwind v4 CSS-first approach makes SCSS unnecessary)
224
-
-**Semantic color tokens** — use `bg-surface`, `text-text-primary`, `border-border` etc. (defined as CSS custom properties that swap in `.dark {}` block)
225
-
-**Light mode default** — dark mode toggled via `.dark` class on `<html>`
226
-
227
-
---
228
-
229
-
## Prisma Migrations (CRITICAL)
230
-
231
-
When creating Prisma migrations, **always use `--create-only` first** to avoid checksum mismatches:
232
-
233
-
1.`yarn prisma migrate dev --create-only --name <migration_name>` — generates the SQL file without applying
234
-
2. Add the license header to the generated `migration.sql` file:
235
-
236
-
```sql
237
-
-- Copyright The Linux Foundation and each contributor to LFX.
238
-
-- SPDX-License-Identifier: MIT
239
-
```
240
-
241
-
3.`yarn prisma migrate dev` — applies the migration (checksum now includes the header)
242
-
243
-
**NEVER** run `yarn prisma migrate dev --name <name>` directly — it generates and applies in one step, meaning the checksum won't include the license header and modifying the file afterward causes integrity errors on production deploys.
244
-
245
-
**`migration_lock.toml`** is auto-managed by Prisma and overwritten on every migration command. After running any migration, check if its license header was stripped and re-add it if needed:
246
-
247
-
```toml
248
-
# Copyright The Linux Foundation and each contributor to LFX.
249
-
# SPDX-License-Identifier: MIT
250
-
```
251
-
252
-
---
253
-
254
-
## Tooling Preferences
255
-
256
-
-**Always use `yarn`** instead of `npx` (e.g., `yarn prisma generate`, NOT `npx prisma generate`)
257
-
-**Always use `docker compose`** instead of `docker-compose`
When creating Prisma migrations, **always use `--create-only` first** to avoid checksum mismatches:
11
+
12
+
1.`yarn prisma migrate dev --create-only --name <migration_name>` — generates the SQL file without applying
13
+
2. Add the license header to the generated `migration.sql` file:
14
+
15
+
```sql
16
+
-- Copyright The Linux Foundation and each contributor to LFX.
17
+
-- SPDX-License-Identifier: MIT
18
+
```
19
+
20
+
3.`yarn prisma migrate dev` — applies the migration (checksum now includes the header)
21
+
22
+
**NEVER** run `yarn prisma migrate dev --name <name>` directly — it generates and applies in one step, meaning the checksum won't include the license header and modifying the file afterward causes integrity errors on production deploys.
23
+
24
+
**`migration_lock.toml`** is auto-managed by Prisma and overwritten on every migration command. After running any migration, check if its license header was stripped and re-add it if needed:
25
+
26
+
```toml
27
+
# Copyright The Linux Foundation and each contributor to LFX.
Copy file name to clipboardExpand all lines: docs/database-migrations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ yarn prisma migrate dev
92
92
yarn prisma migrate status
93
93
```
94
94
95
-
> **Important:** Always use `--create-only` first to avoid checksum mismatches. See the `CLAUDE.md` section on Prisma migrations for the full workflow.
95
+
> **Important:** Always use `--create-only` first to avoid checksum mismatches. See `.claude/rules/prisma.md` for the full workflow.
0 commit comments