Thank you for your interest in contributing to the Productboard Notes Manager! This document provides guidelines for contributing to the project.
We follow a Test-Driven Development (TDD) approach:
- Write Tests First - Always write tests before implementing functionality
- Red-Green-Refactor - Write failing tests, make them pass, then refactor
- Maintain Coverage - Ensure all new code meets the 80%+ coverage thresholds
- Test Edge Cases - Include error handling, boundary conditions, and failure scenarios
- Node.js 18.x or higher
- npm or yarn
- Git
- Productboard API token (for testing)
-
Fork the repository
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/productboard-notes-manager.git cd productboard-notes-manager -
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env # Add your Productboard API token -
Run tests to ensure everything works:
npm test -
Start the development server:
npm run dev
- Create a new branch for each feature or bug fix
- Use descriptive branch names:
feature/add-note-filteringbugfix/fix-rollback-issuedocs/update-api-documentation
- Follow existing code style and patterns
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
All contributions must include tests!
- Write tests first for any new functionality
- Ensure all tests pass:
npm test - Maintain coverage:
npm run test:coverage - Test edge cases: Error conditions, boundary values, invalid inputs
- Statements: 80% minimum
- Functions: 80% minimum
- Lines: 80% minimum
- Branches: 50% minimum
describe('Feature Name', () => {
beforeEach(() => {
// Setup
});
afterEach(() => {
// Cleanup
});
it('should do something specific', async () => {
// Arrange
const input = 'test data';
// Act
const result = await functionUnderTest(input);
// Assert
expect(result).toBe('expected output');
});
});- Create a feature branch from
main - Write tests for your changes
- Implement the feature
- Run the full test suite:
npm test - Check test coverage:
npm run test:coverage - Update documentation if needed
- Commit your changes with clear messages
- Push to your fork
- Create a pull request
- Use clear, descriptive titles
- Start with the type of change:
feat: add note filtering functionalityfix: resolve rollback issue with deleted notesdocs: update API documentationtest: add integration tests for note creation
## Description
Brief description of the changes made.
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
## Testing
- [ ] All existing tests pass
- [ ] New tests have been added for new functionality
- [ ] Test coverage meets minimum requirements
- [ ] Manual testing completed
## Checklist
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes- Automated checks must pass (tests, linting, coverage)
- Manual review by maintainers
- Address feedback if requested
- Final approval and merge
Use the bug report template:
**Bug Description**
A clear description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected Behavior**
What you expected to happen.
**Actual Behavior**
What actually happened.
**Environment**
- OS: [e.g. macOS, Windows, Linux]
- Node.js version: [e.g. 18.17.0]
- npm version: [e.g. 9.6.7]
- Browser: [e.g. Chrome 91.0]
**Additional Context**
Any other context about the problem.Use the feature request template:
**Feature Description**
A clear description of what you want to happen.
**Use Case**
Describe the use case this feature would solve.
**Proposed Solution**
Describe the solution you'd like.
**Alternatives Considered**
Describe any alternative solutions you've considered.
**Additional Context**
Any other context or screenshots about the feature request.- Backward compatibility: Avoid breaking existing API endpoints
- Versioning: Use API versioning for major changes
- Documentation: Update API documentation for any changes
- Migration strategy: Provide migration path for existing data
- Backward compatibility: Ensure old data formats are supported
- Testing: Test with existing data structures
- Input validation: Validate all user inputs
- Authentication: Maintain secure authentication patterns
- API keys: Never commit API keys or sensitive data
- Dependencies: Keep dependencies updated
If you have questions about contributing:
- Check existing issues
- Create a new issue with the "question" label
- Join the discussion in existing issues
All contributors will be recognized in the project's README and release notes.
Thank you for contributing to Productboard Notes Manager! 🎉