# Contributing to StreamA2026

Thank you for considering contributing to StreamA2026!

## How to Contribute

### Reporting Bugs

Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:

- **Description**: Clear description of the problem
- **Steps to Reproduce**: Detailed steps to reproduce the issue
- **Expected Behavior**: What you expected to happen
- **Actual Behavior**: What actually happened
- **Environment**: OS, Docker version, browser version
- **Screenshots**: If applicable, add screenshots
- **Logs**: Relevant log output

### Suggesting Enhancements

Enhancement suggestions are welcome! Please:

- Use a clear and descriptive title
- Provide a detailed description of the enhancement
- Explain why this enhancement would be useful
- Provide examples of how the enhancement would be used

### Pull Requests

1. **Fork the repository**
2. **Create a branch**: `git checkout -b feature/your-feature-name`
3. **Make your changes**:
   - Follow the existing code style
   - Add tests for new features
   - Update documentation
4. **Commit your changes**: Use clear commit messages
5. **Push to the branch**: `git push origin feature/your-feature-name`
6. **Create a Pull Request**

## Development Setup

### Prerequisites
- Docker and Docker Compose
- Git
- Node.js 20+ (for frontend development)
- Python 3.11+ (for backend development)

### Setup

1. Clone the repository:
```bash
git clone https://github.com/yourusername/StreamA2026.git
cd StreamA2026
```

2. Copy environment file:
```bash
cp .env.example .env
```

3. Edit `.env` with your configuration

4. Start the development environment:
```bash
docker compose up -d
```

### Running Tests

```bash
# Backend tests
docker compose exec backend pytest

# Frontend tests
docker compose exec frontend npm test
```

## Code Style

### Python (Backend)
- Follow PEP 8
- Use type hints
- Write docstrings for functions and classes
- Maximum line length: 100 characters

### TypeScript/JavaScript (Frontend)
- Use ESLint and Prettier
- Follow existing code style
- Use TypeScript for type safety
- Maximum line length: 100 characters

### Commit Messages

Follow the Conventional Commits specification:

- `feat:` New feature
- `fix:` Bug fix
- `docs:` Documentation changes
- `style:` Code style changes (formatting, etc.)
- `refactor:` Code refactoring
- `test:` Adding or updating tests
- `chore:` Maintenance tasks

Example: `feat: add user profile page`

## Project Structure

```
StreamA2026/
├── backend/          # FastAPI backend
│   ├── app/
│   │   ├── api/     # API endpoints
│   │   ├── models/  # SQLAlchemy models
│   │   ├── schemas/ # Pydantic schemas
│   │   └── ...
├── frontend/         # React frontend
│   ├── src/
│   │   ├── components/
│   │   ├── pages/
│   │   └── ...
├── nginx/           # Nginx configuration
├── caddy/           # Caddy configuration
├── flyway/          # Flyway migrations
└── docker-compose.yml
```

## Security

- Never commit secrets or credentials
- Use environment variables for sensitive data
- Follow security best practices (see SECURITY.md)
- Report security vulnerabilities privately

## Questions?

Feel free to open an issue for any questions or concerns.

## License

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