# Contributing to SWD Axios Query

Thank you for your interest in contributing to SWD Axios Query! This document provides guidelines and information for contributors.

## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [Getting Started](#getting-started)
- [Development Setup](#development-setup)
- [Making Changes](#making-changes)
- [Testing](#testing)
- [Submitting Changes](#submitting-changes)
- [Release Process](#release-process)

## Code of Conduct

This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [waboasiako@gmail.com](mailto:waboasiako@gmail.com).

## Getting Started

1. **Fork the repository** on GitHub
2. **Clone your fork** locally:
   ```bash
   git clone https://github.com/YOUR_USERNAME/swd-axios-query.git
   cd swd-axios-query
   ```
3. **Install dependencies**:
   ```bash
   npm install
   ```

## Development Setup

### Prerequisites

- Node.js >= 18.0.0
- npm >= 9.0.0

### Available Scripts

- `npm run build` - Build the package
- `npm run lint` - Run ESLint
- `npm run lint:fix` - Fix ESLint issues
- `npm test` - Run tests
- `npm run test:watch` - Run tests in watch mode
- `npm run test:coverage` - Run tests with coverage
- `npm run security:full` - Run full security check

## Making Changes

### Branch Naming

Use descriptive branch names:
- `feature/description` - New features
- `fix/description` - Bug fixes
- `docs/description` - Documentation updates
- `refactor/description` - Code refactoring

### Code Style

- Follow the existing code style
- Use meaningful variable and function names
- Add comments for complex logic
- Ensure all code is properly formatted

### Commit Messages

Use conventional commit format:
```
type(scope): description

[optional body]

[optional footer]
```

Types:
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation changes
- `style`: Code style changes
- `refactor`: Code refactoring
- `test`: Adding or updating tests
- `chore`: Maintenance tasks

## Testing

### Running Tests

```bash
# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage
```

### Writing Tests

- Write tests for new features
- Ensure existing tests pass
- Aim for high test coverage
- Use descriptive test names

### Test Structure

```javascript
describe('Component/Function Name', () => {
  it('should do something specific', () => {
    // Test implementation
  });
});
```

## Submitting Changes

### Pull Request Process

1. **Create a pull request** from your fork
2. **Fill out the PR template** completely
3. **Ensure all checks pass**:
   - Tests pass
   - Linting passes
   - Security checks pass
   - Build succeeds

### PR Requirements

- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] No breaking changes (or clearly documented)
- [ ] Security checks pass
- [ ] Code follows style guidelines

### Review Process

- All PRs require review
- Address feedback promptly
- Keep PRs focused and small
- Update PR description if changes are made

## Release Process

### Version Bumping

We follow [Semantic Versioning](https://semver.org/):
- **MAJOR**: Breaking changes
- **MINOR**: New features (backward compatible)
- **PATCH**: Bug fixes (backward compatible)

### Release Checklist

- [ ] Update CHANGELOG.md
- [ ] Update version in package.json
- [ ] Run full test suite
- [ ] Run security checks
- [ ] Build package
- [ ] Create release notes

## Development Guidelines

### Security

- Never commit secrets or API keys
- Run security audits before submitting
- Follow security best practices
- Report security issues privately

### Performance

- Consider performance implications
- Avoid unnecessary re-renders
- Optimize bundle size
- Profile performance when needed

### Accessibility

- Follow accessibility guidelines
- Test with screen readers
- Ensure keyboard navigation works
- Use semantic HTML

## Getting Help

- **Issues**: Use GitHub Issues for bug reports and feature requests
- **Discussions**: Use GitHub Discussions for questions and ideas
- **Email**: Contact [waboasiako@gmail.com](mailto:waboasiako@gmail.com) for private matters

## Recognition

Contributors will be recognized in:
- CONTRIBUTORS.md file
- Release notes
- GitHub contributors list

Thank you for contributing to SWD Axios Query! 🚀
