Skip to content

Commit 4c1ad40

Browse files
authored
docs: format all md files (langgenius#24195)
Signed-off-by: yihong0618 <[email protected]>
1 parent 52857eb commit 4c1ad40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1032
-969
lines changed

.devcontainer/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
11
# Development with devcontainer
2+
23
This project includes a devcontainer configuration that allows you to open the project in a container with a fully configured development environment.
34
Both frontend and backend environments are initialized when the container is started.
5+
46
## GitHub Codespaces
7+
58
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/langgenius/dify)
69

710
you can simply click the button above to open this project in GitHub Codespaces.
811

912
For more info, check out the [GitHub documentation](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace#creating-a-codespace).
1013

11-
1214
## VS Code Dev Containers
15+
1316
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/langgenius/dify)
1417

1518
if you have VS Code installed, you can click the button above to open this project in VS Code Dev Containers.
1619

1720
You can learn more in the [Dev Containers documentation](https://code.visualstudio.com/docs/devcontainers/containers).
1821

19-
2022
## Pros of Devcontainer
23+
2124
Unified Development Environment: By using devcontainers, you can ensure that all developers are developing in the same environment, reducing the occurrence of "it works on my machine" type of issues.
2225

2326
Quick Start: New developers can set up their development environment in a few simple steps, without spending a lot of time on environment configuration.
2427

2528
Isolation: Devcontainers isolate your project from your host operating system, reducing the chance of OS updates or other application installations impacting the development environment.
2629

2730
## Cons of Devcontainer
31+
2832
Learning Curve: For developers unfamiliar with Docker and VS Code, using devcontainers may be somewhat complex.
2933

3034
Performance Impact: While usually minimal, programs running inside a devcontainer may be slightly slower than those running directly on the host.
3135

3236
## Troubleshooting
37+
3338
if you see such error message when you open this project in codespaces:
3439
![Alt text](troubleshooting.png)
3540

.github/CODE_OF_CONDUCT.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,25 @@ diverse, inclusive, and healthy community.
1717
Examples of behavior that contributes to a positive environment for our
1818
community include:
1919

20-
* Demonstrating empathy and kindness toward other people
21-
* Being respectful of differing opinions, viewpoints, and experiences
22-
* Giving and gracefully accepting constructive feedback
23-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2424
and learning from the experience
25-
* Focusing on what is best not just for us as individuals, but for the
25+
- Focusing on what is best not just for us as individuals, but for the
2626
overall community
2727

2828
Examples of unacceptable behavior include:
2929

30-
* The use of sexualized language or imagery, and sexual attention or
30+
- The use of sexualized language or imagery, and sexual attention or
3131
advances of any kind
32-
* Trolling, insulting or derogatory comments, and personal or political attacks
33-
* Public or private harassment
34-
* Publishing others' private information, such as a physical or email
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email
3535
address, without their explicit permission
36-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3737
professional setting
3838

3939
## Language Policy
4040

4141
To facilitate clear and effective communication, all discussions, comments, documentation, and pull requests in this project should be conducted in English. This ensures that all contributors can participate and collaborate effectively.
42-
43-

.github/pull_request_template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
> [!IMPORTANT]
22
>
33
> 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md)
4-
> 2. Ensure there is an associated issue and you have been assigned to it
5-
> 3. Use the correct syntax to link this PR: `Fixes #<issue number>`.
4+
> 1. Ensure there is an associated issue and you have been assigned to it
5+
> 1. Use the correct syntax to link this PR: `Fixes #<issue number>`.
66
77
## Summary
88

@@ -12,7 +12,7 @@
1212

1313
| Before | After |
1414
|--------|-------|
15-
| ... | ... |
15+
| ... | ... |
1616

1717
## Checklist
1818

.vscode/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ This `launch.json.template` file provides various debug configurations for the D
44

55
## How to Use
66

7-
1. **Create `launch.json`**: If you don't have one, create a file named `launch.json` inside the `.vscode` directory.
8-
2. **Copy Content**: Copy the entire content from `launch.json.template` into your newly created `launch.json` file.
9-
3. **Select Debug Configuration**: Go to the Run and Debug view in VS Code / Cursor (Ctrl+Shift+D or Cmd+Shift+D).
10-
4. **Start Debugging**: Select the desired configuration from the dropdown menu and click the green play button.
7+
1. **Create `launch.json`**: If you don't have one, create a file named `launch.json` inside the `.vscode` directory.
8+
1. **Copy Content**: Copy the entire content from `launch.json.template` into your newly created `launch.json` file.
9+
1. **Select Debug Configuration**: Go to the Run and Debug view in VS Code / Cursor (Ctrl+Shift+D or Cmd+Shift+D).
10+
1. **Start Debugging**: Select the desired configuration from the dropdown menu and click the green play button.
1111

1212
## Tips
1313

CLAUDE.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
77
Dify is an open-source platform for developing LLM applications with an intuitive interface combining agentic AI workflows, RAG pipelines, agent capabilities, and model management.
88

99
The codebase consists of:
10+
1011
- **Backend API** (`/api`): Python Flask application with Domain-Driven Design architecture
1112
- **Frontend Web** (`/web`): Next.js 15 application with TypeScript and React 19
1213
- **Docker deployment** (`/docker`): Containerized deployment configurations
@@ -46,18 +47,21 @@ pnpm test # Run Jest tests
4647
## Testing Guidelines
4748

4849
### Backend Testing
50+
4951
- Use `pytest` for all backend tests
5052
- Write tests first (TDD approach)
5153
- Test structure: Arrange-Act-Assert
5254

5355
## Code Style Requirements
5456

5557
### Python
58+
5659
- Use type hints for all functions and class attributes
5760
- No `Any` types unless absolutely necessary
5861
- Implement special methods (`__repr__`, `__str__`) appropriately
5962

60-
### TypeScript/JavaScript
63+
### TypeScript/JavaScript
64+
6165
- Strict TypeScript configuration
6266
- ESLint with Prettier integration
6367
- Avoid `any` type
@@ -73,10 +77,11 @@ pnpm test # Run Jest tests
7377
## Common Development Tasks
7478

7579
### Adding a New API Endpoint
80+
7681
1. Create controller in `/api/controllers/`
77-
2. Add service logic in `/api/services/`
78-
3. Update routes in controller's `__init__.py`
79-
4. Write tests in `/api/tests/`
82+
1. Add service logic in `/api/services/`
83+
1. Update routes in controller's `__init__.py`
84+
1. Write tests in `/api/tests/`
8085

8186
## Project-Specific Conventions
8287

CONTRIBUTING.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ Don't forget to link an existing issue or open a new issue in the PR's descripti
3434

3535
How we prioritize:
3636

37-
| Issue Type | Priority |
38-
| ------------------------------------------------------------ | --------------- |
39-
| Bugs in core functions (cloud service, cannot login, applications not working, security loopholes) | Critical |
40-
| Non-critical bugs, performance boosts | Medium Priority |
41-
| Minor fixes (typos, confusing but working UI) | Low Priority |
37+
| Issue Type | Priority |
38+
| ------------------------------------------------------------ | --------------- |
39+
| Bugs in core functions (cloud service, cannot login, applications not working, security loopholes) | Critical |
40+
| Non-critical bugs, performance boosts | Medium Priority |
41+
| Minor fixes (typos, confusing but working UI) | Low Priority |
4242

4343
### Feature requests
4444

@@ -52,23 +52,25 @@ How we prioritize:
5252

5353
How we prioritize:
5454

55-
| Feature Type | Priority |
56-
| ------------------------------------------------------------ | --------------- |
57-
| High-Priority Features as being labeled by a team member | High Priority |
58-
| Popular feature requests from our [community feedback board](https://github.com/langgenius/dify/discussions/categories/feedbacks) | Medium Priority |
59-
| Non-core features and minor enhancements | Low Priority |
60-
| Valuable but not immediate | Future-Feature |
55+
| Feature Type | Priority |
56+
| ------------------------------------------------------------ | --------------- |
57+
| High-Priority Features as being labeled by a team member | High Priority |
58+
| Popular feature requests from our [community feedback board](https://github.com/langgenius/dify/discussions/categories/feedbacks) | Medium Priority |
59+
| Non-core features and minor enhancements | Low Priority |
60+
| Valuable but not immediate | Future-Feature |
61+
6162
## Submitting your PR
6263

6364
### Pull Request Process
6465

6566
1. Fork the repository
66-
2. Before you draft a PR, please create an issue to discuss the changes you want to make
67-
3. Create a new branch for your changes
68-
4. Please add tests for your changes accordingly
69-
5. Ensure your code passes the existing tests
70-
6. Please link the issue in the PR description, `fixes #<issue_number>`
71-
7. Get merged!
67+
1. Before you draft a PR, please create an issue to discuss the changes you want to make
68+
1. Create a new branch for your changes
69+
1. Please add tests for your changes accordingly
70+
1. Ensure your code passes the existing tests
71+
1. Please link the issue in the PR description, `fixes #<issue_number>`
72+
1. Get merged!
73+
7274
### Setup the project
7375

7476
#### Frontend
@@ -82,12 +84,14 @@ For setting up the backend service, kindly refer to our detailed [instructions](
8284
#### Other things to note
8385

8486
We recommend reviewing this document carefully before proceeding with the setup, as it contains essential information about:
87+
8588
- Prerequisites and dependencies
8689
- Installation steps
8790
- Configuration details
8891
- Common troubleshooting tips
8992

9093
Feel free to reach out if you encounter any issues during the setup process.
94+
9195
## Getting Help
9296

9397
If you ever get stuck or get a burning question while contributing, simply shoot your queries our way via the related GitHub issue, or hop onto our [Discord](https://discord.gg/8Tpq4AcN9c) for a quick chat.

CONTRIBUTING_CN.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@
3434

3535
优先级划分:
3636

37-
| 问题类型 | 优先级 |
38-
| -------------------------------------------------- | ---------- |
39-
| 核心功能 bug(云服务、登录失败、应用无法使用、安全漏洞) | 紧急 |
40-
| 非关键 bug、性能优化 | 中等优先级 |
41-
| 小修复(拼写错误、界面混乱但可用) | 低优先级 |
42-
37+
| 问题类型 | 优先级 |
38+
| -------------------------------------------------- | ---------- |
39+
| 核心功能 bug(云服务、登录失败、应用无法使用、安全漏洞) | 紧急 |
40+
| 非关键 bug、性能优化 | 中等优先级 |
41+
| 小修复(拼写错误、界面混乱但可用) | 低优先级 |
4342

4443
### 功能请求
4544

@@ -53,12 +52,12 @@
5352

5453
优先级划分:
5554

56-
| 功能类型 | 优先级 |
57-
| -------------------------------------------------- | ---------- |
58-
| 被团队成员标记为高优先级的功能 | 高优先级 |
59-
| 来自[社区反馈板](https://github.com/langgenius/dify/discussions/categories/feedbacks)的热门功能请求 | 中等优先级 |
60-
| 非核心功能和小改进 | 低优先级 |
61-
| 有价值但非紧急的功能 | 未来特性 |
55+
| 功能类型 | 优先级 |
56+
| -------------------------------------------------- | ---------- |
57+
| 被团队成员标记为高优先级的功能 | 高优先级 |
58+
| 来自[社区反馈板](https://github.com/langgenius/dify/discussions/categories/feedbacks)的热门功能请求 | 中等优先级 |
59+
| 非核心功能和小改进 | 低优先级 |
60+
| 有价值但非紧急的功能 | 未来特性 |
6261

6362
## 提交 PR
6463

@@ -67,12 +66,12 @@
6766
### PR 提交流程
6867

6968
1. Fork 本仓库
70-
2. 在提交 PR 之前,请先创建 issue 讨论你想要做的修改
71-
3. 为你的修改创建一个新的分支
72-
4. 请为你的修改添加相应的测试
73-
5. 确保你的代码能通过现有的测试
74-
6. 请在 PR 描述中关联相关 issue,格式为 `fixes #<issue编号>`
75-
7. 等待合并!
69+
1. 在提交 PR 之前,请先创建 issue 讨论你想要做的修改
70+
1. 为你的修改创建一个新的分支
71+
1. 请为你的修改添加相应的测试
72+
1. 确保你的代码能通过现有的测试
73+
1. 请在 PR 描述中关联相关 issue,格式为 `fixes #<issue编号>`
74+
1. 等待合并!
7675

7776
#### 前端
7877

@@ -85,6 +84,7 @@
8584
#### 其他注意事项
8685

8786
我们建议在开始设置之前仔细阅读本文档,因为它包含以下重要信息:
87+
8888
- 前置条件和依赖项
8989
- 安装步骤
9090
- 配置细节

CONTRIBUTING_DE.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ Vergessen Sie nicht, in der PR-Beschreibung ein bestehendes Issue zu verlinken o
3232

3333
Unsere Priorisierung:
3434

35-
| Fehlertyp | Priorität |
36-
| ------------------------------------------------------------ | --------------- |
37-
| Fehler in Kernfunktionen (Cloud-Service, Login nicht möglich, Anwendungen funktionieren nicht, Sicherheitslücken) | Kritisch |
38-
| Nicht-kritische Fehler, Leistungsverbesserungen | Mittlere Priorität |
39-
| Kleinere Korrekturen (Tippfehler, verwirrende aber funktionierende UI) | Niedrige Priorität |
35+
| Fehlertyp | Priorität |
36+
| ------------------------------------------------------------ | --------------- |
37+
| Fehler in Kernfunktionen (Cloud-Service, Login nicht möglich, Anwendungen funktionieren nicht, Sicherheitslücken) | Kritisch |
38+
| Nicht-kritische Fehler, Leistungsverbesserungen | Mittlere Priorität |
39+
| Kleinere Korrekturen (Tippfehler, verwirrende aber funktionierende UI) | Niedrige Priorität |
4040

4141
### Feature-Anfragen
4242

@@ -50,24 +50,24 @@ Unsere Priorisierung:
5050

5151
Unsere Priorisierung:
5252

53-
| Feature-Typ | Priorität |
54-
| ------------------------------------------------------------ | --------------- |
55-
| Hochprioritäre Features (durch Teammitglied gekennzeichnet) | Hohe Priorität |
56-
| Beliebte Feature-Anfragen aus unserem [Community-Feedback-Board](https://github.com/langgenius/dify/discussions/categories/feedbacks) | Mittlere Priorität |
57-
| Nicht-Kernfunktionen und kleinere Verbesserungen | Niedrige Priorität |
58-
| Wertvoll, aber nicht dringend | Zukunfts-Feature |
53+
| Feature-Typ | Priorität |
54+
| ------------------------------------------------------------ | --------------- |
55+
| Hochprioritäre Features (durch Teammitglied gekennzeichnet) | Hohe Priorität |
56+
| Beliebte Feature-Anfragen aus unserem [Community-Feedback-Board](https://github.com/langgenius/dify/discussions/categories/feedbacks) | Mittlere Priorität |
57+
| Nicht-Kernfunktionen und kleinere Verbesserungen | Niedrige Priorität |
58+
| Wertvoll, aber nicht dringend | Zukunfts-Feature |
5959

6060
## Einreichen Ihres PRs
6161

6262
### Pull-Request-Prozess
6363

6464
1. Repository forken
65-
2. Vor dem Erstellen eines PRs bitte ein Issue zur Diskussion der Änderungen erstellen
66-
3. Einen neuen Branch für Ihre Änderungen erstellen
67-
4. Tests für Ihre Änderungen hinzufügen
68-
5. Sicherstellen, dass Ihr Code die bestehenden Tests besteht
69-
6. Issue in der PR-Beschreibung verlinken (`fixes #<issue_number>`)
70-
7. Auf den Merge warten!
65+
1. Vor dem Erstellen eines PRs bitte ein Issue zur Diskussion der Änderungen erstellen
66+
1. Einen neuen Branch für Ihre Änderungen erstellen
67+
1. Tests für Ihre Änderungen hinzufügen
68+
1. Sicherstellen, dass Ihr Code die bestehenden Tests besteht
69+
1. Issue in der PR-Beschreibung verlinken (`fixes #<issue_number>`)
70+
1. Auf den Merge warten!
7171

7272
### Projekt einrichten
7373

@@ -82,6 +82,7 @@ Für die Einrichtung des Backend-Service folgen Sie bitte unseren detaillierten
8282
#### Weitere Hinweise
8383

8484
Wir empfehlen, dieses Dokument sorgfältig zu lesen, da es wichtige Informationen enthält über:
85+
8586
- Voraussetzungen und Abhängigkeiten
8687
- Installationsschritte
8788
- Konfigurationsdetails
@@ -92,4 +93,3 @@ Bei Problemen während der Einrichtung können Sie sich gerne an uns wenden.
9293
## Hilfe bekommen
9394

9495
Wenn Sie beim Mitwirken Fragen haben oder nicht weiterkommen, stellen Sie Ihre Fragen einfach im entsprechenden GitHub Issue oder besuchen Sie unseren [Discord](https://discord.gg/8Tpq4AcN9c) für einen schnellen Austausch.
95-

0 commit comments

Comments
 (0)