RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/groupultra/telegram-search

Cursor rule

.cursor/rules/client.mdc
Cursor rules

Quality

60/100

Scores the file, not the repository.

Length

337 words

5 headings · 0 code blocks

Repository

4.0k

— · pushed 2 days ago

Last changed

3 days ago

First indexed 3 days ago.
groupultra/telegram-search/.cursor/rules/client.mdcRawGitHub
1---
2globs: packages/client/src/**/*
3---
4 
5## Client Adapters (packages/client)
6 
7- **Role**: Bridge between UI (Vue/Pinia) and core (`packages/core`) in both:
8 - **Browser-only mode** (embedded core via `core-runtime` / `core-bridge`).
9 - **Server mode** (WebSocket adapter to `apps/server`).
10- Keep this package thin and focused on:
11 - Event wiring.
12 - Session/account management.
13 - Store updates and derivations for UI consumption.
14 
15### Core Runtime & Bridge
16 
17- `core-runtime`:
18 - Owns the lifecycle of `CoreContext` and DB initialization in browser mode.
19 - Exposes helper methods (`getCtx`, `destroy`, etc.) instead of leaking internal implementation.
20- `core-bridge`:
21 - Manages sessions, the active account slot, and event handler registration.
22 - On account switch:
23 - Destroy the existing `CoreContext`.
24 - Re-register client-side event handlers for the new active account.
25 - Never share a single runtime instance across different account IDs.
26 
27### Events & Type Safety
28 
29- Always go through the typed WebSocket/core event maps:
30 - Use `WsEventToServer`, `WsEventToClient`, and `FromCoreEvent` / `ToCoreEvent` types.
31 - Avoid untyped `any` payloads or generic `Record<string, unknown>` where stronger types are available.
32- When adding new events:
33 - Update the shared `@tg-search/server/types`.
34 - Extend client event handler maps and registration helpers.
35 - Keep the mapping between WS event names and core events explicit.
36 
37### Pinia Stores & Composables
38 
39- Stores in `packages/client` are the **source of truth** for app state:
40 - Use actions to emit events to core and react to `FromCoreEvent` updates.
41 - Avoid duplicating the same state in both `apps/web` and `packages/client`.
42- For reusable logic, prefer composables and pure utilities inside this package rather than re-implementing logic in components.
43 
44### Logging & Error Handling
45 
46- Use `useLogger` with a **component/module name** (e.g. `'CoreBridge'`) for all logs in this package.
47- Log:
48 - High-level intent (event name, account/session IDs).
49 - Errors when event delivery or handler invocation fails.
50- Do not log sensitive payload data (raw messages, tokens, secrets).
51- When something fails:
52 - Prefer emitting a client-facing event that the UI can react to (e.g. a `core:error` or domain-specific failure event).
53 - Avoid throwing unhandled exceptions that would crash the whole bridge.
54 
55 

Sections

  • Client Adapters (packages/client)
  • Core Runtime & Bridge
  • Events & Type Safety
  • Pinia Stores & Composables
  • Logging & Error Handling

What it covers

code-stylearchitecturetypesdependenciesmonorepo

Stack — with the evidence

typescript

(1.00)

drizzle

(1.00)

turborepo

(1.00)

vitest

(1.00)

eslint

(1.00)

node

(0.70)

vue

(0.70)

postgres

(0.70)

vite

(0.70)

javascript

(0.60)

monorepo

(0.60)

pnpm

(0.60)

github-actions

(0.60)

Glob targeting

  • packages/client/src/**/*

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
groupultra
Language
—
License
—
Archived
no

All configs in this repo

Also in groupultra/telegram-search

Diff this repo’s formats

One 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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
groupultra/telegram-search.cursor/rules/testing.mdc · 4.0kCursor rulestypescriptdrizzle+11teststyletesting-strategydatabase55/1003 days ago
groupultra/telegram-search.cursor/rules/architecture.mdc · 4.0kCursor rulestypescriptdrizzle+11buildtestlint-formatarch+489/1003 days ago
groupultra/telegram-search.cursor/rules/backend-server.mdc · 4.0kCursor rulestypescriptdrizzle+11setupsecuritymonorepo52/1003 days ago
groupultra/telegram-search.cursor/rules/contributing.mdc · 4.0kCursor rulestypescriptdrizzle+11styletypesgit56/1003 days ago
groupultra/telegram-search.cursor/rules/core.mdc · 4.0kCursor rulestypescriptdrizzle+11stylearchdependenciesdatabase+160/1003 days ago
groupultra/telegram-search.cursor/rules/db.mdc · 4.0kCursor rulestypescriptdrizzle+11styletypesdatabaseperformance59/1003 days ago
groupultra/telegram-search.cursor/rules/events.mdc · 4.0kCursor rulestypescriptdrizzle+11style60/1003 days ago
groupultra/telegram-search.cursor/rules/frontend-web.mdc · 4.0kCursor rulestypescriptdrizzle+11stylesecurityuimonorepo56/1003 days ago
groupultra/telegram-search.cursor/rules/pglite-inspector.mdc · 4.0kCursor rulestypescriptdrizzle+11securityapi47/1003 days ago
groupultra/telegram-search.cursor/rules/tooling.mdc · 4.0kCursor rulestypescriptdrizzle+11buildlint-formatstyledeployment+167/1003 days ago
groupultra/telegram-search.github/copilot-instructions.md · 4.0kCopilot instructionstypescriptdrizzle+11teststyleagent-behaviour76/1003 days ago
groupultra/telegram-searchAGENTS.md · 4.0kAGENTS.mdtypescriptdrizzle+11setupbuildtestlint-format+1083/1003 days ago
Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/architecture.mdc Diff against .cursor/rules/backend-server.mdc Diff against .cursor/rules/contributing.mdc Diff against .cursor/rules/core.mdc Diff against .cursor/rules/db.mdc Diff against .cursor/rules/events.mdc Diff against .cursor/rules/frontend-web.mdc Diff against .cursor/rules/pglite-inspector.mdc Diff against .cursor/rules/tooling.mdc Diff against .github/copilot-instructions.md Diff against AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
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