We welcome contributions from everyone! This guide will help you get started.
- Fork the repository
- Clone your fork locally
- Enable corepack:
corepack enable - Install dependencies:
pnpm install
This project includes native Rust code, so you need to have Rust and Cargo installed.
The easiest way to install them is using rustup:
curl https://sh.rustup.rs -sSf | shFor more installation options, see the official Cargo installation guide.
# Install dependencies
pnpm install --frozen-lockfile
# Build the project (includes native Rust binaries)
pnpm buildYou need 2 terminals for development:
Terminal 1 - Build the package in watch mode:
pnpm devTerminal 2 - Run playground to test changes:
cd playgrounds/nitro
pnpm devOr for Nuxt playground:
cd playgrounds/nuxt
pnpm devfeat/feature-name- New featuresfix/bug-description- Bug fixesdocs/update-description- Documentation updateschore/task-description- Maintenance tasks
- Use TypeScript for all code
- Follow existing code style and patterns
- Add comments for complex logic only
- Keep functions under 50 lines when possible
- Use descriptive variable and function names
- Write tests for new features:
pnpm test - Update snapshots when needed
- Test files go in
tests/directory
- Run
pnpm lintbefore committing - Use
pnpm lint --fixfor auto-fixes - Documentation:
pnpm lint:docs --fix
- Create a feature branch from
main - Make your changes
- Test your changes:
pnpm test - Lint your code:
pnpm lint - Commit with conventional commit format
- Push to your fork
- Create a pull request
Follow conventional commits:
feat: add new featurefix: resolve bug in resolverdocs: update README exampleschore: update dependencies
- Use descriptive PR titles
- Fill out the PR template completely
- Link related issues
- Keep PRs focused and small
- Never include "Generated with Claude Code" in descriptions
├── src/ # Source code
├── native/ # Native Rust code
├── playgrounds/ # Development playgrounds
│ ├── nitro/ # Nitro playground
│ ├── nuxt/ # Nuxt playground
│ └── ... # Other playgrounds
├── tests/ # Test files
└── examples/ # Example projects
src/core/- Core runtime logicsrc/nitro/- Nitro integrationnative/- Native Rust bindingsplaygrounds/nitro/- Test with standalone Nitroplaygrounds/nuxt/- Test with Nuxt
- Keep
pnpm devrunning in main directory (Terminal 1) - Test with standalone Nitro:
cd playgrounds/nitro && pnpm dev(Terminal 2) - Test with Nuxt:
cd playgrounds/nuxt && pnpm dev(Terminal 2) - Run unit tests:
pnpm test
- Use inclusive language
- Be constructive in feedback
- Help others learn and grow
- Use GitHub issues for bugs and features
- Use GitHub discussions for questions
- Be clear and concise in descriptions
- Be welcoming to newcomers
- Respect different perspectives
- Focus on what's best for the community
- Issues: Report bugs or request features
- Discussions: Ask questions or share ideas
- Documentation: Check README and examples
Thank you for contributing to Nitro GraphQL! 🚀