> ## Documentation Index
> Fetch the complete documentation index at: https://gnero.genetind.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Electron + React + TypeScript

> Electron 桌面应用 + React 前端的全栈编码规范模板

适用于 Electron 应用 + React 前端 + TypeScript 的完整编码规范模板。

<Card title="下载模板" icon="download" href="https://download-directory.github.io/?url=https://github.com/mindfold-ai/docs/tree/main/marketplace/specs/electron-fullstack">
  下载 ZIP 并解压到 `.trellis/spec/`
</Card>

## 包含内容

| 分类 | 文件数  | 覆盖范围                |
| -- | ---- | ------------------- |
| 前端 | 11 个 | 组件、Hooks、状态、IPC、CSS |
| 后端 | 14 个 | API 模式、数据库、错误处理     |
| 指南 | 8 个  | 跨层思考、调试方法           |
| 共享 | 6 个  | TypeScript、Git、代码质量 |

## 模板结构

```
spec/
├── frontend/
│   ├── index.md
│   ├── components.md
│   ├── hooks.md
│   ├── state-management.md
│   ├── ipc-electron.md
│   └── ...
│
├── backend/
│   ├── index.md
│   ├── api-patterns.md
│   ├── database.md
│   ├── error-handling.md
│   └── ...
│
├── guides/
│   ├── cross-layer-thinking-guide.md
│   ├── bug-root-cause-thinking-guide.md
│   └── ...
│
├── shared/
│   ├── typescript.md
│   ├── git-conventions.md
│   └── ...
│
└── README.md
```

## 主要内容

### 前端

* React 组件模式和 Hooks
* Electron IPC 通信
* Zustand 状态管理
* CSS 设计系统

### 后端

* API 模块结构
* SQLite 数据库模式
* 错误处理和日志
* macOS 权限处理

### 指南

* 全栈变更的跨层思考
* Bug 根因分析
* 数据库 Schema 迁移

## 使用方法

1. 下载 ZIP 文件
2. 解压到项目的 `.trellis/spec/` 目录
3. 按你项目的具体规范修改
4. 删掉不适用的部分
5. 更新示例以匹配你的代码库

<Card title="在 GitHub 上查看" icon="github" href="https://github.com/mindfold-ai/docs/tree/main/marketplace/specs/electron-fullstack">
  浏览模板源码
</Card>
