Contributing
Guidelines for contributing to Raven.
Getting Started
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/raven-panel.git
cd raven-panel - Set up environment:
yarn install
yarn dev - Create a branch:
git checkout -b feature/your-feature-name
Development Workflow
Branch Naming
| Type | Format | Example |
|---|---|---|
| Feature | feature/description | feature/journey-cloning |
| Bug Fix | fix/description | fix/cohort-selection-bug |
| Refactor | refactor/description | refactor/api-service-layer |
| Docs | docs/description | docs/add-api-reference |
| Chore | chore/description | chore/update-dependencies |
Commit Messages
Follow Conventional Commits:
type(scope): description
Examples:
feat(journeys): add journey cloning functionalityfix(cohorts): resolve cohort selection dropdown not updatingdocs(api): add API reference documentation
Before Committing
yarn lint:fix # Fix linting issues
yarn test # Run tests
yarn app:check # Type check
Code Style
TypeScript
- Use TypeScript for all new code
- Enable strict mode
- Avoid
any- use proper typing - Export types alongside implementations
// Good
export interface Journey {
id: string;
name: string;
status: JourneyStatus;
}
export const fetchJourney = async (id: string): Promise<Journey> => {
// implementation
};
React Components
- Use functional components with hooks
- Keep components focused and small
- Co-locate styles with components
Pull Request Process
-
Update your branch:
git fetch origin
git rebase origin/main -
Push your changes:
git push origin feature/your-feature-name -
Create a Pull Request:
- Use a descriptive title
- Fill out the PR template
- Link related issues
- Request reviews from maintainers
PR Checklist:
- Code follows the style guide
- Tests pass locally
- New functionality has tests
- No linting errors
- TypeScript compiles without errors
-
Address review feedback - Respond to comments and push updates
Testing Guidelines
Write tests for new functionality. See Testing for detailed patterns and examples.
Getting Help
- Questions: Open a GitHub Discussion
- Bugs: Create a GitHub Issue
- Security: Contact the security team