Cursor rule
.cursor/rules/electron-ipc.mdcElectron IPC 跨層開發順序與注意事項
Cursor rules
Quality
25/100
Scores the file, not the repository.Length
101 words
4 headings · 0 code blocksRepository
2.8k
— · pushed 95 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Electron IPC 開發規範89## 跨層改動順序1011新增或修改 IPC 功能時,**必須依照以下順序**:12131. **型別定義** — `src/types/electron.d.ts`142. **Preload 橋接** — `electron/preload/`153. **IPC Handler** — `electron/main/ipc-handlers.ts`164. **主程式邏輯** — `electron/main/`(新增服務檔案)175. **UI 元件** — `src/pages/` 或 `src/components/`1819## 架構分層說明2021| 層 | 路徑 | 說明 |22|----|------|------|23| UI | `src/pages/` | React 頁面、按鈕、互動 |24| 型別定義 | `src/types/electron.d.ts` | IPC API 型別 |25| Preload | `electron/preload/` | 安全橋接層(Context Bridge) |26| IPC | `electron/main/ipc-handlers.ts` | IPC 事件處理 |27| 業務邏輯 | `electron/main/` | 主程式服務 |2829## 注意事項3031- Preload 只能使用 `contextBridge.exposeInMainWorld` 暴露 API32- 主程序使用 `process.getBuiltinModule('node:...')` 取得 Node 內建模組33- 跨平台路徑比較前須正規化分隔符:`.replace(/\\/g, '/')`34
Also in qiuzhi2046/Qclaw
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 |
|---|---|---|---|---|---|
| qiuzhi2046/Qclaw.cursor/rules/git-workflow.mdc · 2.8k | Cursor rules | git | 65/100 | 3 days ago | |
| qiuzhi2046/Qclaw.cursor/rules/qclaw-project.mdc · 2.8k | Cursor rules | buildtest | 67/100 | 3 days ago |
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 | |
| 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 | |
| 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 | |
| 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 |
