Thank you for your interest in contributing to Adaptly! This document provides guidelines and information for contributors.
Before creating an issue, please:
- Search existing issues to avoid duplicates
- Check the documentation to ensure it's not a usage question
- Use the issue templates when available
When reporting bugs, please include:
- Environment details: Node.js version, package manager, OS
- Steps to reproduce: Clear, numbered steps
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Screenshots/logs: If applicable
- Minimal reproduction: If possible, create a minimal example
For feature requests, please:
- Check existing issues for similar requests
- Describe the use case and why it would be valuable
- Provide examples of how the feature would work
- Consider implementation complexity and maintenance burden
- Node.js 18+
- npm, yarn, pnpm, or bun
- Git
-
Fork the repository
git clone https://github.com/your-username/adaptly.git cd adaptly -
Install dependencies
cd adaptly-lib npm install cd ../examples/adaptly-demo npm install
-
Set up environment variables
# In examples/adaptly-demo/ cp .env.example .env.local # Add your Gemini API key
-
Run the development server
# From project root make demo-app
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the coding standards
- Add tests if applicable
- Update documentation
-
Test your changes
# Test the library cd adaptly-lib npm run build # Test the demo cd ../examples/adaptly-demo npm run dev
-
Commit your changes
git add . git commit -m "feat: add your feature description"
-
Push and create a pull request
git push origin feature/your-feature-name
- Use TypeScript for all new code
- Define proper types for all functions and components
- Use interfaces for object shapes
- Avoid
any- use proper typing
- Use functional components with hooks
- Define prop interfaces for all components
- Use proper naming conventions (PascalCase for components)
- Add JSDoc comments for complex functions
- Follow existing patterns in the codebase
- Use meaningful variable names
- Keep functions small and focused
- Add comments for complex logic
adaptly-lib/
├── core/
│ ├── components/ # React components
│ ├── services/ # Business logic
│ ├── types/ # TypeScript definitions
│ └── utils/ # Utility functions
├── docs/ # Documentation
└── tests/ # Test files
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage- Test component behavior, not implementation details
- Use descriptive test names
- Test edge cases and error conditions
- Mock external dependencies
describe('ComponentName', () => {
it('should render correctly', () => {
// Test implementation
});
it('should handle user interaction', () => {
// Test implementation
});
});- Add JSDoc comments for all public functions
- Document complex algorithms and business logic
- Include usage examples in comments
- Update README files when adding new features
- Document all public APIs
- Include parameter descriptions
- Provide usage examples
- Update type definitions
- Update quick start guide for new features
- Add troubleshooting sections for common issues
- Include migration guides for breaking changes
- Update changelog for all changes
We follow Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
- Update CHANGELOG.md for all releases
- Group changes by type (Added, Changed, Fixed, Removed)
- Include migration notes for breaking changes
- Link to issues and PRs when relevant
- All tests pass
- Documentation is updated
- Changelog is updated
- Version is bumped
- Release notes are written
- Use welcoming language
- Be respectful of differing viewpoints
- Focus on what's best for the community
- Show empathy towards other community members
- Provide constructive feedback
- Suggest improvements rather than just pointing out problems
- Help others learn and grow
- Share knowledge and resources
- Work together towards common goals
- Share credit for collaborative work
- Be open to feedback and suggestions
- Help newcomers get started
- Reproduce the bug locally
- Identify the root cause
- Check for existing fixes or similar issues
- Understand the impact of the fix
- Write a test that reproduces the bug
- Implement the fix
- Ensure the test passes
- Check for regressions
- Update documentation if needed
- Add to changelog
- Test in different environments
- Get code review
- Discuss the feature in an issue first
- Get approval from maintainers
- Plan the implementation
- Consider backward compatibility
- Follow the coding standards
- Write comprehensive tests
- Update documentation
- Consider performance implications
- Get thorough code review
- Test in different scenarios
- Update examples and demos
- Prepare migration guide if needed
- Documentation: Check the
/docsfolder - Issues: Search existing issues on GitHub
- Discussions: Use GitHub Discussions for questions
- Discord: Join our community Discord (if available)
- Maintainer: Gaurab Chhetri
- Email: [Your email]
- GitHub: @gauravfs-14
Contributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- GitHub contributors page
- Project documentation
Thank you for contributing to Adaptly! 🚀