Thank you for your interest in contributing to Streamarr! We welcome contributions from everyone. This guide will help you get started.
By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing.
-
Fork the repository on GitHub and clone your fork:
git clone https://github.com/<your-username>/streamarr.git cd streamarr
-
Install dependencies:
yarn install
-
Set up the config directory:
Streamarr uses a
config/directory for settings, database, and logs. One will be created automatically on first run. -
Start the development server:
yarn dev
This starts the Node.js server with hot reloading via
nodemon. The app will be available athttp://localhost:3000.To also start the Python Plex invite service (in a separate terminal):
yarn start:python
-
Verify everything works:
yarn typecheck # TypeScript type checking yarn lint # ESLint yarn css-lint # Stylelint
- The
developbranch is the primary development branch. - Create feature branches from
developusing a descriptive name:feat/my-new-featurefix/issue-descriptiondocs/update-readme
-
Create a new branch from
develop:git checkout develop git pull origin develop git checkout -b feat/my-feature
-
Make your changes, following the conventions below.
-
Run the pre-commit checks before committing:
yarn prepare
This runs formatting, linting, and type checking.
-
Commit your changes with clear, descriptive commit messages.
-
Push your branch and open a Pull Request against
develop.
- Provide a clear description of what your PR does and why.
- Reference any related issues (e.g., "Closes #123").
- Ensure all CI checks pass before requesting review.
- Keep PRs focused — one feature or fix per PR.
- Be responsive to review feedback.
| Directory | Purpose |
|---|---|
server/ |
Express backend — API routes, entities, services |
src/ |
Next.js frontend — pages, components, hooks |
public/ |
Static assets |
docs/ |
User-facing documentation (GitBook) |
cypress/ |
End-to-end tests |
- Path aliases: Use
@server/*and@app/*for cross-folder imports. Same-folder relative imports (e.g../MyComponent) are allowed and enforced by ESLint. - TypeScript: Strict mode is off by design.
experimentalDecoratorsis enabled for TypeORM. - Formatting: Prettier handles code formatting. Run
yarn formator letyarn preparehandle it.
- Database: Use
getRepository(Entity)from@server/datasource— never instantiate repositories directly. - Routes: Express routers registered in
server/routes/index.ts. All endpoints must be defined instreamarr-api.yml(OpenAPI spec) first. - Auth:
checkUsermiddleware runs globally; useisAuthenticated(Permission.X)for route-level access control. - Logging: Use the Winston logger from
@server/loggerwith{ label: 'ComponentName' }. - Settings: Access via
getSettings()singleton from@server/lib/settings.ts.
- Data fetching: Use SWR for all client-side data (
useSWR<Type>('/api/v1/...')). - State management: React contexts in
src/context/— no Redux. - i18n: Use
react-intlwith theuseLocalehook. Extract keys withyarn i18n:extract. - Styling: Tailwind CSS. Classes are auto-sorted by the Prettier plugin.
-
Development:
synchronize: true— entity changes apply automatically. -
Production: Migrations run on startup. Generate from entity changes:
yarn migration:generate server/migration/MigrationName
- Search existing issues before opening a new one.
- Use the bug report issue template if available.
- Include steps to reproduce, expected behavior, and actual behavior.
- Include your environment details (OS, Node.js version, browser).
- Open a GitHub Issue or start a Discussion.
- Describe the problem your feature would solve.
- Be open to discussion — the feature may already be planned or there may be alternative approaches.
Streamarr uses react-intl for internationalization. To contribute translations:
-
Extract the latest English strings:
yarn i18n:extract
-
Translation files are located in
src/i18n/locale/. -
Add or update the appropriate locale file and submit a PR.
- Check our documentation.
- Open a GitHub Discussion.
- Review the API docs (available when running locally).
By contributing to Streamarr, you agree that your contributions will be licensed under the MIT License.