Contributing
If you're interested in supporting Stump's development, and you know how to code, follow the steps outlined in the developer guide for information about setting up your development environment. If you want to improve Stump's language support, visit the Crowdin project page here (opens in a new tab).
Developer Guide
Contributions are very encouraged and welcome! Be sure to review the CONTRIBUTING.md (opens in a new tab) before getting started with your contribution.
If you're completely new to rust and/or web development, I put together a small set of resources to get you started with Stump.
Ensure you are on the develop
branch before continuing.
If you are on a Windows machine, you will need Visual C++ (opens in a new tab) installed on your system.
If you are on a Mac with Apple Silicon, you will need to install Rosetta (opens in a new tab).
You need to install yarn (opens in a new tab), rust (opens in a new tab), and node (opens in a new tab). Additionally, if you want to run any of the dev scripts on the rust side of things, you'll need to install cargo-watch (opens in a new tab). Afterwards, run the following:
yarn run setup
This will install the project dependencies, build the frontend bundle (required for server to start), generate the prisma client, and create the sqlite database.
Running Stump
I use yarn workspaces (opens in a new tab) and cargo workspaces (opens in a new tab):
# run the webapp + server
yarn dev:web
# run the desktop app + server
yarn start:desktop
# run the docs website
yarn docs dev
Or cargo
for the server:
cargo run --package stump_server --bin stump_server
Notes and Tips
Stump has gotten quite large and complex, so I've put together a few notes and tips to help you get started.
Where to start?
If you aren't sure what to work on, I recommend taking a look at some of the open issues (opens in a new tab) on GitHub. You can also reach out to me on Discord (opens in a new tab), or an open GitHub issue, if you have any questions.
In general, some good places to start might be:
- Translation (opens in a new tab), so Stump is accessible to non-English speakers.
- Implementing a comprehensive test suite for both the Rust
core
andserver
. - Designing and/or implementing UI elements.
- Docker build optimizations and caching strategies.
- CI pipelines / workflows.
- And lots more!
Code Style, Formatting, and Linting
Stump is developed using primarily Rust (opens in a new tab) and TypeScript (opens in a new tab).
For Rust, I use rustfmt (opens in a new tab) for formatting, and clippy (opens in a new tab) for linting. For TypeScript, I use Prettier (opens in a new tab) for formatting, and ESLint (opens in a new tab) for linting. While I definitely recommend using these tools as you develop, there is a pre-commit hook that will lint and format your code before committing.
I also want to point out that this repository uses 4 tab spaces for indentation. This is primarily for accessibility, as well as to be consistent with the Rust codebase. If you'd like, you can configure your editor to render whatever indentation you prefer, even though the raw code will be as described above. I personally maintain the 4 tab space rendering on the Rust side and shorten it to only render 2 on the frontend side.
Component Library
Stump has a custom component library used throughout the browser
package (the web UI and desktop app). This library can be found at packages/components
, and was developed with Storybook in mind. For getting started building out designs and components in Stump, I highly recommend going through the stories available in the Storybook UI:
yarn storybook
This will give you a good idea of what components are available and how they can be used.
Developer Resources
Below is a list of resources that I've found helpful in developing Stump. I'll try to keep this list up to date as I find new resources.
- Rust Book (opens in a new tab)
- Axum documentation (opens in a new tab)
- Prisma Client Rust Documentation (opens in a new tab)
- OPDS specification (opens in a new tab)
- OPDS Page Streaming (opens in a new tab)
- Getting started with React (opens in a new tab)
- Tailwind CSS (opens in a new tab)
Translations
If you'd like to help translate Stump into other languages, you can do so here (opens in a new tab). You can do as little or as much as you'd like at a time! If you don't see your language listed, feel free to reach out to me on Discord (opens in a new tab) or open a GitHub issue.
Financial Contributions
If you'd like to support the project financially, you can do so using any of the following platforms: