Contributing Guide
Ways to Contribute
Reporting Bugs
- Search GitHub Issues to check if the problem already exists
- If not, create a new Issue including:
- Problem description
- Steps to reproduce
- Expected behavior vs actual behavior
- Browser/OS version
- Relevant screenshots or logs
Feature Requests
- Create a Feature Request on GitHub Issues
- Describe the use case and expected behavior
- Explain why this feature would be valuable to the project
Submitting Code
- Fork the project
- Create a feature branch:
git checkout -b feature/your-feature - Write code and tests
- Ensure all checks pass:
Terminal window # Backendcd arthas-servergo build ./...go test ./...go vet ./...# Frontendcd arthas-clientnpx tsc --noEmitnpm run build - Commit:
git commit -m "feat: your feature description" - Push:
git push origin feature/your-feature - Create a Pull Request
Development Workflow
Branch Strategy
| Branch | Purpose |
|---|---|
main | Stable releases |
develop | Development branch |
feature/* | Feature development |
fix/* | Bug fixes |
Commit Convention
Use Conventional Commits:
feat: add message recall featurefix: fix message loss after reconnectiondocs: update deployment documentationrefactor: refactor room management logictest: add encryption layer unit testschore: update dependency versionsCode Standards
Go Code
- Format with
gofmt - Check with
go vet - Exported functions must have comments
- Error handling uses
errorreturns, not panic - Concurrency safety uses
sync.RWMutex
TypeScript Code
- Strict mode (
strict: true) - Use functional components + React Hooks
- Define Props with interfaces
- Avoid
anytypes - Use Tailwind CSS, no custom CSS
Security Guidelines
- Never log message content on the server
- Never store roomKey on the server
- Crypto-related code changes require extra review
- New server logs must not contain user messages
Pull Request Checklist
- Code passes
go build ./...andnpm run build - Backend tests pass
go test ./... - Frontend type checking passes
npx tsc --noEmit - New features have corresponding tests
- Documentation updated (if applicable)
- No new security risks introduced
- Commit messages follow convention
Architecture Decisions
Before contributing, please understand these design decisions:
- Server Zero-Knowledge — No modification may give the server decryption capability
- No Persistence — No database, pure in-memory design
- No Third-Party Crypto Libraries — Frontend uses only Web Crypto API
- Binary Protocol — Uses MessagePack, not JSON
- No Router Library — Frontend uses hash routing, no react-router
Getting Help
- Read the Development Guide to understand the code structure
- Read the Architecture Document to understand design decisions
- Ask questions in Issues
Code of Conduct
- Respect all contributors
- Discuss technical approaches constructively
- Accept code review feedback
- Be friendly and professional