RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/novuhq-novu-cursor-rules-dependency-graph ↔ novuhq-novu-cursor-rules-clickhouse

Comparison

A · Cursor rules · novuhq/novuB · Cursor rules · novuhq/novu
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections0110%
Commands000—
Section tags0010%

What each file covers

Sections

0 shared · 1 only in A · 1 only in B
  • − Dependency Graph
  • + ClickHouse Conventions

Commands

neither file has any

Section tags

0 shared · 0 only in A · 1 only in B
  • + code-style

Line diff

+21 added−28 removed7 unchanged20.0% identical
novuhq/novu · .cursor/rules/dependency-graph.mdc
@@ −1 @@
1---
2description: Novu monorepo dependency graph — use when assessing blast radius before changing shared code
3globs:
 
 
4alwaysApply: false
5---
6 
7## Dependency Graph
8 
9```mermaid
10graph TD
11 subgraph apps [Apps]
12 api[api]
13 dashboard[dashboard]
14 worker[worker]
15 ws[ws]
16 end
17 subgraph libs [Libs - internal only]
18 dal[dal]
19 appGeneric[application-generic]
20 end
21 subgraph pkgs [Packages - published to NPM]
22 shared[shared]
23 framework[framework]
24 jsSDK[js]
25 reactSDK[react]
26 end
27 api --> appGeneric --> dal
28 worker --> appGeneric
29 ws --> appGeneric
30 api --> shared
31 worker --> shared
32 dashboard --> reactSDK --> jsSDK --> shared
33 dashboard --> framework
34```
35 
novuhq/novu · .cursor/rules/clickhouse.mdc
@@ +1 @@
1---
2description: Rules for working with ClickHouse analytics and trace logging
3globs:
4 - "**/analytic-logs/**"
5 - "**/clickhouse-migrations/**"
6alwaysApply: false
7---
8 
9### ClickHouse Conventions
10 
11**Service layer**
12- Use `ClickHouseService` for single queries/inserts and `ClickHouseBatchService` for high-throughput writes.
13- Both are registered as custom providers (`clickHouseService`, `clickHouseBatchService`) in each app's `shared.module.ts`.
14- Never instantiate ClickHouse clients directly — always inject the providers.
15 
16**Repositories**
17- All ClickHouse repositories extend `LogRepository` in `libs/application-generic/src/services/analytic-logs/`.
18- Each repository has a corresponding schema file defining the table columns and types.
19- Always include `_environmentId` and `_organizationId` in queries for tenant isolation (same pattern as MongoDB DAL).
20 
21**Migrations**
22- ClickHouse migrations are numbered `.sql` files in `apps/api/migrations/clickhouse-migrations/`.
23- Run locally with `cd apps/api && pnpm run clickhouse:migrate:local`.
24- New migrations must be additive — never alter or drop columns that existing queries depend on. Use temp tables and exchange patterns for schema refactors (see migration 4/5 for the established pattern).
25 
26**Feature flags**
27- Gate new ClickHouse-dependent behavior behind a feature flag (see `packages/shared/src/types/feature-flags.ts` for existing flags like `IS_CLICKHOUSE_BATCHING_ENABLED`).
 
 
 
 
 
 
 
 
 
28 
@@ −1 +1 @@
11 ---
2−description: Novu monorepo dependency graph — use when assessing blast radius before changing shared code
2+description: Rules for working with ClickHouse analytics and trace logging
33 globs:
4+ - "**/analytic-logs/**"
5+ - "**/clickhouse-migrations/**"
46 alwaysApply: false
57 ---
68  
7−## Dependency Graph
9+### ClickHouse Conventions
810  
9−```mermaid
10−graph TD
11− subgraph apps [Apps]
12− api[api]
13− dashboard[dashboard]
14− worker[worker]
15− ws[ws]
16− end
17− subgraph libs [Libs - internal only]
18− dal[dal]
19− appGeneric[application-generic]
20− end
21− subgraph pkgs [Packages - published to NPM]
22− shared[shared]
23− framework[framework]
24− jsSDK[js]
25− reactSDK[react]
26− end
27− api --> appGeneric --> dal
28− worker --> appGeneric
29− ws --> appGeneric
30− api --> shared
31− worker --> shared
32− dashboard --> reactSDK --> jsSDK --> shared
33− dashboard --> framework
34−```
11+**Service layer**
12+- Use `ClickHouseService` for single queries/inserts and `ClickHouseBatchService` for high-throughput writes.
13+- Both are registered as custom providers (`clickHouseService`, `clickHouseBatchService`) in each app's `shared.module.ts`.
14+- Never instantiate ClickHouse clients directly — always inject the providers.
15+ 
16+**Repositories**
17+- All ClickHouse repositories extend `LogRepository` in `libs/application-generic/src/services/analytic-logs/`.
18+- Each repository has a corresponding schema file defining the table columns and types.
19+- Always include `_environmentId` and `_organizationId` in queries for tenant isolation (same pattern as MongoDB DAL).
20+ 
21+**Migrations**
22+- ClickHouse migrations are numbered `.sql` files in `apps/api/migrations/clickhouse-migrations/`.
23+- Run locally with `cd apps/api && pnpm run clickhouse:migrate:local`.
24+- New migrations must be additive — never alter or drop columns that existing queries depend on. Use temp tables and exchange patterns for schema refactors (see migration 4/5 for the established pattern).
25+ 
26+**Feature flags**
27+- Gate new ClickHouse-dependent behavior behind a feature flag (see `packages/shared/src/types/feature-flags.ts` for existing flags like `IS_CLICKHOUSE_BATCHING_ENABLED`).
3528  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack