Thank you for your interest in contributing to GHG Monitor! This document provides guidelines for contributing to the project.
By participating in this project, you agree to abide by our Code of Conduct:
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
- Prioritize the project's scientific accuracy and user needs
- Node.js 18+
- Git
- Basic understanding of TypeScript, React, and Node.js
- Familiarity with greenhouse gas measurement concepts (helpful but not required)
- Fork the repository
- Clone your fork:
git clone https://github.com/yourusername/ghg-monitor.git - Install dependencies:
cd backend && npm install cd ../frontend && npm install
- Start development servers:
# Terminal 1 - Backend cd backend && npm run dev # Terminal 2 - Frontend cd frontend && npm run dev
- TypeScript: Use strict mode, provide proper types
- React: Use functional components with hooks
- Naming: Use descriptive names, follow camelCase for variables, PascalCase for components
- Comments: Document complex algorithms, especially scientific calculations
- Formatting: Use ESLint and Prettier configurations
Follow conventional commits format:
type(scope): description
feat(analysis): add cumulative flux calculation
fix(dashboard): resolve chamber count display issue
docs(api): update endpoint documentation
Types: feat, fix, docs, style, refactor, test, chore
- Feature branches:
feature/description-of-feature - Bug fixes:
fix/description-of-fix - Documentation:
docs/description-of-change
# Backend tests
cd backend && npm test
# Frontend tests
cd frontend && npm test
# E2E tests
npm run test:e2e- Write unit tests for utility functions (especially flux calculations)
- Write integration tests for API endpoints
- Write component tests for React components
- Include edge cases and error scenarios
- All new features must include tests
- Bug fixes should include regression tests
- Maintain or improve test coverage
- Scientific calculations must have validation tests
- Reference scientific literature for formulas
- Include units in variable names and comments
- Validate against known test cases
- Document assumptions and limitations
- Maintain configurable thresholds
- Document quality control criteria
- Test with various data quality scenarios
- Consider edge cases in field measurements
- Clarity: Scientific data should be easy to read and interpret
- Accessibility: Follow WCAG guidelines
- Responsiveness: Support desktop, tablet, and mobile
- Performance: Optimize for large datasets
- Use atomic design principles
- Create reusable components
- Implement proper loading states
- Handle error states gracefully
- Document all public APIs
- Include examples for complex functions
- Explain scientific concepts for non-experts
- Update documentation with code changes
- Document all endpoints in
API.md - Include request/response examples
- Specify error codes and messages
- Update OpenAPI specification
- Check existing issues
- Try to reproduce the bug
- Test with minimal example
- Check if it's a configuration issue
**Describe the bug**
Clear description of the issue
**To Reproduce**
Steps to reproduce the behavior
**Expected behavior**
What you expected to happen
**Screenshots/Data**
Screenshots or sample data files
**Environment**
- OS: [e.g., Windows 10]
- Node.js version: [e.g., 18.17.0]
- Browser: [e.g., Chrome 118]
**Additional context**
Any other relevant information**Feature Description**
Clear description of the proposed feature
**Scientific Justification**
Why this feature is needed for GHG research
**Proposed Implementation**
Ideas for how to implement the feature
**Alternatives Considered**
Other solutions you've considered
**Additional Context**
Any other relevant information- Ensure all tests pass
- Update documentation
- Add/update tests for new features
- Check code style with linter
- Test on different browsers/devices
**Description**
Brief description of changes
**Type of Change**
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
**Scientific Impact**
How this affects flux calculations or data interpretation
**Testing**
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing completed
**Checklist**
- [ ] Code follows style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No breaking changes (or documented)- Automated checks must pass
- At least one reviewer approval required
- Scientific accuracy review for calculation changes
- Performance review for data processing changes
- Additional quality control metrics
- Performance optimizations for large datasets
- Mobile responsiveness improvements
- Accessibility enhancements
- Additional flux calculation methods
- Advanced statistical analysis
- Data export formats
- Calibration and validation tools
- Database integration
- Real-time data streaming
- Advanced caching strategies
- Monitoring and logging
- User tutorials and guides
- Scientific methodology documentation
- Video demonstrations
- Translation to other languages
Follow semantic versioning (semver):
- Major: Breaking changes
- Minor: New features (backward compatible)
- Patch: Bug fixes
- All tests pass
- Documentation updated
- Change log updated
- Version numbers bumped
- Security review completed
- Performance benchmarks run
- Email security issues to: security@ghg-monitor.com
- Do not create public issues for security vulnerabilities
- Include detailed description and reproduction steps
- Never commit secrets or API keys
- Validate all user inputs
- Use HTTPS in production
- Follow OWASP guidelines
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and general discussion
- Email: contact@ghg-monitor.com
- Bug reports: Within 2 business days
- Feature requests: Within 1 week
- Security issues: Within 24 hours
Contributors will be recognized in:
- README.md contributors section
- Release notes
- Project documentation
- Conference presentations (with permission)
Thank you for contributing to sustainable agriculture research! 🌱