# GitHub项目

本章为您介绍n8n工作流相关的重要GitHub项目和社区资源，帮助您更好地利用开源社区的力量来学习和开发。

## 官方项目

### 1. n8n核心项目

**仓库地址**: [https://github.com/n8n-io/n8n](https://github.com/n8n-io/n8n)

n8n的主要代码仓库，包含完整的平台源码。

#### 核心特性
- ⭐ 40,000+ Stars
- 🔧 TypeScript编写
- 🌐 支持400+节点集成
- 🎨 可视化工作流编辑器
- 🔒 企业级安全特性

#### 项目结构
```
n8n/
├── packages/
│   ├── cli/                  # CLI命令行工具
│   ├── core/                 # 核心执行引擎
│   ├── editor-ui/            # Web界面
│   ├── nodes-base/           # 内置节点
│   └── workflow/             # 工作流执行器
├── docker/                   # Docker配置
├── docs/                     # 文档
└── cypress/                  # E2E测试
```

#### 参与贡献
- 🐛 [报告Bug](https://github.com/n8n-io/n8n/issues)
- 💡 [功能请求](https://github.com/n8n-io/n8n/discussions)
- 🔧 [提交代码](https://github.com/n8n-io/n8n/blob/master/CONTRIBUTING.md)

### 2. n8n节点开发模板

**仓库地址**: [https://github.com/n8n-io/n8n-nodes-starter](https://github.com/n8n-io/n8n-nodes-starter)

官方提供的节点开发模板，包含完整的开发环境和示例代码。

#### 主要功能
- 📦 开箱即用的开发环境
- 🔧 TypeScript配置
- 🧪 测试框架集成
- 📝 详细的开发文档
- 🚀 构建和发布脚本

#### 快速开始
```bash
# 克隆模板
git clone https://github.com/n8n-io/n8n-nodes-starter.git my-n8n-node

# 安装依赖
cd my-n8n-node
npm install

# 开发模式
npm run dev
```

### 3. n8n文档项目

**仓库地址**: [https://github.com/n8n-io/n8n-docs](https://github.com/n8n-io/n8n-docs)

n8n官方文档的源码仓库，使用VitePress构建。

#### 文档结构
- 📚 用户指南
- 🔧 开发者文档
- 🎯 API参考
- 💡 最佳实践
- 📖 教程和示例

## 社区项目

### 1. n8n节点集合

#### n8n-nodes-langchain
**仓库地址**: [https://github.com/FlowiseAI/n8n-nodes-langchain](https://github.com/FlowiseAI/n8n-nodes-langchain)

集成LangChain框架的n8n节点，支持AI和大语言模型操作。

**功能特性**:
- 🤖 LLM集成节点
- 📝 文档处理和向量化
- 🔍 语义搜索功能
- 💬 对话链管理

#### n8n-nodes-browserless
**仓库地址**: [https://github.com/oneofftech/n8n-nodes-browserless](https://github.com/oneofftech/n8n-nodes-browserless)

浏览器自动化节点，支持网页截图、PDF生成等功能。

**功能特性**:
- 📸 网页截图
- 📄 PDF生成
- 🤖 网页自动化
- 🔍 数据抓取

#### n8n-nodes-supabase
**仓库地址**: [https://github.com/digital-boss/n8n-nodes-supabase](https://github.com/digital-boss/n8n-nodes-supabase)

Supabase数据库和认证服务的集成节点。

**功能特性**:
- 🗄️ 数据库操作
- 🔐 用户认证
- 📁 文件存储
- 🔄 实时订阅

### 2. 工作流模板库

#### n8n-workflows
**仓库地址**: [https://github.com/n8n-io/n8n-workflows](https://github.com/n8n-io/n8n-workflows)

社区贡献的工作流模板集合。

**分类**:
- 📧 邮件自动化
- 📊 数据处理
- 🔗 API集成
- 📱 社交媒体
- 💼 业务流程

#### awesome-n8n
**仓库地址**: [https://github.com/d3vx/awesome-n8n](https://github.com/d3vx/awesome-n8n)

n8n相关资源的精选列表。

**包含内容**:
- 🔧 有用的节点
- 📖 教程和指南
- 🎥 视频教程
- 🌐 社区资源
- 📱 移动应用

### 3. 开发工具

#### n8n-cli-tool
**仓库地址**: [https://github.com/digital-boss/n8n-cli-tool](https://github.com/digital-boss/n8n-cli-tool)

命令行工具，用于管理n8n工作流和节点。

**主要功能**:
- 🚀 快速部署工作流
- 📦 批量导入/导出
- 🔄 工作流同步
- 📊 执行监控

#### n8n-backup-tool
**仓库地址**: [https://github.com/burgil/n8n-backup-tool](https://github.com/burgil/n8n-backup-tool)

n8n数据备份和恢复工具。

**功能特性**:
- 💾 自动备份
- ⏰ 定时任务
- 📁 多存储支持
- 🔄 增量备份

## 行业特定项目

### 1. 电商自动化

#### n8n-shopify-automation
**仓库地址**: [https://github.com/shopify-partners/n8n-shopify-automation](https://github.com/shopify-partners/n8n-shopify-automation)

Shopify电商平台的自动化工作流模板。

**应用场景**:
- 📦 订单处理自动化
- 📧 客户邮件营销
- 📊 销售数据分析
- 🔄 库存管理

### 2. DevOps集成

#### n8n-devops-workflows
**仓库地址**: [https://github.com/devops-team/n8n-devops-workflows](https://github.com/devops-team/n8n-devops-workflows)

DevOps和CI/CD相关的工作流模板。

**功能包括**:
- 🚀 自动化部署
- 🔍 监控告警
- 📊 性能分析
- 🔧 环境管理

### 3. 数据科学

#### n8n-data-science
**仓库地址**: [https://github.com/data-scientists/n8n-data-science](https://github.com/data-scientists/n8n-data-science)

数据科学和机器学习相关的工作流。

**应用领域**:
- 📈 数据分析
- 🤖 机器学习
- 📊 可视化报告
- 🔄 ETL流程

## 学习资源

### 1. 教程项目

#### n8n-tutorial-series
**仓库地址**: [https://github.com/n8n-tutorials/beginner-series](https://github.com/n8n-tutorials/beginner-series)

循序渐进的n8n教程系列。

**教程内容**:
- 🎯 基础入门
- 🔧 进阶技巧
- 💼 实际案例
- 🚀 最佳实践

#### n8n-examples
**仓库地址**: [https://github.com/n8n-io/n8n-examples](https://github.com/n8n-io/n8n-examples)

官方提供的示例工作流集合。

**示例分类**:
- 📧 通知系统
- 🔄 数据同步
- 📊 报表生成
- 🤖 聊天机器人

### 2. 视频教程

#### n8n-video-tutorials
**仓库地址**: [https://github.com/n8n-community/video-tutorials](https://github.com/n8n-community/video-tutorials)

社区制作的视频教程资源。

**视频内容**:
- 🎥 基础操作演示
- 🔧 高级功能讲解
- 💡 实战案例分析
- 🚀 部署和运维

## 参与社区

### 1. 贡献代码

#### 如何贡献
1. **Fork项目**: 在GitHub上Fork相关项目
2. **创建分支**: 为您的功能创建新分支
3. **编写代码**: 实现功能并添加测试
4. **提交PR**: 创建Pull Request并描述变更
5. **代码审查**: 配合维护者进行代码审查

#### 贡献类型
- 🐛 修复Bug
- ✨ 新增功能
- 📝 改进文档
- 🧪 添加测试
- 🎨 UI优化

### 2. 分享工作流

#### n8n-community-workflows
**仓库地址**: [https://github.com/n8n-community/workflows](https://github.com/n8n-community/workflows)

社区工作流分享平台。

**分享步骤**:
1. 📝 编写工作流说明
2. 📋 准备配置文件
3. 📸 添加截图演示
4. 🚀 提交到社区

### 3. 创建节点

#### 节点开发指南
1. **需求分析**: 确定节点功能需求
2. **设计接口**: 定义输入输出参数
3. **编写代码**: 实现节点逻辑
4. **测试验证**: 编写单元测试
5. **发布分享**: 发布到npm或GitHub

#### 节点类型
- 🔌 API集成节点
- 🛠️ 数据处理节点
- 🔄 触发器节点
- 📊 分析节点

## 开发环境配置

### 1. 本地开发设置

```bash
# 克隆n8n源码
git clone https://github.com/n8n-io/n8n.git
cd n8n

# 安装依赖
npm install

# 构建项目
npm run build

# 启动开发服务器
npm run dev
```

### 2. 调试配置

#### VS Code配置
```json
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug n8n",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/packages/cli/bin/n8n",
      "args": ["start"],
      "console": "integratedTerminal",
      "env": {
        "NODE_ENV": "development"
      }
    }
  ]
}
```

### 3. 测试环境

```bash
# 运行单元测试
npm run test

# 运行E2E测试
npm run test:e2e

# 代码覆盖率
npm run test:coverage
```

## 最佳实践

### 1. 代码规范

- 📝 遵循TypeScript编码规范
- 🧪 编写完整的单元测试
- 📖 提供详细的文档说明
- 🔍 进行代码Review

### 2. 项目管理

- 📋 使用Issue追踪问题
- 🎯 设置清晰的里程碑
- 📝 维护更新日志
- 🚀 定期发布版本

### 3. 社区互动

- 💬 参与讨论和问答
- 📢 分享使用经验
- 🤝 协助新手入门
- 🌟 支持优秀项目

通过参与这些GitHub项目和社区活动，您不仅能够提升自己的n8n技能，还能为开源社区做出贡献，与全球开发者共同推动n8n生态的发展。
