Contributing to Reflow
Thank you for your interest in contributing to Reflow! This document provides guidelines and information for contributors.
Getting Started
Prerequisites
Before contributing, ensure you have:
- Rust (latest stable version)
- Node.js (version 18 or higher)
- Git for version control
- mdBook for documentation (optional)
Setting Up the Development Environment
-
Clone the repository:
git clone https://github.com/offbit-ai/reflow.git cd reflow -
Install Rust dependencies:
cargo build -
Install Node.js dependencies:
cd examples/audio-flow npm install -
Run tests:
cargo test
How to Contribute
Reporting Issues
- Use the GitHub Issues page
- Provide detailed information about the bug or feature request
- Include relevant code examples and error messages
- Search existing issues before creating new ones
Submitting Pull Requests
- Fork the repository and create a new branch
- Make your changes with clear, descriptive commits
- Add tests for new functionality
- Update documentation as needed
- Submit a pull request with a clear description
Code Style Guidelines
Rust Code
- Follow the Rust Style Guide
- Use
cargo fmtto format code - Use
cargo clippyto catch common mistakes - Write comprehensive documentation comments (
///)
JavaScript/TypeScript Code
- Use Prettier for formatting
- Follow ESLint recommendations
- Use meaningful variable and function names
- Write JSDoc comments for public APIs
Documentation
- Use clear, concise language
- Include code examples where appropriate
- Test all code examples to ensure they work
- Follow the existing documentation structure
Development Workflow
Branch Naming Convention
feature/description- for new featuresfix/description- for bug fixesdocs/description- for documentation updatesrefactor/description- for code refactoring
Commit Message Format
type(scope): brief description
Detailed explanation of the change, if necessary.
Fixes #123
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Testing
Unit Tests
cargo test
Integration Tests
cargo test --test integration
Documentation Tests
cargo test --doc
End-to-End Tests
cd examples/audio-flow
npm test
Documentation Guidelines
Writing Style
- Use active voice
- Write in present tense
- Be clear and concise
- Include practical examples
- Explain the "why" not just the "how"
Code Examples
- Test all code examples
- Include imports and setup code
- Show expected output where relevant
- Use realistic, meaningful examples
API Documentation
- Document all public functions and types
- Include parameter descriptions
- Provide return value information
- Add usage examples
Community Guidelines
Code of Conduct
We are committed to providing a welcoming and inclusive environment for all contributors. Please:
- Be respectful and considerate
- Focus on constructive feedback
- Help others learn and grow
- Celebrate diverse perspectives
Communication Channels
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and community discussion
- Discord: Real-time chat (invite link in README)
Release Process
Versioning
We follow Semantic Versioning:
MAJOR.MINOR.PATCH- Breaking changes increment MAJOR
- New features increment MINOR
- Bug fixes increment PATCH
Release Checklist
- Update version numbers in
Cargo.toml - Update
CHANGELOG.md - Run full test suite
- Update documentation
- Create GitHub release
- Publish to crates.io (maintainers only)
Architecture Guidelines
Actor Design Principles
When creating new actors:
- Single Responsibility: Each actor should have one clear purpose
- Immutable Messages: Messages should be immutable data structures
- Error Handling: Handle errors gracefully and provide meaningful messages
- Documentation: Include comprehensive examples and usage guidelines
Component Design
For new components:
- Composability: Components should work well with others
- Configuration: Use clear, typed configuration options
- Performance: Consider memory usage and execution speed
- Testing: Include unit tests and integration tests
API Design
When designing APIs:
- Consistency: Follow existing patterns and conventions
- Type Safety: Use strong typing where possible
- Documentation: Provide clear documentation and examples
- Backwards Compatibility: Consider impact on existing users
Getting Help
If you need help with contributing:
- Check the documentation
- Search existing issues
- Ask in GitHub Discussions
- Join our Discord community
Recognition
Contributors are recognized in:
- The project README
- Release notes
- Annual contributor reports
We appreciate all contributions, whether they're code, documentation, testing, or community support!
License
By contributing to Reflow, you agree that your contributions will be licensed under the same license as the project (see LICENSE file).