Skip to content

Contributing

If you are interested in contributing to Cloudreve, please refer to this chapter to get started. It should be noted that Cloudreve is released under a dual-license strategy. The community edition is released under GPL-3.0, while the Pro edition uses a proprietary license. We only accept contributions to the community edition, and contributors need to sign the CLA before merging a PR.

Project Structure

The main repository of Cloudreve is cloudreve/cloudreve, which includes the frontend repository cloudreve/frontend as a git submodule.

Start Developing

Development Environment

Please refer to the Build from source section to install the required tools.

Clone Repository

bash
git clone --recurse-submodules https://github.com/cloudreve/cloudreve.git
cd cloudreve

Start Backend

bash
# Before the first start, install dependencies
go mod download

# Start the backend
go run main.go

If you need to pass command line arguments:

bash
go run main.go -c /path/to/conf.ini

Since the frontend static assets are not embedded, after the backend starts, http://localhost:5212 can only provide API services. In a typical development workflow, you also need to start the frontend dev server to access the local site.

Start Frontend

Keep the backend server running, and execute the following commands in another terminal:

bash
cd frontend
yarn install
yarn run dev

After the dev server starts, you can access the site at http://localhost:5173. By default, all API requests will be forwarded to http://localhost:5212. You can modify this in vite.config.ts.

Select a Task

In Cloudreve's issues, filter for issues with the Backlog label. These are tasks waiting to be claimed. After choosing a task, leave a comment in the issue to indicate that you will claim it, and assign the issue to yourself.

For newcomers, we recommend choosing issues labeled with good first issue.

Propose a New Task

If you have a new task idea, create a new issue in issues, describe your idea and implementation plan in detail, and assign it to yourself. Please wait for other developers to confirm your idea before you start development.

Submit a PR

After completing the task, you can submit a PR to the cloudreve/cloudreve and cloudreve/frontend repositories. After the PR is submitted, a bot will guide you to sign the CLA.

Discussion

You can discuss task details or get support in the development channel of our Discord community.