Skip to content

Commit 41dff17

Browse files
authored
Chore/update contributing (langgenius#16078)
1 parent d339403 commit 41dff17

6 files changed

+362
-721
lines changed

CONTRIBUTING.md

+51-115
Original file line numberDiff line numberDiff line change
@@ -10,148 +10,84 @@ In terms of licensing, please take a minute to read our short [License and Contr
1010

1111
## Before you jump in
1212

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!
1414

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.
2016

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!
2218

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! 💡✨
2420

25-
| Member | Scope |
26-
| ------------------------------------------------------------ | ---------------------------------------------------- |
27-
| [@yeuoly](https://github.com/Yeuoly) | Architecting Agents |
28-
| [@jyong](https://github.com/JohnJyong) | RAG pipeline design |
29-
| [@GarfieldDai](https://github.com/GarfieldDai) | Building workflow orchestrations |
30-
| [@iamjoel](https://github.com/iamjoel) & [@zxhlyh](https://github.com/zxhlyh) | Making our frontend a breeze to use |
31-
| [@guchenhe](https://github.com/guchenhe) & [@crazywoola](https://github.com/crazywoola) | Developer experience, points of contact for anything |
32-
| [@takatost](https://github.com/takatost) | Overall product direction and architecture |
21+
Don't forget to link an existing issue or open an new issue in the PR's description.
3322

34-
How we prioritize:
23+
### Bug reports
3524

36-
| Feature Type | Priority |
37-
| ------------------------------------------------------------ | --------------- |
38-
| High-Priority Features as being labeled by a team member | High Priority |
39-
| Popular feature requests from our [community feedback board](https://github.com/langgenius/dify/discussions/categories/feedbacks) | Medium Priority |
40-
| Non-core features and minor enhancements | Low Priority |
41-
| Valuable but not immediate | Future-Feature |
25+
> [!IMPORTANT]
26+
> Please make sure to include the following information when submitting a bug report:
4227
43-
### Anything else (e.g. bug report, performance optimization, typo correction)
28+
- A clear and descriptive title
29+
- A detailed description of the bug, including any error messages
30+
- Steps to reproduce the bug
31+
- Expected behavior
32+
- **Logs**, if available, for backend issues, this is really important, you can find them in docker-compose logs
33+
- Screenshots or videos, if applicable
4434

45-
* Start coding right away.
46-
47-
How we prioritize:
35+
How we prioritize:
4836

4937
| Issue Type | Priority |
5038
| ------------------------------------------------------------ | --------------- |
51-
| Bugs in core functions (cannot login, applications not working, security loopholes) | Critical |
39+
| Bugs in core functions (cloud service, cannot login, applications not working, security loopholes) | Critical |
5240
| Non-critical bugs, performance boosts | Medium Priority |
5341
| Minor fixes (typos, confusing but working UI) | Low Priority |
5442

55-
## Installing
56-
57-
Here are the steps to set up Dify for development:
58-
59-
### 1. Fork this repository
60-
61-
### 2. Clone the repo
62-
63-
Clone the forked repository from your terminal:
64-
65-
```shell
66-
git clone [email protected]:<github_username>/dify.git
67-
```
68-
69-
### 3. Verify dependencies
70-
71-
Dify requires the following dependencies to build, make sure they're installed on your system:
72-
73-
* [Docker](https://www.docker.com/)
74-
* [Docker Compose](https://docs.docker.com/compose/install/)
75-
* [Node.js v18.x (LTS)](http://nodejs.org)
76-
* [pnpm](https://pnpm.io/)
77-
* [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
9044

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:
9247
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
9452

95-
To help you quickly navigate where your contribution fits, a brief, annotated outline of Dify's backend & frontend is as follows:
53+
How we prioritize:
9654

97-
### Backend
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+
## Submitting your PR
9862

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
10064

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.
110-
├── libs // Reusable libraries and helpers.
111-
├── migrations // Scripts for database migration.
112-
├── models // Database models & schema definitions.
113-
├── services // Specifies business logic.
114-
├── storage // Private key storage.
115-
├── 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
11873

119-
### Frontend
74+
#### Frontend
12075

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.
12277

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
137-
├── dictionaries // Language-specific translate files
138-
├── docker // container configurations
139-
├── hooks // Reusable hooks
140-
├── i18n // Internationalization configuration
141-
├── 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
14879

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.
15081

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
15283

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
15489

90+
Feel free to reach out if you encounter any issues during the setup process.
15591
## Getting Help
15692

15793
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

Comments
 (0)