Contributing to HD Homey
Thank you for your interest in contributing to HD Homey! This guide will help you get started with development and understand our processes.
Ways to Contribute
Code Contributions
- Bug fixes
- New features
- Performance improvements
- Test coverage improvements
- Documentation updates
Non-Code Contributions
- Bug reports with detailed reproduction steps
- Feature requests and ideas
- Documentation improvements
- User support in GitHub Issues
- Translations (future)
Getting Started
Prerequisites
- Node.js 20+ (LTS recommended)
- Docker and Docker Compose (optional, for testing)
- Git
- A code editor (VS Code recommended)
- HDHomeRun device (for testing streaming features)
Development Setup
Set up your local development environment.
View Development Setup Guide →
Quick start:
bash
git clone https://github.com/shaunburdick/hd-homey.git
cd hd-homey
npm ci
cp .env-example .env
# Edit .env with your configuration
npm run devDevelopment Process
HD Homey follows a spec-driven development process:
Learn About Spec-Driven Development →
The Workflow
- Specification: All features start with a spec in
.specs/features/ - Planning: Technical design and implementation plan
- Tasking: Break work into concrete tasks
- Implementation: Write code following the plan
- Testing: Unit tests and manual validation
- Review: Code review and quality checks
- Documentation: Update docs as needed
Before You Start Coding
- Check existing issues: See if your idea is already being worked on
- Create/find a spec: Features need specs before implementation
- Discuss approach: Comment on the issue or create one
- Get alignment: Make sure maintainers agree with the approach
This saves everyone time and prevents duplicate work!
Code Standards
TypeScript
- Strict mode enabled (no
anytypes) - Proper typing for all functions and variables
- Use TypeScript features (interfaces, types, enums)
Code Style
- ESLint must pass (run
npm run lint) - Prettier formatting (automatic on save if configured)
- Meaningful variable and function names
- Comments for complex logic
Testing
- Unit tests required for all business logic
- Target 80%+ code coverage for new code
- Tests should be clear and maintainable
- Use React Testing Library for components
Commits
- Clear, descriptive commit messages
- Follow conventional commits format:
feat: add channel favoritesfix: resolve stream token expiration bugdocs: update installation guidetest: add coverage for tuner validation
Project Architecture
Understanding the codebase structure helps with navigation and contributions.
Key Directories
src/
├── app/ # Next.js app router (pages, layouts)
├── components/ # React components
├── lib/ # Business logic and utilities
│ ├── auth/ # Authentication (Better-Auth)
│ ├── database/ # Database schema and queries
│ ├── hdhr/ # HDHomeRun API client
│ └── transcoding/ # FFmpeg transcoding logic
└── scripts/ # Build and utility scriptsTechnology Stack
- Framework: Next.js 16 (App Router)
- Database: SQLite + Drizzle ORM
- Auth: Better-Auth 1.1
- Testing: Vitest + React Testing Library
- Styling: new.css (classless CSS)
Testing Your Changes
Run Tests
bash
# All tests
npm test
# With coverage
npm run test:coverage
# Watch mode
npm run test:watchLint Code
bash
npm run lintTest Build
bash
npm run buildManual Testing
bash
# Development server
npm run dev
# Visit http://localhost:3000
# Test your changes manuallyDocker Testing
bash
# Build image
docker build -t hd-homey:test .
# Run container
docker compose upSubmitting Changes
Pull Request Process
Create a feature branch:
bashgit checkout -b feature/your-feature-nameMake your changes:
- Follow code standards
- Add tests
- Update documentation
Test thoroughly:
- Run test suite
- Run linter
- Test manually
Commit your changes:
bashgit add . git commit -m "feat: add your feature description"Push to your fork:
bashgit push origin feature/your-feature-nameOpen a pull request:
- Clear title and description
- Reference related issues
- Explain what and why (not just what)
- Add screenshots for UI changes
Pull Request Checklist
- [ ] Tests pass (
npm test) - [ ] Linter passes (
npm run lint) - [ ] Build succeeds (
npm run build) - [ ] Code is documented (JSDoc comments)
- [ ] Changes are tested manually
- [ ] Documentation updated (if needed)
- [ ] Spec updated (if feature work)
- [ ] CHANGELOG.md updated
Code Review
What to Expect
- Maintainers will review your PR
- Feedback may be requested
- CI checks must pass
- At least one approval required
Review Focus Areas
- Code quality and style
- Test coverage
- Performance implications
- Security considerations
- Documentation completeness
Project Governance
Maintainers
- @shaunburdick - Project creator and lead maintainer
Decision Making
- Spec-driven development for all features
- Discussion in GitHub Issues
- Consensus-based decisions
- Maintainer has final say for project direction
Resources
Documentation
Questions?
- Bug reports: GitHub Issues
- Feature requests: GitHub Issues
- Questions: GitHub Discussions (coming soon)
Code of Conduct
Be respectful, inclusive, and professional:
- Welcome newcomers and help them learn
- Accept constructive criticism gracefully
- Focus on what's best for the project
- Show empathy towards other contributors
Thank you for contributing to HD Homey! 🎉
