Cursor rule
.cursor/rules/clickhouse.mdcRules for working with ClickHouse analytics and trace logging
Cursor rules
Quality
42/100
Scores the file, not the repository.Length
150 words
1 headings · 0 code blocksRepository
39k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.123456789### ClickHouse Conventions1011**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.1516**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).2021**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).2526**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
Also in novuhq/novu
Diff this repo’s formatsOne 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 |
|---|---|---|---|---|---|
| novuhq/novu.cursor/rules/api-property-optionality-hygiene.mdc · 39k | Cursor rules | gitagent-behaviour | 68/100 | 3 days ago | |
| novuhq/novu.cursor/rules/api.mdc · 39k | Cursor rules | styleapi | 72/100 | 3 days ago | |
| novuhq/novu.cursor/rules/context-engineering.mdc · 39k | Cursor rules | no sections | 16/100 | 3 days ago | |
| novuhq/novu.cursor/rules/dal-repository.mdc · 39k | Cursor rules | do-not | 46/100 | 3 days ago | |
| novuhq/novu.cursor/rules/dashboard.mdc · 39k | Cursor rules | style | 57/100 | 3 days ago | |
| novuhq/novu.cursor/rules/dependency-graph.mdc · 39k | Cursor rules | no sections | 22/100 | 3 days ago | |
| novuhq/novu.cursor/rules/docs-mintlify-steps.mdc · 39k | Cursor rules | do-notagent-behaviour | 43/100 | 3 days ago | |
| novuhq/novu.cursor/rules/infrastructure.mdc · 39k | Cursor rules | no sections | 50/100 | 3 days ago | |
| novuhq/novu.cursor/rules/novu.mdc · 39k | Cursor rules | style | 20/100 | 3 days ago | |
| novuhq/novu.cursor/rules/packages.mdc · 39k | Cursor rules | stylearchdependenciesdocs | 46/100 | 3 days ago | |
| novuhq/novu.cursor/rules/pnpm-release-age.mdc · 39k | Cursor rules | no sections | 24/100 | 3 days ago | |
| novuhq/novu.cursor/rules/pullrequest.mdc · 39k | Cursor rules | gitdo-not | 37/100 | 3 days ago | |
| novuhq/novu.cursor/rules/safe-api-tests.mdc · 39k | Cursor rules | setupteststyletesting-strategy+4 | 88/100 | 3 days ago | |
| novuhq/novu.cursor/rules/testing.mdc · 39k | Cursor rules | teststyletesting-strategy | 54/100 | 3 days ago | |
| novuhq/novu.cursor/rules/worker.mdc · 39k | Cursor rules | style | 65/100 | 3 days ago | |
| novuhq/novu.cursor/rules/ws.mdc · 39k | Cursor rules | style | 51/100 | 3 days ago | |
| novuhq/novu.deepsec/AGENTS.md · 39k | AGENTS.md | setupagent-behaviour | 33/100 | 3 days ago | |
| novuhq/novuAGENTS.md · 39k | AGENTS.md | builddo-notagent-behaviour | 63/100 | 3 days ago |
Diff against .cursor/rules/api-property-optionality-hygiene.mdc Diff against .cursor/rules/api.mdc Diff against .cursor/rules/context-engineering.mdc Diff against .cursor/rules/dal-repository.mdc Diff against .cursor/rules/dashboard.mdc Diff against .cursor/rules/dependency-graph.mdc Diff against .cursor/rules/docs-mintlify-steps.mdc Diff against .cursor/rules/infrastructure.mdc Diff against .cursor/rules/novu.mdc Diff against .cursor/rules/packages.mdc Diff against .cursor/rules/pnpm-release-age.mdc Diff against .cursor/rules/pullrequest.mdc Diff against .cursor/rules/safe-api-tests.mdc Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/worker.mdc Diff against .cursor/rules/ws.mdc Diff against .deepsec/AGENTS.md Diff against AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
