Contributing
How to contribute to Gryt
Prerequisites
- Node.js 22+ and yarn
- Go 1.21+ (SFU)
- Docker (optional)
Setup
git clone --recurse-submodules https://github.com/YOUR_USERNAME/gryt.git
cd grytInstall dependencies and start everything with the dev script:
ops/start_dev.shThe script installs dependencies for all packages and starts the client, server, and SFU in development mode.
Workflow
- Create a feature request or a bug report
- Fork the repo and create a branch
- Make changes and add tests
- Run lint and tests
- Submit a pull request
Code style
TypeScript
- Use strict mode
- Follow ESLint and Prettier configs
- Add JSDoc comments for public APIs
/**
* Manages microphone input and audio processing.
* @param shouldAccess - Whether to request microphone access
*/
const useMicrophone = (shouldAccess: boolean): MicrophoneState => {
// ...
};Go
- Follow
gofmtformatting - Add godoc comments for exported functions
- Handle errors explicitly
Testing
# Client
cd packages/client && yarn test
# Server
cd packages/server && yarn test
# SFU
cd packages/sfu && go test ./...Blog and site content
The marketing site and blog live in packages/site. Blog posts are MDX files in content/blog/ — see the Site docs for the full writing guide.
Quick steps to add a blog post:
- Create
packages/site/content/blog/my-post.mdxwith frontmatter (title,author,date) - Place images in
packages/site/public/and reference them as - Run
npm run devinpackages/siteto preview
Pull request checklist
- Tests pass (
yarn test,go test ./...) - Code is linted (
yarn lint,go fmt ./...) - Documentation is updated if needed
- No breaking changes (or clearly marked)
License
Contributions are licensed under the AGPL-3.0. By submitting a pull request, you agree that your contributions will be licensed under the same terms.