Contributing Guide
Getting Started
Prerequisites
Before you begin contributing to focEliza, ensure you have:
- Node.js (v23 or higher)
- pnpm
- Git
- A GitHub account
- Basic knowledge of TypeScript and blockchain technology
Setting Up Development Environment
- Fork the repository
- Clone your fork:bash
git clone https://github.com/focai-acc/focEliza.git cd focEliza
- Install dependencies:bash
pnpm install
- Set up environment variables:bash
cp .env.example .env # Edit .env with your configuration
Development Workflow
1. Creating a Feature Branch
bash
# Create and checkout a new branch
git checkout -b feature/your-feature-name
# For bug fixes
git checkout -b fix/bug-description
# For documentation
git checkout -b docs/description
2. Making Changes
- Write clear, concise commit messages
- Add tests for new features
- Update documentation as needed
3. Commit Guidelines
We follow conventional commits:
bash
# Format
<type>(<scope>): <description>
# Examples
feat(tee): add new verification method
fix(core): resolve memory leak
docs(api): update authentication docs
test(core): add unit tests for state management
Types:
feat
: New featurefix
: Bug fixdocs
: Documentation changesstyle
: Code style changes (formatting, etc.)refactor
: Code refactoringtest
: Adding or modifying testschore
: Maintenance tasks
4. Testing
bash
# Run all tests
pnpm test
# Run specific test file
pnpm test path/to/test
# Run tests in watch mode
pnpm test:watch
5. Submitting a Pull Request
Push your changes:
bashgit push origin feature/your-feature-name
Create a Pull Request on GitHub:
- Use a clear, descriptive title
- Reference any related issues
- Provide detailed description of changes
- Include screenshots for UI changes
Respond to review comments
Update your PR if needed:
bashgit add . git commit -m "fix: address review comments" git push origin feature/your-feature-name
Code Review Process
What We Look For
Code Quality
- Follows TypeScript best practices
- Proper error handling
- Efficient algorithms
- Clear naming conventions
Testing
- Adequate test coverage
- Test edge cases
- Integration tests where needed
Documentation
- Clear code comments
- Updated API documentation
- Example usage where appropriate
Security
- No sensitive data exposure
- Proper input validation
- Secure communication
Review Timeline
- Initial review: 1-2 business days
- Follow-up reviews: 1 business day
- Final approval: 1-2 reviewers required
Community Guidelines
Communication Channels
GitHub Issues
- Bug reports
- Feature requests
- Documentation improvements
Developer Forums
- Technical discussions
- Architecture proposals
- Best practices sharing
Code of Conduct
Be Respectful
- Value diverse opinions
- Use inclusive language
- Be constructive in feedback
Be Professional
- Stay on topic
- Write clear communications
- Follow up on commitments
Be Collaborative
- Share knowledge
- Help others learn
- Credit others' work
Release Process
Version Numbering
We follow semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Release Checklist
- Update version number
- Update CHANGELOG.md
- Run full test suite
- Update documentation
- Create release tag
- Deploy to staging
- Verify deployment
- Deploy to production
Hotfix Process
- Create hotfix branch
- Implement fix
- Test thoroughly
- Update patch version
- Create PR for main
- Deploy after approval
Getting Help
Resources
Documentation
- API reference
- Architecture guides
- Best practices
- Examples
Community Support
- Stack Overflow tags
- GitHub discussions
Issue Templates
- Bug reports
- Feature requests
- Documentation updates
Contact
- Technical Issues: GitHub Issues
- General Questions: GitHub Discussions