Thank you for your interest in contributing to Rustrak! This guide will help you get started with the project and understand our development workflow.
- Getting Started
- Development Workflow
- Project Structure
- Code Standards
- Submitting Changes
- Community Guidelines
Before you begin, ensure you have the following installed:
- Rust - For the server component;
rustupinstalls the version pinned inrust-toolchain.toml - Node.js (22.18+) - For the UI and build tools; CI and the images use 24
- pnpm (12.x) - Package manager;
corepack enablepicks the version pinned inpackage.json - Docker - For local development and testing
-
Fork and Clone the Repository
git clone https://github.com/YOUR_USERNAME/rustrak.git cd rustrak -
Install Dependencies
pnpm install
-
Configure the Server
cd apps/server cp .env.example .envThe example configuration uses SQLite, with the database and source maps next to the checkout, so there is nothing else to run.
-
Run the Server (in a new terminal)
cd apps/server cargo run --bin rustrak -
Or run it against PostgreSQL
docker compose -f docker-compose.dev.yml up -d postgres
Switch
DATABASE_URLinapps/server/.envto the PostgreSQL line the file shows, then disable the defaultsqlitefeature:cd apps/server cargo run --no-default-features --features postgres --bin rustrak -
Run the dashboard (in another terminal)
cd apps/dashboard pnpm devVite serves it on
:3000and proxies/api,/auth,/health,/docsand/api-docsthrough to the server, so the browser only ever talks to one origin: the same arrangement production has, where the server itself hands out the compiled bundle.
# Run all tests
pnpm test
# Run tests for a specific package
cd apps/server && cargo test
cd apps/dashboard && pnpm test# Format all code
pnpm format
# Run linter
pnpm lint
# Everything CI runs: turbo over the JavaScript packages, then cargo for the crates
pnpm run ciUse the following prefixes for your branches:
feat/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Adding or improving testschore/- Maintenance tasks
Example: feat/add-authentication-endpoint or fix/login-validation-bug
Follow the conventional commit format:
<type>: <short description>
[optional body]
[optional footer(s)]
Types:
feat: New featuresfix: Bug fixesdocs: Documentation changesrefactor: Code refactoringtest: Adding or improving testschore: Maintenance tasks
Examples:
feat: add user authentication endpoint
fix: resolve memory leak in event processor
docs: update API documentation for events endpoint
Rustrak is a monorepo managed with Turborepo and pnpm:
rustrak/
├── apps/
│ ├── server/ # Rust backend (Actix-web)
│ ├── dashboard/ # React SPA, served by the server
│ └── docs/ # Documentation site
├── packages/
│ ├── client/ # TypeScript API client
│ ├── mcp/ # MCP server over the client
│ ├── ui/ # Design system (Storybook)
│ ├── benchmarks/ # Load and throughput benchmarks
│ └── test-sentry/ # Test utilities for Sentry compatibility
├── .changeset/ # Versioning configuration
├── docker-compose*.yml # Docker configurations
└── CLAUDE.md # Project context
Each component has its own CLAUDE.md describing its architecture and the rules that apply inside it. Read the one for the area you are touching:
- Server:
apps/server/CLAUDE.md - Dashboard:
apps/dashboard/CLAUDE.md - Client Package:
packages/client/CLAUDE.md
- Follow Rust idioms and best practices
- Use
rustfmtfor code formatting - Run
clippyto catch common mistakes and improve code quality - Write tests for new functionality
- Document public APIs with
///comments
- Use strict TypeScript mode
- Format and lint with Biome (
pnpm format,pnpm lint) - Write tests for new functionality
- Use Zod for runtime validation where appropriate
- Maintain high test coverage (>90% where possible)
- Write unit tests for pure functions
- Write integration tests for API endpoints
- Include tests for edge cases and error conditions
Before submitting a pull request, consider creating an issue first:
- Search existing issues to avoid duplicates
- Provide a clear title and detailed description
- Include reproduction steps for bug reports
- Explain the motivation for feature requests
- Create a branch for your changes
- Make your changes following the code standards
- Write clear commit messages using the conventional format
- Add tests if your changes affect functionality
- Update documentation as needed
- Submit a pull request with a clear description
Before your first pull request can be merged, you sign the Contributor License Agreement. It is a few lines long and says you give permission to license your contribution on any terms. A bot comments on the pull request with the sentence to reply with; you sign once and it covers every later pull request.
- All submissions require review before merging
- Address review comments promptly
- Maintainers will merge approved PRs
- Large changes may be broken into smaller PRs
This project follows the Contributor Covenant Code of Conduct. Please be respectful and inclusive when interacting with others.
- Check the existing documentation and issues
- Ask questions in the issue comments
- Be patient - maintainers are volunteers
Contributors will be acknowledged in release notes and the project's README.
Thank you for contributing to Rustrak! Your efforts help make error tracking more accessible and lightweight for everyone.