speedtest-tui 0.1.1

A terminal-based network speed test tool with real-time gauges and graphs
# Contributing to speedtest-tui

Thank you for your interest in contributing to speedtest-tui! This document provides guidelines and information about contributing to this project.

## Code of Conduct

Please be respectful and considerate in all interactions. We aim to maintain a welcoming and inclusive community.

## How to Contribute

### Reporting Bugs

If you find a bug, please open an issue with:

1. A clear, descriptive title
2. Steps to reproduce the issue
3. Expected behavior vs actual behavior
4. Your environment (OS, Rust version, terminal emulator)
5. Any relevant error messages or logs

### Suggesting Features

Feature requests are welcome! Please open an issue with:

1. A clear description of the feature
2. Use cases for the feature
3. Any implementation ideas you have

### Pull Requests

1. Fork the repository
2. Create a feature branch from `main`
3. Make your changes
4. Run tests and linting
5. Submit a pull request

## Development Setup

### Prerequisites

- Rust 1.70 or later
- Git

### Getting Started

```bash
# Clone your fork
git clone https://github.com/hadihaider055/speedtest-tui
cd speedtest-tui

# Build the project
cargo build

# Run tests
cargo test

# Run the application
cargo run
```

### Code Style

We use standard Rust formatting and linting:

```bash
# Format code
cargo fmt

# Run linter
cargo clippy

# Check for issues
cargo check
```

### Running Tests

```bash
# Run all tests
cargo test

# Run with output
cargo test -- --nocapture

# Run specific test
cargo test test_name
```

## Project Structure

```
speedtest-tui/
├── src/
│   ├── main.rs           # Entry point
│   ├── app.rs            # Application state and logic
│   ├── cli.rs            # CLI argument handling
│   ├── config.rs         # Configuration management
│   ├── ui/               # UI components
│   │   ├── mod.rs
│   │   ├── gauge.rs      # Speed gauge widget
│   │   ├── graph.rs      # Speed graph widget
│   │   ├── theme.rs      # Color themes
│   │   └── ...
│   ├── network/          # Network operations
│   │   ├── mod.rs
│   │   ├── download.rs   # Download speed test
│   │   ├── upload.rs     # Upload speed test
│   │   ├── ping.rs       # Latency measurement
│   │   └── providers/    # Speed test providers
│   └── storage/          # Data persistence
├── tests/                # Integration tests
└── benches/              # Benchmarks
```

## Guidelines

### Commit Messages

- Use clear, descriptive commit messages
- Start with a verb (Add, Fix, Update, Remove, etc.)
- Reference issues when applicable

Examples:

- `Add support for custom test servers`
- `Fix gauge not updating during upload test`
- `Update README with installation instructions`

### Code Quality

- Write clear, readable code
- Add comments for complex logic
- Include tests for new functionality
- Update documentation as needed

### Testing

- Add unit tests for new functions
- Add integration tests for new features
- Ensure existing tests pass

## Areas to Contribute

### Good First Issues

Look for issues labeled `good first issue` for beginner-friendly tasks.

### Wanted Features

- Additional speed test providers
- More theme options
- Internationalization (i18n)
- Accessibility improvements
- Performance optimizations

### Documentation

- Improve README
- Add code documentation
- Create tutorials or guides

## Getting Help

If you need help:

1. Check existing issues and documentation
2. Open a discussion or issue
3. Be patient and respectful

## License

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