Skip to main content

Contributing

Guidelines for contributing to Raven.

Getting Started

  1. Fork the repository on GitHub
  2. Clone your fork:
    git clone https://github.com/YOUR_USERNAME/raven-panel.git
    cd raven-panel
  3. Set up environment:
    yarn install
    yarn dev
  4. Create a branch:
    git checkout -b feature/your-feature-name

Development Workflow

Branch Naming

TypeFormatExample
Featurefeature/descriptionfeature/journey-cloning
Bug Fixfix/descriptionfix/cohort-selection-bug
Refactorrefactor/descriptionrefactor/api-service-layer
Docsdocs/descriptiondocs/add-api-reference
Chorechore/descriptionchore/update-dependencies

Commit Messages

Follow Conventional Commits:

type(scope): description

Examples:

  • feat(journeys): add journey cloning functionality
  • fix(cohorts): resolve cohort selection dropdown not updating
  • docs(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

  1. Update your branch:

    git fetch origin
    git rebase origin/main
  2. Push your changes:

    git push origin feature/your-feature-name
  3. 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
  4. 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