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.
Developer Guide
Contributions are very encouraged and welcome! Be sure to review the CONTRIBUTING.md 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++ installed on your system.
If you are on a Mac with Apple Silicon, you will need to install Rosetta.
You need to install yarn, rust, and node. Additionally, if you want to run any of the dev scripts on the rust side of things, you’ll need to install cargo-watch. 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 and cargo workspaces:
# 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 on GitHub. You can also reach out to me on Discord, or an open GitHub issue, if you have any questions.
In general, some good places to start might be:
- Translation, 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 and TypeScript.
For Rust, I use rustfmt for formatting, and clippy for linting. For TypeScript, I use Prettier for formatting, and ESLint 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
- Axum documentation
- Prisma Client Rust Documentation
- OPDS specification
- OPDS Page Streaming
- Getting started with React
- Tailwind CSS
Translations
If you’d like to help translate Stump into other languages, you can do so here. 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 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: