Welcome Contributors!
Contributions, issues, and feature requests are welcome! This guide will help you get started with contributing to Better Home.Getting Started
Fork the repository
Fork the Better Home repository to your GitHub account.
Development Workflow
1. Make Your Changes
Develop your feature or fix:- Make incremental, logical commits
- Test your changes thoroughly in the browser
- Ensure the extension builds successfully
2. Code Style
Better Home uses Biome for linting and formatting, configured with the Ultracite preset for consistent code style.The pre-commit hook automatically runs
ultracite fix on staged files before each commit, ensuring code style consistency.3. Type Checking
Ensure your code passes TypeScript type checking:4. Commit Your Changes
Better Home uses Conventional Commits enforced by commitlint.Commit Message Format
Commit Types
feat
feat
A new feature for the user
fix
fix
A bug fix
docs
docs
Documentation changes only
style
style
Code style changes (formatting, missing semicolons, etc.)
refactor
refactor
Code change that neither fixes a bug nor adds a feature
perf
perf
Performance improvement
test
test
Adding or updating tests
chore
chore
Changes to build process, dependencies, or tooling
The commit-msg hook automatically validates your commit messages. Invalid commits will be rejected.
Example Commits
5. Push Your Changes
Push your feature branch to your fork:6. Open a Pull Request
Create the PR
Go to the Better Home repository and click “New Pull Request”.
Provide context in the description
- Summarize what changed and why
- Link related issues (e.g., “Closes #123”)
- Include screenshots for UI changes
- Note any breaking changes
Code Style Guidelines
TypeScript
- Use strict types - no
anyunless absolutely necessary - Prefer interfaces for object shapes
- Use type inference when possible
- Export types from
src/types/directory
React
- Functional components only - no class components
- Use hooks for state and effects
- Extract custom hooks for reusable logic
- Keep components focused - single responsibility
Styling
- Use Tailwind utilities - avoid custom CSS
- Use design system variables for colors
- Responsive-first - mobile to desktop
- Dark mode support - test both themes
File Organization
- Group by feature - related files together
- Use index exports sparingly
- Keep utilities pure - no side effects in
/lib - Type files in
/types- shared type definitions
Git Hooks
Better Home uses Husky for Git hooks:Pre-commit Hook
Automatically runs before each commit:- Checks for staged files
- Runs
ultracite fixon staged files - Re-stages formatted files
- Preserves unstaged changes via stash
Commit-msg Hook
Validates commit messages:- Checks conventional commit format
- Enforces allowed types (
feat,fix,docs, etc.) - Rejects invalid commits with helpful error messages
Testing Checklist
Before submitting a PR, ensure:- Build
- Code Quality
- Functionality
- UI/UX
- Project builds without errors:
bun run build - No TypeScript errors:
bun x tsc --noEmit - Extension loads in browser successfully
- No console errors in DevTools
Questions or Issues?
If you have questions or run into issues:- Check the installation troubleshooting
- Open an issue on GitHub
- Review existing PRs for examples
License
By contributing, you agree that your contributions will be licensed under the MIT License.Thank you for contributing to Better Home! Your efforts help make this extension better for everyone.