Skip to content

7. Contributing guidelines

Vincenzo Reina edited this page Apr 21, 2025 · 4 revisions

Contributing Guidelines

Thank you for considering contributing to ServerPulse! This guide explains how to contribute to the project effectively.

Getting Started

Development Environment

  1. Requirements

    • Java 21 or newer
    • Git
    • Docker and Docker Compose
    • IDE (IntelliJ IDEA recommended)
  2. Setup Project

    # Clone repository
    git clone https://github.com/renvins/serverpulse.git
    cd serverpulse
    
    # Build project
    ./gradlew shadowJar

Project Structure

serverpulse/
├── api/                    # API module
│   └── src/
│       └── main/java/     # API interfaces and models
├── plugin/                 # Core plugin module
│   └── src/
│       └── main/java/     # Plugin implementation
└── infra/                 # Docker infrastructure
    ├── grafana/           # Grafana configuration
    └── influxdb/          # InfluxDB configuration

Making Changes

Branching Strategy

  • master - Main development branch
  • feature/* - New features
  • fix/* - Bug fixes
  • docs/* - Documentation updates

Example:

# Create feature branch
git checkout -b feature/new-metric-type

# Create fix branch
git checkout -b fix/connection-issue

Coding Standards

  1. Commits

    • Use clear commit messages
    • One feature/fix per commit
    • Follow conventional commits:
      feat: add new metric type
      fix: resolve connection timeout
      docs: update installation guide
      
  2. Code Quality

    • Write unit tests for new features
    • Maintain code coverage
    • Use appropriate logging levels

Pull Request Process

  1. Before Submitting

    • Update documentation
    • Run code quality checks
    • Test locally
  2. Submit PR

    • Create pull request to master
    • Fill out PR template
    • Add relevant labels
    • Link related issues
  3. PR Template

    ## Description
    Brief description of changes
    
    ## Type of Change
    - [ ] Bug fix
    - [ ] New feature
    - [ ] Documentation
    - [ ] Other
    
    ## Testing
    Describe testing done
    
    ## Related Issues
    Fixes #123

Development Tips

Testing Locally

  1. Build Plugin

    ./gradlew shadowJar
  2. Start Test Environment

    cd infra
    docker compose up -d
  3. Debug Plugin

    • Use remote debugging
    • Enable debug logs in config

Documentation

When adding features, update:

  • API documentation
  • Wiki pages
  • README.md if needed
  • Configuration examples

Performance Considerations

  • Use async operations where appropriate
  • Minimize database operations
  • Consider memory usage
  • Test with large datasets

Reporting Issues

Bug Reports

Include:

  • ServerPulse version
  • Server version
  • Error messages
  • Steps to reproduce
  • Expected vs actual behavior

Feature Requests

Include:

  • Clear use case
  • Expected behavior
  • Implementation suggestions
  • Example configurations

Community Guidelines

  • Be respectful and inclusive
  • Help others when possible
  • Follow discussion threads
Clone this wiki locally