Skip to content

Contributing

Iyotee edited this page Aug 24, 2025 · 1 revision

Contributing Guide

🀝 Welcome Contributors!

Thank you for your interest in contributing to DHCP Monitor! This guide will help you get started with contributing to the project.

🎯 How to Contribute

Types of Contributions

Code Contributions

  • Bug Fixes: Fix issues and bugs
  • New Features: Add new functionality
  • Improvements: Enhance existing features
  • Performance: Optimize code performance
  • Documentation: Improve code documentation

Non-Code Contributions

  • Documentation: Update wiki, README, or code comments
  • Bug Reports: Report issues you find
  • Feature Requests: Suggest new features
  • Testing: Test the application and report findings
  • Community: Help other users in discussions

Translation

  • Localization: Translate interface to other languages
  • Documentation: Translate documentation
  • Help Content: Translate help and tutorials

πŸš€ Getting Started

Prerequisites

Required Tools

  • Git: Version control system
  • Node.js: JavaScript runtime (v18+)
  • Rust: Programming language (v1.70+)
  • Code Editor: VS Code, IntelliJ, or similar

Knowledge Requirements

  • Frontend: React, TypeScript, Tailwind CSS
  • Backend: Rust, Tauri framework
  • Networking: DHCP protocol, packet capture
  • Git: Basic Git operations and workflow

Development Setup

1. Fork the Repository

  1. Go to DHCP Monitor GitHub
  2. Click "Fork" button in the top right
  3. Clone your fork to your local machine

2. Clone Your Fork

git clone https://github.com/YOUR_USERNAME/DHCPMonitor.git
cd DHCPMonitor

3. Set Up Upstream

git remote add upstream https://github.com/iyotee/DHCPMonitor.git
git fetch upstream

4. Install Dependencies

# Install Node.js dependencies
npm install

# Install Rust dependencies
cargo build

5. Verify Setup

# Test the application
npm run dev

πŸ”§ Development Workflow

Branch Strategy

Branch Naming Convention

feature/feature-name          # New features
bugfix/bug-description        # Bug fixes
improvement/improvement-name  # Improvements
docs/documentation-update     # Documentation changes

Creating a Feature Branch

# Update main branch
git checkout main
git pull upstream main

# Create feature branch
git checkout -b feature/your-feature-name

# Make your changes
# ... edit files ...

# Commit changes
git add .
git commit -m "Add feature: description of your feature"

# Push to your fork
git push origin feature/your-feature-name

Code Standards

Rust Code Style

  • Follow Rust Style Guide
  • Use cargo fmt to format code
  • Use cargo clippy for linting
  • Add proper error handling
  • Include unit tests for new functionality

TypeScript/React Code Style

  • Follow TypeScript Style Guide
  • Use ESLint and Prettier
  • Follow React best practices
  • Use TypeScript strictly
  • Include proper type definitions

General Guidelines

  • Code Comments: Add clear, helpful comments
  • Error Handling: Implement proper error handling
  • Testing: Write tests for new code
  • Documentation: Update relevant documentation
  • Performance: Consider performance implications

Testing

Running Tests

# Frontend tests
npm test

# Backend tests
cargo test

# Integration tests
npm run test:integration

Writing Tests

  • Unit Tests: Test individual functions and components
  • Integration Tests: Test component interactions
  • End-to-End Tests: Test complete user workflows
  • Performance Tests: Test performance characteristics

πŸ“ Making Changes

Code Changes

Before Making Changes

  1. Check Issues: Look for existing issues or discussions
  2. Discuss: Comment on issues to discuss approach
  3. Plan: Plan your implementation approach
  4. Scope: Keep changes focused and manageable

During Development

  1. Follow Standards: Adhere to coding standards
  2. Test Regularly: Test your changes frequently
  3. Document: Update documentation as needed
  4. Commit Often: Make small, focused commits

After Implementation

  1. Test Thoroughly: Ensure all tests pass
  2. Self-Review: Review your own code
  3. Update Docs: Update relevant documentation
  4. Prepare PR: Get ready for pull request

Documentation Changes

Wiki Updates

  • Accuracy: Ensure information is accurate and current
  • Clarity: Write clear, understandable content
  • Examples: Include practical examples
  • Structure: Follow existing wiki structure

Code Documentation

  • API Docs: Document public APIs
  • Code Comments: Add helpful inline comments
  • README Updates: Update project README as needed
  • Change Logs: Document significant changes

πŸ”„ Pull Request Process

Creating a Pull Request

1. Prepare Your PR

# Ensure your branch is up to date
git checkout main
git pull upstream main
git checkout feature/your-feature-name
git rebase main

# Push any rebase changes
git push origin feature/your-feature-name --force-with-lease

2. Create PR on GitHub

  1. Go to your fork on GitHub
  2. Click "Compare & pull request"
  3. Fill out PR template
  4. Add appropriate labels
  5. Request review from maintainers

3. PR Description Template

## Description
Brief description of what this PR does

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed

## Checklist
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] Tests added/updated

## Screenshots (if applicable)
Add screenshots for UI changes

## Additional Notes
Any additional information

PR Review Process

Review Process

  1. Automated Checks: CI/CD pipeline runs tests
  2. Code Review: Maintainers review your code
  3. Feedback: Address any feedback or requested changes
  4. Approval: PR gets approved and merged

Responding to Feedback

  • Be Responsive: Respond to review comments promptly
  • Be Open: Be open to suggestions and improvements
  • Make Changes: Implement requested changes
  • Ask Questions: Ask for clarification if needed

πŸ› Bug Reports

Reporting Bugs

Bug Report Template

## Bug Description
Clear description of the bug

## Steps to Reproduce
1. Step 1
2. Step 2
3. Step 3

## Expected Behavior
What should happen

## Actual Behavior
What actually happens

## Environment
- OS: [e.g., Windows 11, Ubuntu 20.04]
- Version: [e.g., 1.1.37]
- Architecture: [e.g., x64]

## Additional Information
- Screenshots
- Error messages
- Log files
- Related issues

Where to Report

  • GitHub Issues: Use GitHub issue tracker
  • Bug Reports: Use "Bug" issue template
  • Security Issues: Report security issues privately

πŸ’‘ Feature Requests

Suggesting Features

Feature Request Template

## Feature Description
Clear description of the requested feature

## Use Case
Why this feature is needed

## Proposed Solution
How you think it should work

## Alternatives Considered
Other approaches you considered

## Additional Context
Any other relevant information

Feature Request Process

  1. Search First: Check if feature already requested
  2. Discuss: Engage in community discussions
  3. Provide Details: Give comprehensive information
  4. Be Patient: Understand development priorities

🏷️ Issue Labels

Understanding Labels

Type Labels

  • bug: Something isn't working
  • enhancement: New feature or request
  • documentation: Improvements to documentation
  • good first issue: Good for newcomers
  • help wanted: Extra attention needed

Priority Labels

  • high: High priority issue
  • medium: Medium priority issue
  • low: Low priority issue

Status Labels

  • in progress: Being worked on
  • blocked: Blocked by other issues
  • duplicate: Issue already exists
  • invalid: Issue not valid
  • wontfix: Will not be fixed

πŸ“š Learning Resources

Getting Help

Documentation

  • This Wiki: Comprehensive project documentation
  • Code Comments: Inline code documentation
  • API Reference: Technical API documentation
  • Examples: Code examples and samples

Community Resources

  • GitHub Discussions: Community discussions
  • Issue Tracker: Browse existing issues
  • Pull Requests: Review recent changes
  • Contributors: Connect with other contributors

External Resources

  • Rust Book: Learn Rust programming
  • React Docs: Learn React development
  • Tauri Docs: Learn Tauri framework
  • Network Protocols: Learn about DHCP and networking

πŸŽ‰ Recognition

Contributor Recognition

Contributors Page

  • GitHub Contributors: Automatic contributor listing
  • Release Notes: Credit in release documentation
  • Contributor Hall of Fame: Special recognition for significant contributions

Contribution Levels

  • First Contribution: Welcome new contributors
  • Regular Contributor: Consistent contributions
  • Core Contributor: Significant project impact
  • Maintainer: Project leadership role

πŸ“‹ Contribution Checklist

Before Contributing

  • Read this contributing guide
  • Understand project goals and scope
  • Set up development environment
  • Familiarize with codebase

During Contribution

  • Follow coding standards
  • Write tests for new code
  • Update documentation
  • Test your changes thoroughly

After Contribution

  • Submit pull request
  • Respond to review feedback
  • Celebrate your contribution!
  • Stay engaged with the community

πŸ”— Next Steps

Ready to contribute?

  1. Start Small: Begin with documentation or simple bug fixes
  2. Join Community: Participate in discussions
  3. Ask Questions: Don't hesitate to ask for help
  4. Be Patient: Learning and contributing takes time

πŸ“ž Contact

Getting in Touch

  • GitHub Issues: For bug reports and feature requests
  • GitHub Discussions: For questions and community discussion
  • Maintainers: Direct contact for important matters

Community Guidelines

  • Be Respectful: Treat others with respect
  • Be Helpful: Help other contributors
  • Be Patient: Understand different skill levels
  • Be Inclusive: Welcome contributors from all backgrounds

Thank you for contributing to DHCP Monitor! πŸš€

Your contributions help make this project better for everyone in the networking community.

Clone this wiki locally