Skip to content

Latest commit

 

History

History
66 lines (50 loc) · 2.19 KB

File metadata and controls

66 lines (50 loc) · 2.19 KB

Contributing to AudioBlock Backend

Thank you for your interest in contributing to AudioBlock Backend! This document outlines the process for setting up your environment, our coding standards, and how to submit a Pull Request.

Development Environment Setup

  1. Fork and clone the repository: ```bash git clone https://github.com/YOUR_USERNAME/AudioBlock_Backend.git cd AudioBlock_Backend ```

  2. Install dependencies: ```bash npm install ```

  3. Set up environment variables: Copy the example environment file and configure it as needed. ```bash cp .env.example .env ```

  4. Run the development server: ```bash npm run dev ```

Test Coverage Threshold (#396)

CI enforces minimum coverage via jest --coverage. The thresholds (defined in jest.config.js) are:

Metric Minimum
Lines 50%
Functions 50%
Branches 40%
Statements 50%

Run coverage locally before pushing:

npm run test:coverage

Jest will exit non-zero and print which metric fell below threshold. Keep new code covered — do not lower the thresholds without a team discussion.

Coding Standards

Please refer to our Coding Conventions document for detailed guidelines on how to format and structure your code. Our project uses ESLint and Prettier to enforce these standards. Run npm run lint:fix before submitting your code.

Submitting a Pull Request

  1. Create a branch named according to the feature or fix (e.g., feature/add-new-endpoint, fix/issue-123).
  2. Ensure your commit messages are clear and descriptive.
  3. Test your changes locally (npm run test).
  4. Push your branch and open a Pull Request using our PR Template.

Review Expectations

Reviewers will look for:

  • Adherence to coding standards (no lint errors, complexity warnings addressed).
  • Proper test coverage for new logic.
  • Clear commit messages and a detailed PR description.

Bug Reports and Feature Requests

Please use our issue templates when filing new issues: