|
| 1 | +# Contributing to Quack 🦆 |
| 2 | + |
| 3 | +First off, thanks for considering contributing! Quack aims to make the web more private, and we welcome all help. |
| 4 | + |
| 5 | +## Development Setup |
| 6 | + |
| 7 | +1. **Fork and clone the repo** |
| 8 | + ```bash |
| 9 | + git clone https://github.com/YOUR_USERNAME/quack.git |
| 10 | + cd quack |
| 11 | + ``` |
| 12 | + |
| 13 | +2. **Install dependencies** |
| 14 | + ```bash |
| 15 | + npm install |
| 16 | + ``` |
| 17 | + |
| 18 | +3. **Run tests** |
| 19 | + ```bash |
| 20 | + npm test |
| 21 | + ``` |
| 22 | + |
| 23 | +4. **Build the extension** |
| 24 | + ```bash |
| 25 | + npm run build |
| 26 | + ``` |
| 27 | + |
| 28 | +5. **Load in Chrome** |
| 29 | + - Go to `chrome://extensions/` |
| 30 | + - Enable "Developer mode" |
| 31 | + - Click "Load unpacked" |
| 32 | + - Select the `dist/` folder |
| 33 | + |
| 34 | +## Branching Strategy |
| 35 | + |
| 36 | +- `main` — Stable releases only (protected) |
| 37 | +- `develop` — Active development |
| 38 | +- Feature branches — Create from `develop` |
| 39 | + |
| 40 | +### Workflow |
| 41 | + |
| 42 | +1. Create a feature branch from `develop`: |
| 43 | + ```bash |
| 44 | + git checkout develop |
| 45 | + git pull origin develop |
| 46 | + git checkout -b feature/your-feature-name |
| 47 | + ``` |
| 48 | + |
| 49 | +2. Make your changes and commit with clear messages |
| 50 | + |
| 51 | +3. Push and open a PR to `develop`: |
| 52 | + ```bash |
| 53 | + git push origin feature/your-feature-name |
| 54 | + ``` |
| 55 | + |
| 56 | +4. After review and merge to `develop`, changes will be batched into releases on `main` |
| 57 | + |
| 58 | +## Code Style |
| 59 | + |
| 60 | +- **TypeScript**: Strict mode, no `any` unless absolutely necessary |
| 61 | +- **React**: Functional components with hooks |
| 62 | +- **Formatting**: Use consistent indentation (2 spaces) |
| 63 | +- **Naming**: camelCase for variables/functions, PascalCase for components/types |
| 64 | + |
| 65 | +## Testing |
| 66 | + |
| 67 | +All crypto-related changes **must** include tests. Run the test suite before submitting: |
| 68 | + |
| 69 | +```bash |
| 70 | +npm test |
| 71 | +``` |
| 72 | + |
| 73 | +Current coverage: |
| 74 | +- Cryptographic operations (AES, ML-KEM, PBKDF2) |
| 75 | +- Message encoding/decoding |
| 76 | +- Vault operations |
| 77 | +- Export/import flows |
| 78 | +- Group key management |
| 79 | + |
| 80 | +## Security |
| 81 | + |
| 82 | +If you discover a security vulnerability, **do not** open a public issue. Instead, email the maintainer directly or use GitHub's private vulnerability reporting. |
| 83 | + |
| 84 | +Crypto changes require extra scrutiny: |
| 85 | +- Explain the cryptographic reasoning |
| 86 | +- Reference relevant standards (NIST, etc.) |
| 87 | +- Include test vectors when possible |
| 88 | + |
| 89 | +## Pull Request Guidelines |
| 90 | + |
| 91 | +- Keep PRs focused (one feature/fix per PR) |
| 92 | +- Update documentation if needed |
| 93 | +- Ensure all tests pass |
| 94 | +- Add tests for new functionality |
| 95 | +- Write clear commit messages |
| 96 | + |
| 97 | +## Questions? |
| 98 | + |
| 99 | +Open an issue for questions or discussion. We're friendly. 🦆 |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +**Thank you for helping make the web more private!** |
0 commit comments