Thank you for your interest in contributing! This project follows Test-Driven Development (TDD) principles and maintains high code quality standards.
- Node.js v18+ and npm v8+
- Twilio Account with credits (sign up)
- Segment Workspace (free tier is fine)
- OpenAI API Key for AI conversations
-
Fork the repository
# Click "Fork" on GitHub, then: git clone https://github.com/YOUR-USERNAME/twilio-synthetic-call-data-generator.git cd twilio-synthetic-call-data-generator
-
Install dependencies
npm install
-
Configure environment
cp .env.example .env # Edit .env with your credentials -
Run tests
npm testExpected: All tests should pass (634 tests)
-
Set up pre-commit hooks (optional but recommended)
# Ensure code is formatted and linted before commits npm run lint npm run format
We practice Test-Driven Development (TDD):
-
Write a failing test first
# Create your test in tests/unit/, tests/integration/, or tests/e2e/ npm run test:watch # Run tests in watch mode
-
Implement the feature
- Write minimal code to make the test pass
- Follow existing code patterns
- Add inline comments explaining WHY, not just WHAT
-
Refactor
- Clean up code while keeping tests green
- Run full test suite:
npm test
-
Lint and format
npm run lint:fix npm run format
- All new features must have tests
- All tests must pass before creating a PR
- Coverage: Aim for >80% on new code
- Types of tests:
- Unit tests:
tests/unit/- Test individual functions - Integration tests:
tests/integration/- Test module interactions - E2E tests:
tests/e2e/- Test complete workflows
- Unit tests:
- ESLint: Code must pass
npm run lint - Prettier: Code must be formatted with
npm run format - Comments:
- All files start with 2-line
// ABOUTME:header - Inline comments explain WHY, not WHAT
- Avoid temporal references ("recently changed", "new", etc.)
- All files start with 2-line
- Naming: Use descriptive, evergreen names (no "new", "improved", etc.)
Follow conventional commit format:
type(scope): brief description
Longer description if needed (optional)
Fixes #123
Types: feat, fix, docs, test, refactor, chore
Examples:
feat(pairing): add complexity-based agent matchingfix(transcribe): handle empty speech results gracefullydocs(readme): update cost estimation sectiontest(respond): add tests for OpenAI error handling
-
Ensure all tests pass
npm test npm run test:coverage -
Lint and format code
npm run lint:fix npm run format
-
Run pre-deployment checks
npm run pre-deploy
-
Update documentation
- Update README.md if adding features
- Update relevant docs in
/docs - Add JSDoc comments for new functions
-
Create a descriptive title
- Good: "Add retry logic to Twilio API calls with exponential backoff"
- Bad: "Fix bug"
-
Fill out the PR template (auto-populated when you create PR)
- Describe what changed and why
- Link related issues
- Add screenshots/videos for UI changes
- List breaking changes (if any)
-
Request review
- Tag relevant maintainers
- Respond to feedback promptly
- Make requested changes in new commits (don't force-push during review)
- ✅ All tests passing
- ✅ No lint errors
- ✅ Code formatted with Prettier
- ✅ Documentation updated
- ✅ CHANGELOG.md updated (for significant changes)
- ✅ No secrets or credentials committed
Found a bug? Open an issue with:
- Clear title: "Conference webhook fails when recording is disabled"
- Environment: Node version, OS, Twilio account type
- Steps to reproduce: Numbered list of exact steps
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Logs/screenshots: Include relevant error messages
Use the bug report template when creating issues.
Have an idea? Open an issue with:
- Problem statement: What problem does this solve?
- Proposed solution: How would it work?
- Alternatives considered: Other approaches you thought about
- Use cases: Who would benefit and how?
Use the feature request template when creating issues.
Good documentation is as important as good code!
- Code comments: Explain complex logic
- README updates: For new features or changed behavior
- API docs: Update
/docs/api-documentation.mdfor new APIs - Examples: Add usage examples for new features
Found a security vulnerability?
DO NOT open a public issue. See SECURITY.md for reporting instructions.
Be respectful and constructive:
- Welcome newcomers
- Respect differing viewpoints
- Accept constructive criticism gracefully
- Focus on what's best for the community
Contributors are recognized in:
- GitHub contributors page
- Release notes for significant contributions
- Special thanks in README for major features
- General questions: Open a GitHub Discussion
- Bug reports: Open an issue
- Feature requests: Open an issue
- Security issues: See SECURITY.md
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing! 🎉
Your efforts help make this project better for everyone.