For anything beyond bug fixes, please reach out first to discuss your proposal. This helps ensure it aligns with the project roadmap and avoids surprises.
Ways to Contribute
Report Bugs
Found an issue? Report it on GitHub Issues
Suggest Features
Have an idea? Share it on GitHub Discussions
Improve Docs
Help make documentation clearer and more complete
Submit Code
Fix bugs or implement new features
Answer Questions
Help others in GitHub Discussions or Discord
Share Projects
Show what you’ve built with TrailBase
Getting Started
Repository Structure
The TrailBase repository contains all components:Benchmarks are kept in a separate repository due to external dependencies.
Development Setup
To build TrailBase from source, you’ll need:Prerequisites
- Rust: Latest stable toolchain (1.90+)
- Node.js: v18+ and pnpm
- GEOS: Geospatial library
- Protobuf: Protocol buffers compiler
- Git: For cloning the repository
Building on Linux/macOS
-
Clone the repository:
-
Initialize submodules:
-
Install JavaScript dependencies:
-
Build the executable:
-
Run the binary:
Building on Windows
Windows requires enabling symlinks:Using Docker for Development
If you don’t want to install build dependencies:Running Tests
TrailBase has extensive test coverage:Development Workflow
-
Create a branch for your changes:
- Make your changes and test them
-
Run tests to ensure nothing breaks:
-
Check formatting:
-
Run clippy for linting:
-
Commit your changes with clear messages:
-
Push and create a pull request:
Contribution Guidelines
Code Style
-
Rust: Follow standard Rust conventions
- Use
cargo fmtfor formatting - Address
cargo clippywarnings - Write idiomatic Rust code
- Add comments for complex logic
- Use
-
TypeScript/JavaScript:
- Follow the existing code style
- Use TypeScript where possible
- Run prettier for formatting
-
Documentation:
- Update docs for new features
- Include code examples
- Keep README.md up to date
Commit Messages
Write clear, descriptive commit messages:- Use present tense (“Add feature” not “Added feature”)
- Keep the first line under 72 characters
- Reference issues when applicable: “Fix #123: description”
- Explain why the change was made, not just what
Pull Request Process
- Discuss first: For large changes, open an issue or discussion before starting work
- Keep PRs focused: One feature or fix per PR when possible
- Write tests: Include tests for new functionality
- Update documentation: Document new features and API changes
-
Describe your changes: Write a clear PR description explaining:
- What the change does
- Why it’s needed
- How it works
- Any breaking changes
- Respond to feedback: Be open to suggestions and iterate based on review comments
- Keep your PR updated: Rebase on main if needed
Testing Requirements
- Unit tests: For individual functions and modules
- Integration tests: For API endpoints and features
- End-to-end tests: For critical user workflows
- Regression tests: When fixing bugs
Documentation
Documentation improvements are always welcome:- API documentation: Rustdoc comments for public APIs
- User guides: Step-by-step tutorials and examples
- Reference docs: Comprehensive feature documentation
- Code examples: Practical, working examples
- Readme updates: Keep installation and quickstart current
Contributor License Agreement
TrailBase uses a simple Contributor License Agreement (CLA): The CLA ensures:- You retain your copyright: You keep ownership of your contributions
- Open source forever: TrailBase will continue to be freely available under an OSI-approved copyleft license
- Flexibility for the project: Allows some licensing flexibility (similar to Grafana or Element)
- Legal clarity: Protects both contributors and users
Why a CLA?
The CLA provides flexibility for potential future licensing needs while ensuring TrailBase remains open source. This approach is established by larger successful projects like Grafana and Element.The exact licensing model is still being refined for optimal compatibility between OSL-3.0 and more popular licenses.
Areas Where Help is Needed
Current priorities for contributions:High Priority
- Documentation improvements: Tutorials, guides, and examples
- Bug fixes: Check GitHub Issues for open bugs
- Test coverage: Expand test coverage for existing features
- Client library improvements: Enhance type safety and ergonomics
- Mobile admin UI: Improve mobile experience
Medium Priority
- Performance optimizations: Benchmark and optimize hot paths
- WASM examples: More examples of WASM components
- Deployment guides: Platform-specific deployment documentation
- Integration examples: Examples with popular frameworks
- Geospatial features: Expand spatial capabilities
Feature Requests
- GraphQL support: Generate GraphQL alongside REST
- Additional OAuth providers: More authentication options
- Advanced admin features: Query builder, visual design tools
- Monitoring integrations: Better observability
Community Guidelines
Code of Conduct
Be respectful, inclusive, and constructive:- Be welcoming: Help newcomers and be patient with questions
- Be respectful: Disagree gracefully and assume good intentions
- Be collaborative: Work together toward better solutions
- Be constructive: Provide helpful feedback and alternatives
Communication Channels
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and community discussion
- Discord: Real-time chat with the community
- Pull Requests: Code review and technical discussion
Getting Help
If you need help contributing:- Check existing documentation and issues
- Ask in GitHub Discussions
- Join the Discord community
- Tag maintainers in your issue/PR if stuck
Recognition
Contributors are recognized in several ways:- Listed in the GitHub contributors page
- Mentioned in release notes for significant contributions
- Credit in documentation for major features
- Community recognition on Discord
Legal and Licensing
By contributing to TrailBase, you agree that:- Your contributions will be licensed under OSL-3.0 (server) or Apache-2.0 (clients)
- You have the right to submit the contribution
- You sign the CLA for the project
Release Process
This section is informational for contributors. Releases are managed by maintainers.
- Version bump: Update version in Cargo.toml files
- Update changelog: Document all changes since last release
- Tag release: Create a git tag for the version
- Build binaries: CI builds and uploads release binaries
- Publish packages: Client libraries published to package registries
- Update docs: Documentation site updated
- Announce: Release announced on GitHub, Discord, and social media
Resources for Contributors
GitHub Repository
Source code, issues, and PRs
Discussions
Community Q&A and proposals
Roadmap
Future plans and priorities
Architecture
Technical documentation
First-Time Contributors
New to open source? Welcome! Here’s how to get started:- Look for “good first issue” labels on GitHub Issues
- Read the codebase: Explore the code to understand the structure
- Start small: Begin with documentation or small bug fixes
- Ask questions: Don’t hesitate to ask for clarification
- Learn from reviews: Code review is a learning opportunity
Good First Issues
Look for issues tagged with:good first issue: Beginner-friendly tasksdocumentation: Documentation improvementshelp wanted: Issues where maintainers need help
Questions?
If you have questions about contributing:- Open a discussion on GitHub Discussions
- Join the Discord community
- Comment on relevant issues