You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+51-115
Original file line number
Diff line number
Diff line change
@@ -10,148 +10,84 @@ In terms of licensing, please take a minute to read our short [License and Contr
10
10
11
11
## Before you jump in
12
12
13
-
[Find](https://github.com/langgenius/dify/issues?q=is:issue+is:open) an existing issue, or [open](https://github.com/langgenius/dify/issues/new/choose) a new one. We categorize issues into 2 types:
13
+
Looking for something to tackle? Browse our [good first issues](https://github.com/langgenius/dify/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22) and pick one to get started!
14
14
15
-
### Feature requests
16
-
17
-
* If you're opening a new feature request, we'd like you to explain what the proposed feature achieves, and include as much context as possible. [@perzeusss](https://github.com/perzeuss) has made a solid [Feature Request Copilot](https://udify.app/chat/MK2kVSnw1gakVwMX) that helps you draft out your needs. Feel free to give it a try.
18
-
19
-
* If you want to pick one up from the existing issues, simply drop a comment below it saying so.
15
+
Got a cool new model runtime or tool to add? Open a PR in our [plugin repo](https://github.com/langgenius/dify-plugins) and show us what you've built.
20
16
21
-
A team member working in the related direction will be looped in. If all looks good, they will give the go-ahead for you to start coding. We ask that you hold off working on the feature until then, so none of your work goes to waste should we propose changes.
17
+
Need to update an existing model runtime, tool, or squash some bugs? Head over to our [official plugin repo](https://github.com/langgenius/dify-official-plugins) and make your magic happen!
22
18
23
-
Depending on whichever area the proposed feature falls under, you might talk to different team members. Here's rundown of the areas each our team members are working on at the moment:
19
+
Join the fun, contribute, and let's build something awesome together! 💡✨
*[Python](https://www.python.org/) version 3.11.x or 3.12.x
78
-
79
-
### 4. Installations
80
-
81
-
Dify is composed of a backend and a frontend. Navigate to the backend directory by `cd api/`, then follow the [Backend README](api/README.md) to install it. In a separate terminal, navigate to the frontend directory by `cd web/`, then follow the [Frontend README](web/README.md) to install.
82
-
83
-
Check the [installation FAQ](https://docs.dify.ai/learn-more/faq/install-faq) for a list of common issues and steps to troubleshoot.
84
-
85
-
### 5. Visit dify in your browser
86
-
87
-
To validate your set up, head over to [http://localhost:3000](http://localhost:3000) (the default, or your self-configured URL and port) in your browser. You should now see Dify up and running.
88
-
89
-
## Developing
43
+
### Feature requests
90
44
91
-
If you are adding a model provider, [this guide](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/README.md) is for you.
45
+
> [!NOTE]
46
+
> Please make sure to include the following information when submitting a feature request:
92
47
93
-
If you are adding a tool provider to Agent or Workflow, [this guide](./api/core/tools/README.md) is for you.
48
+
- A clear and descriptive title
49
+
- A detailed description of the feature
50
+
- A use case for the feature
51
+
- Any other context or screenshots about the feature request
94
52
95
-
To help you quickly navigate where your contribution fits, a brief, annotated outline of Dify's backend & frontend is as follows:
| 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
+
## Submitting your PR
98
62
99
-
Dify’s backend is written in Python using [Flask](https://flask.palletsprojects.com/en/3.0.x/). It uses [SQLAlchemy](https://www.sqlalchemy.org/) for ORM and [Celery](https://docs.celeryq.dev/en/stable/getting-started/introduction.html) for task queueing. Authorization logic goes via Flask-login.
63
+
### Pull Request Process
100
64
101
-
```text
102
-
[api/]
103
-
├── constants // Constant settings used throughout code base.
104
-
├── controllers // API route definitions and request handling logic.
105
-
├── core // Core application orchestration, model integrations, and tools.
106
-
├── docker // Docker & containerization related configurations.
107
-
├── events // Event handling and processing
108
-
├── extensions // Extensions with 3rd party frameworks/platforms.
109
-
├── fields // field definitions for serialization/marshalling.
├── tasks // Handling of async tasks and background jobs.
116
-
└── tests
117
-
```
65
+
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 merrged!
72
+
### Setup the project
118
73
119
-
### Frontend
74
+
####Frontend
120
75
121
-
The website is bootstrapped on [Next.js](https://nextjs.org/) boilerplate in Typescript and uses [Tailwind CSS](https://tailwindcss.com/) for styling. [React-i18next](https://react.i18next.com/) is used for internationalization.
76
+
For setting up the frontend service, please refer to our comprehensive [guide](https://github.com/langgenius/dify/blob/main/web/README.md) in the `web/README.md` file. This document provides detailed instructions to help you set up the frontend environment properly.
122
77
123
-
```text
124
-
[web/]
125
-
├── app // layouts, pages, and components
126
-
│ ├── (commonLayout) // common layout used throughout the app
127
-
│ ├── (shareLayout) // layouts specifically shared across token-specific sessions
128
-
│ ├── activate // activate page
129
-
│ ├── components // shared by pages and layouts
130
-
│ ├── install // install page
131
-
│ ├── signin // signin page
132
-
│ └── styles // globally shared styles
133
-
├── assets // Static assets
134
-
├── bin // scripts ran at build step
135
-
├── config // adjustable settings and options
136
-
├── context // shared contexts used by different portions of the app
├── models // describes data models & shapes of API responses
142
-
├── public // meta assets like favicon
143
-
├── service // specifies shapes of API actions
144
-
├── test
145
-
├── types // descriptions of function params and return values
146
-
└── utils // Shared utility functions
147
-
```
78
+
#### Backend
148
79
149
-
## Submitting your PR
80
+
For setting up the backend service, kindly refer to our detailed [instructions](https://github.com/langgenius/dify/blob/main/api/README.md) in the `api/README.md` file. This document contains step-by-step guidance to help you get the backend up and running smoothly.
150
81
151
-
At last, time to open a pull request (PR) to our repo. For major features, we first merge them into the `deploy/dev` branch for testing, before they go into the `main` branch. If you run into issues like merge conflicts or don't know how to open a pull request, check out [GitHub's pull request tutorial](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests).
82
+
#### Other things to note
152
83
153
-
And that's it! Once your PR is merged, you will be featured as a contributor in our [README](https://github.com/langgenius/dify/blob/main/README.md).
84
+
We recommend reviewing this document carefully before proceeding with the setup, as it contains essential information about:
85
+
- Prerequisites and dependencies
86
+
- Installation steps
87
+
- Configuration details
88
+
- Common troubleshooting tips
154
89
90
+
Feel free to reach out if you encounter any issues during the setup process.
155
91
## Getting Help
156
92
157
93
If you ever get stuck or got 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.
0 commit comments