How to Contribute
There are many ways to contribute to Sunshine:- Report bugs - Help us identify and fix issues
- Suggest features - Share ideas for improvements
- Write code - Fix bugs or implement new features
- Write documentation - Improve guides and API docs
- Translate - Help localize Sunshine into other languages
- Review pull requests - Provide feedback on proposed changes
- Help others - Answer questions in discussions and Discord
Getting Started
Prerequisites
- GitHub account - Required for contributing
- Git - For version control
- Development environment - See Building from Source
- Familiarity with C++ - For code contributions
First Steps
- Fork the repository on GitHub
- Clone your fork locally:
- Create a branch for your changes:
- Make your changes (see guidelines below)
- Test your changes thoroughly
- Commit and push your changes
- Open a pull request on GitHub
Code Style and Standards
C++ Code Style
Sunshine usesclang-format for consistent code formatting. The configuration is in .clang-format at the repository root.
Before committing, format your code:
The CI workflow will automatically check code formatting. Pull requests with formatting issues will fail CI checks.
Coding Standards
General Guidelines:- Use C++17 or later features where appropriate
- Follow RAII principles for resource management
- Prefer
std::unique_ptrandstd::shared_ptrover raw pointers - Use
constwherever possible - Write self-documenting code with clear variable names
- Add comments for complex logic
- Place platform-specific code in
src/platform/<platform>/ - Use platform abstraction interfaces in
src/platform/common.h - Avoid
#ifdefblocks in core code when possible
- Check return values and handle errors gracefully
- Use exceptions for exceptional conditions
- Log errors with appropriate severity levels
Recommended Development Tools
Sunshine development is best done with an IDE that supports C++ and CMake:| Tool | Description |
|---|---|
| CLion | Recommended IDE for C and C++ development. Free for non-commercial use. |
| Visual Studio Code | Free, with C++ and CMake extensions |
| Visual Studio | On Windows, with CMake support |
Web UI Development
The Web UI uses Vue.js 3 with Vite as the build system.Web UI Structure
- Location:
./src_assets/common/assets/web - Templating: EJS (see
template_header.htmlandtemplate_header_main.html) - Styling: Bootstrap 5
- Icons: Lucide and Simple Icons
Building the Web UI
- CMake
- Manual (npm)
Web UI Guidelines
- Follow Vue.js best practices
- Use existing Bootstrap components when possible
- Ensure responsive design (mobile, tablet, desktop)
- Test on multiple browsers
- Keep dependencies up to date
Localization and Translation
Sunshine supports multiple languages through CrowdIn.Translation Basics
Adding Translatable Strings
Web UI (Vue.js)
Sunshine uses Vue I18n for the Web UI. 1. Add the string to the English locale file:src_assets/common/assets/web/public/assets/locale/en.json:
JSON keys should be sorted alphabetically. Use jsonabc to sort keys.
C++ Code
For system tray or other native UI elements, useboost::locale:
Translation Workflow
- Developer adds string to
en.json(Web UI) or C++ code - PR is merged to master branch
- CI workflow extracts strings and pushes to CrowdIn
- Translators translate on CrowdIn
- CrowdIn pushes translations to
l10n_masterbranch - PR is created from
l10n_mastertomaster - PR is merged, translations are now available
Testing
Unit Testing
Sunshine uses Google Test for unit testing. Location:./tests/
Run tests:
Code Coverage
Sunshine uses gcovr to generate code coverage reports. Coverage is checked by Codecov:- PRs must maintain or improve total coverage
- New code should have adequate test coverage
Even if your code can’t be tested in CI, we encourage you to write tests for it. This allows maintainers to run tests locally with proper hardware.
Clang Format Testing
CI automatically checks code formatting. To test locally before pushing:Pull Request Process
Before Submitting
- Code is formatted with
clang-format - All tests pass locally
- New features have tests
- Documentation is updated (if applicable)
- Commit messages are clear and descriptive
- Branch is up to date with
master
Pull Request Guidelines
Title:- Use a clear, descriptive title
- Start with a verb: “Add”, “Fix”, “Update”, “Improve”, “Remove”
- Examples:
- “Add support for AV1 encoding”
- “Fix crash when disconnecting client”
- “Update documentation for KMS capture”
- Describe what changed and why
- Reference related issues: “Fixes #123” or “Related to #456”
- Include screenshots/videos for UI changes
- List breaking changes (if any)
- Explain how to test the changes
Review Process
- Automated checks run (CI, formatting, tests)
- Maintainers review your code
- Address feedback if requested
- Approval from maintainer(s)
- Merge to master branch
Be patient - maintainers are volunteers. It may take a few days to review your PR.
Reporting Bugs
When reporting bugs, please include:- Sunshine version (e.g., v0.20.0)
- Platform (Linux, Windows, macOS, FreeBSD)
- OS version (e.g., Ubuntu 22.04, Windows 11, macOS 14)
- GPU (vendor and model)
- Steps to reproduce (detailed and numbered)
- Expected behavior
- Actual behavior
- Logs (see log locations in Architecture)
- Screenshots/videos (if applicable)
Feature Requests
When requesting features:- Check existing issues - your feature may already be requested
- Describe the use case - why is this feature needed?
- Provide examples - how would it work?
- Consider alternatives - are there other solutions?
Community Guidelines
Code of Conduct
Sunshine follows LizardByte’s community guidelines:- Be respectful - treat everyone with kindness
- Be constructive - provide helpful feedback
- Be patient - remember maintainers are volunteers
- Be inclusive - welcome all contributors
Communication Channels
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and discussions
- Discord: Real-time chat and support
- Documentation: Official docs
Additional Resources
For more detailed contribution guidelines, see the organization-level documentation:Thank You!
Your contributions make Sunshine better for everyone. Whether you’re fixing a typo, translating a string, or implementing a major feature - thank you for being part of the community!GitHub Repository
Start contributing on GitHub
Translation Project
Help translate Sunshine

