Skip to content

๐Ÿค Contributing to Tobogganing

Thank you for your interest in contributing to Tobogganing! We welcome contributions from the community and appreciate your help in making this project better.

๐Ÿ“‹ Table of Contents

๐Ÿš€ Getting Started

Prerequisites

  • ๐Ÿ Python 3.12+ for Manager service
  • ๐Ÿน Go 1.23+ for Headend server and native clients
  • ๐ŸŸข Node.js 18+ for website development
  • ๐Ÿณ Docker for containerized development
  • ๐Ÿ“ฆ Git for version control

๐Ÿด Fork and Clone

  1. Fork the repository on GitHub
  2. Clone your fork locally:
    git clone https://github.com/your-username/tobogganing.git
    cd tobogganing
    

๐Ÿ’ป Development Setup

๐Ÿ”ง Environment Setup

Python Environment (Manager)

cd manager
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate     # Windows
pip install -r requirements.txt
pip install -r requirements-dev.txt

Go Environment (Headend & Clients)

cd headend
go mod download

cd ../clients/native
go mod download

Node.js Environment (Website)

cd website
npm install

๐Ÿณ Docker Development

cd deploy/docker-compose
docker-compose -f docker-compose.dev.yml up -d

๐Ÿ”„ Contribution Process

1. ๐Ÿ“‹ Create an Issue

  • ๐Ÿ› For bug reports, use the bug report template
  • ๐Ÿ’ก For feature requests, use the feature request template
  • ๐Ÿ“š For documentation, create a documentation issue

2. ๐ŸŒฟ Create a Branch

git checkout -b feature/your-feature-name
# or
git checkout -b fix/issue-description

3. ๐Ÿ’ป Make Changes

  • โœ… Follow coding standards
  • ๐Ÿงช Add tests for new functionality
  • ๐Ÿ“š Update documentation as needed
  • ๐Ÿ” Run linters and tests locally

4. ๐Ÿ“ค Submit Pull Request

  • ๐Ÿ“ Use clear, descriptive commit messages
  • ๐Ÿ“‹ Fill out the pull request template
  • ๐Ÿ”— Link to related issues
  • โœ… Ensure all CI checks pass

5. ๐Ÿ‘€ Code Review

  • ๐Ÿ• Be patient during review process
  • ๐Ÿ’ฌ Address reviewer feedback
  • โœจ Update code as requested
  • ๐ŸŽ‰ Celebrate when merged!

๐Ÿ“ Code Standards

๐Ÿ Python (Manager Service)

  • ๐Ÿ“ Follow PEP 8 style guide
  • ๐Ÿท๏ธ Use type hints for all functions
  • ๐Ÿ“– Write docstrings for classes and methods
  • โšก Use async/await for I/O operations
  • ๐Ÿงช Include unit tests for new code
async def generate_certificate(
    node_id: str,
    node_type: str,
    validity_days: int = 365
) -> Dict[str, Any]:
    """Generate X.509 certificate for node authentication.

    Args:
        node_id: Unique node identifier
        node_type: Type of node (client/headend)
        validity_days: Certificate validity period

    Returns:
        Certificate data with private key

    Raises:
        CertificateError: If generation fails
    """
    pass

๐Ÿน Go (Headend & Clients)

  • ๐ŸŽจ Follow Go conventions and use gofmt
  • ๐Ÿ”„ Use context for cancellation
  • โŒ Handle errors explicitly
  • ๐Ÿ“Š Use structured logging
  • ๐Ÿงช Write comprehensive tests
// AuthenticateClient verifies client credentials
func (a *Authenticator) AuthenticateClient(
    ctx context.Context,
    cert *x509.Certificate,
    token string,
) (*AuthResult, error) {
    if cert == nil {
        return nil, errors.New("certificate required")
    }
    // Implementation
}

๐ŸŸข TypeScript (Website)

  • ๐Ÿ“ Follow TypeScript best practices
  • โš›๏ธ Use React Hooks patterns
  • โ™ฟ Write accessible components
  • ๐ŸŽจ Use Tailwind CSS for styling
  • ๐Ÿ“š Document component props

๐Ÿงช Testing

Test Types

  • ๐Ÿ”ฌ Unit Tests: Individual functions/methods
  • ๐Ÿ”— Integration Tests: Component interactions
  • ๐ŸŽญ End-to-End Tests: Complete user workflows
  • ๐Ÿ”’ Security Tests: Authentication/authorization
  • โšก Performance Tests: Load and stress testing

Running Tests

# ๐Ÿ Python tests
cd manager && source venv/bin/activate
pytest tests/ -v --cov=.

# ๐Ÿน Go tests (Headend)
cd headend
go test -v -race ./...

# ๐Ÿน Go tests (Clients)  
cd clients/native
go test -v -race ./...

# ๐ŸŸข Website tests
cd website
npm test

Coverage Goals

  • ๐ŸŽฏ 80%+ code coverage for new code
  • ๐Ÿ›ก๏ธ 100% coverage for security components
  • ๐Ÿ”— Integration tests for all API endpoints
  • ๐ŸŽญ E2E tests for critical user journeys

๐Ÿ“š Documentation

Documentation Types

  • ๐Ÿ’ป Code Comments: Inline documentation
  • ๐Ÿ”Œ API Docs: REST API reference
  • ๐Ÿ“– User Guides: Installation and usage
  • ๐Ÿ—๏ธ Developer Guides: Architecture docs
  • ๐Ÿš€ Deployment Guides: Production setup

Standards

  • โœ๏ธ Write docs during development
  • ๐Ÿ”ค Use clear, concise language
  • ๐Ÿ’ก Include examples where helpful
  • ๐Ÿ”„ Keep docs synchronized with code
  • ๐ŸŽจ Use emojis and icons for visual appeal

๐Ÿ› Bug Reports

When reporting bugs, include:

  • ๐Ÿ“‹ Summary: Clear issue description
  • ๐Ÿ–ฅ๏ธ Environment: OS, versions, deployment
  • ๐Ÿ”„ Steps: Detailed reproduction steps
  • โœ… Expected: What should happen
  • โŒ Actual: What actually happens
  • ๐Ÿ“ Logs: Error messages and output
  • โš™๏ธ Config: Relevant configuration (sanitized)

๐Ÿ’ก Feature Requests

For new features, include:

  • ๐ŸŽฏ Problem: What issue does this solve?
  • ๐Ÿ’ญ Solution: Proposed implementation
  • ๐Ÿ”„ Alternatives: Other options considered
  • ๐Ÿ‘ฅ Users: Who benefits from this?
  • ๐Ÿ”ง Technical: Implementation approach

๐Ÿ”’ Security Issues

โš ๏ธ DO NOT create public issues for security vulnerabilities!

Instead: 1. ๐Ÿ“ง Email security@tobogganing.com 2. ๐Ÿ“„ Include detailed vulnerability info 3. โฐ Allow reasonable response time 4. ๐Ÿค Follow responsible disclosure

๐Ÿ‘ฅ Community

๐Ÿ’ฌ Communication

  • ๐Ÿ™ GitHub Issues: Bug reports and features
  • ๐Ÿ’ญ GitHub Discussions: Questions and ideas
  • ๐Ÿ’ฌ Discord: Real-time community chat
  • ๐Ÿ“ง Email: Security and urgent matters

๐Ÿค Code of Conduct

We are committed to a welcoming, inclusive environment for all contributors. Please be: - ๐Ÿค— Respectful and considerate - ๐ŸŽฏ Constructive in feedback - ๐ŸŒŸ Collaborative and helpful - ๐Ÿ“š Patient with newcomers

๐Ÿ† Recognition

Contributors are recognized through: - ๐Ÿ“œ Repository contributor list - ๐Ÿ“ฐ Release notes mentions - ๐ŸŽ–๏ธ Annual appreciation posts - ๐ŸŒŸ Special contributor badges

๐Ÿ“„ License

By contributing to Tobogganing, you agree that your contributions will be licensed under the MIT License.


๐Ÿ™ Thank you for contributing to Tobogganing! Together, we're making secure networking accessible to everyone! ๐Ÿš€