# Contributing to authia
Thank you for your interest in contributing to authia! This document provides guidelines for contributing to the project.
## Development Setup
### Prerequisites
- Rust (latest stable version)
- wasm-pack (`cargo install wasm-pack`)
- Node.js 18+ or Bun
### Building
```bash
# Build for release
npm run build
# Build for development (faster, larger binary)
npm run build:dev
```
### Testing
```bash
# Run Rust tests
cargo test
# Run JavaScript tests
npm run test:js
# Run all tests
npm test
```
## Code Style
### Rust
- Follow the official Rust style guide
- Run `cargo fmt` before committing
- Run `cargo clippy` and fix all warnings
### TypeScript
- Use TypeScript for all JavaScript code
- Follow the project's ESLint configuration
## Pull Request Process
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Add tests for new functionality
5. Ensure all tests pass
6. Run `cargo fmt` and `cargo clippy`
7. Commit your changes (`git commit -m 'Add amazing feature'`)
8. Push to your branch (`git push origin feature/amazing-feature`)
9. Open a Pull Request
## Commit Messages
- Use clear and descriptive commit messages
- Start with a verb in present tense (e.g., "Add", "Fix", "Update")
- Reference issues when applicable (e.g., "Fix #123")
## Reporting Bugs
When reporting bugs, please include:
- A clear description of the issue
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details (OS, Node.js version, etc.)
## Security Issues
If you discover a security vulnerability, please email the maintainers directly instead of opening a public issue.
## License
By contributing to authia, you agree that your contributions will be licensed under the MIT License.