Thank you for your interest in contributing to Hush! This document provides guidelines and information for contributors.
Before creating an issue, please:
- Check if the issue already exists
- Use the appropriate issue template
- Provide as much detail as possible
We welcome feature suggestions! Please:
- Use the feature request template
- Explain the use case and benefits
- Consider if it aligns with our privacy-first mission
-
Fork the repository
-
Clone your fork
git clone https://github.com/<your-username>/hush.git cd hush
-
Set up development environment
cd server npm ci cp .env.example .env npm run d:db npm run typeorm:migrate npm run devcd server: Enter the backend server directory.npm ci: Install exact dependency versions frompackage-lock.jsonfor a clean, reproducible install.cp .env.example .env: Create your local environment file using the example as a template.npm run d:db: Start the Postgres database via Docker Compose as defined underserver/db.npm run typeorm:migrate: Run database migrations to create/update schema.npm run dev: Start the development server with hot-reload.
cd clients/web npm ci npm run devcd clients/web: Enter the Next.js web client directory.npm ci: Install exact dependency versions for the client.npm run dev: Start the Next.js development server.
-
Create a feature branch
git checkout -b feature/your-feature-name
- Ensure both the backend (server) and frontend (client) are running without errors.
- Open http://localhost:3000/register in your browser.
- Register with any email address (for local development, a non-real/fake email is fine).
- Check the backend server terminal output. A verification URL will be printed to the console.
- Click that verification link (or copy-paste it into your browser) to verify the account.
- After verification, go to http://localhost:3000/login and sign in with your credentials.
Notes:
- If you do not see a verification link, confirm the backend is running and watch its logs for the printed URL.
- In production, emails are sent via a real provider; in local development, the link is intentionally logged to the console for convenience.
- Follow existing code patterns and conventions
- Use TypeScript for all new code
- Write meaningful commit messages following Conventional Commits
- Ensure all code is properly typed
- Test your changes thoroughly
- Ensure existing functionality isn't broken
- Add tests for new features when possible
- Never commit encryption keys or secrets
- Follow security best practices for crypto operations
- Be extra careful with authentication and authorization code
- Review encryption implementations with maintainers
Use conventional commit format:
type: description
Examples:
feat: add OAuth2 integration
fix: resolve key generation issue
docs: update installation instructions
refactor: improve connection handling
-
Update your branch
git checkout main git pull origin main git checkout your-feature-branch git rebase main
-
Test your changes
- Run the development server
- Test the web client
- Verify encryption/decryption works
- Check for any console errors
-
Create a Pull Request
- Use the PR template
- Provide a clear description
- Link related issues
- Include screenshots for UI changes
-
Respond to feedback
- Address review comments promptly
- Make requested changes
- Keep the PR focused and atomic
- Controllers: Handle HTTP requests and responses
- Services: Business logic and data processing
- Entities: Database models and relationships
- Repositories: Data access layer
- Socket: Real-time communication handlers
- CLI: Code generation tools
- Components: Reusable UI components
- Hooks: Custom React hooks
- Contexts: State management
- Workers: Background processing for encryption
- Lib: Utility functions and helpers
- All encryption must happen client-side
- Use Web Crypto API for cryptographic operations
- Never store encryption keys on the server
- Follow established patterns for key exchange
- Implement proper RBAC checks
- Validate all user inputs
- Use secure session management
- Follow JWT best practices
- Validate file types and sizes
- Implement proper sanitization
- Use secure upload/download patterns
- Handle encryption/decryption in workers
- Start PostgreSQL database
- Run server migrations
- Start the backend server
- Start the frontend development server
- Test your changes
The project includes CLI tools for generating CRUD operations:
# Generate new CRUD module
npm run cli g:crud ModuleName
# Remove CRUD module
npm run cli r:crud ModuleName
# Generate query code
npm run cli g:queryLook for issues labeled with:
good first issuehacktoberfesthelp wanted
We welcome various types of contributions:
- Bug fixes: Resolve existing issues
- Feature additions: Implement new functionality
- Documentation: Improve docs and examples
- Testing: Add test coverage
- Performance: Optimize existing code
- Security: Improve security measures
- PRs must be submitted between October 1-31
- Must be accepted by maintainers
- Should be meaningful contributions
- Follow our code of conduct
When reporting bugs, please include:
- Environment: OS, Node.js version, browser
- Steps to reproduce: Clear, numbered steps
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Screenshots: If applicable
- Console errors: Any error messages
For feature requests, please include:
- Use case: Why is this feature needed?
- Proposed solution: How should it work?
- Alternatives: Other approaches considered
- Additional context: Any other relevant information
- GitHub Discussions: For questions and general discussion
- GitHub Issues: For bugs and feature requests
By contributing to Hush, you agree that your contributions will be licensed under the MIT License.
Contributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- GitHub contributor graphs
Thank you for contributing to Hush! Together, we're building a more private and secure communication platform.