Thank you for your interest in contributing to Navet! This document provides guidelines for contributing to this project.
- Code of Conduct
- Getting Started
- Development Process
- Coding Standards
- Submitting Changes
- Reporting Bugs
- Feature Requests
This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please be respectful and constructive in all interactions.
- Node.js
^20.19.0or>=22.12.0 - pnpm 10
- Git
- Basic knowledge of React, TypeScript, and Tailwind CSS
-
Fork the repository
# Click the "Fork" button on GitHub -
Clone your fork
git clone https://github.com/YOUR_USERNAME/navet.git cd navet -
Add upstream remote
git remote add upstream https://github.com/awesomestvi/navet.git
-
Install dependencies
pnpm install
-
Start development server
pnpm dev
Open the URL Vite prints, usually
http://localhost:5173. For live Home Assistant testing, enter your Home Assistant URL and long-lived access token in the onboarding screen. Normal source development does not require copying.env.example; the repo-root.envflow is for Docker/add-on runtime defaults and production-style preview work.
main- Production-ready codefeature/*- New featuresbugfix/*- Bug fixeshotfix/*- Critical production fixes
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Write clean, maintainable code
- Follow existing patterns and conventions
- Test your changes thoroughly
- Update docs whenever dashboard behavior, settings, workflows, or user-facing controls change
-
Commit your changes
git add . git commit -m "feat(dashboard): add amazing new feature"
-
Keep your branch updated
git fetch upstream git rebase upstream/main
-
Push to your fork
git push origin feature/your-feature-name
-
Create a Pull Request
- Go to your fork on GitHub
- Click "New Pull Request"
- Fill out the PR template
- Link any related issues
Pull requests and all branch pushes run GitHub Actions (.github/workflows/ci.yml) in this
order:
pnpm check— Biome lint and formatpnpm check:stories— Storybook title and ownership rulespnpm check:ui-kit— shared UI boundary rulespnpm typecheck— TypeScript (tsc --noEmit)pnpm test— Vitest unit testspnpm build— production Vite build
Before opening a PR, run the relevant fast checks for the area you changed, such as pnpm check,
pnpm check:stories, pnpm check:ui-kit, pnpm typecheck, and pnpm test. CI remains the
source of truth for the production pnpm build step.
Dependabot opens weekly PRs for npm dependency updates; review them for breaking changes before merge.
react and react-dom are listed as optional peerDependencies so Storybook and other tooling can resolve the workspace without forcing duplicate peer installs in every scenario. The app expects React 19 at runtime; keep peerDependencies versions aligned with what Vite and Storybook use.
- Use TypeScript for all new code
- Define proper types and interfaces
- Avoid
anytypes when possible - Use meaningful variable and function names
- Use functional components with hooks
- Keep components focused on a single responsibility
- Follow existing patterns and the architecture rules in
AGENTS.mdandsrc/app/components/README.md
- Use Tailwind CSS utility classes
- Use
getThemeSurfaceTokensfor theme-aware surface decisions instead of inlinetheme === ...branches - Respect the spacing system (xs=4px, sm=8px, md=12px, lg=16px, xl=24px, xxl=32px)
/src/app
├── components/primitives/ # Low-level reusable UI building blocks
├── components/patterns/ # Composed shared UI structures
├── components/system/ # Curated public export surface for shared UI
├── components/shared/ # App-specific shared UI + compatibility shims
├── components/layout/ # App shell layout pieces
├── features/ # Feature-owned modules, hooks, and stores
├── i18n/ # I18n provider and translation messages
├── pwa/ # PWA update state and install/update support
├── hooks/ # Truly shared hooks
├── stores/ # Shared app stores/selectors
├── navigation/ # Section definitions and shared nav metadata
└── utils/ # Shared utilities only
- Prefer feature-owned modules over generic global folders when the code belongs to one feature
- Put new low-level reusable UI under
src/app/components/primitives/ - Put new composed shared UI under
src/app/components/patterns/ - Re-export stable shared UI through
src/app/components/system/ - Treat
src/app/components/shared/as app-specific shared UI or compatibility shims, not the default home for new primitives - Use
@/app/...imports for shared app modules and cross-feature imports
- Components: PascalCase (
MyComponent.tsx) - Hooks: camelCase with
useprefix (useMyHook.ts) - Utilities: camelCase (
myUtil.ts) - Types: PascalCase (
MyType.ts) - Constants: SCREAMING_SNAKE_CASE (
MY_CONSTANT)
Follow Conventional Commits 1.0.0:
- Format:
<type>[optional scope][optional !]: <description> featcommits add a new feature.fixcommits fix a bug.- Other clear types are allowed, such as
build,chore,ci,docs,perf,refactor,style, andtest. - Breaking changes use
!before the colon or aBREAKING CHANGE:footer.
Version bumps follow the beta semver policy in docs/VERSIONING.md. While Navet is in beta, prefer 0.x.y and 0.x.y-beta.n over 1.0.0.
Examples:
feat(calendar): add source selection to card settings
fix(search): match Home Assistant entity-id queries
docs(readme): update appearance and search behavior
refactor(lighting)!: replace legacy light state mapping
Navet uses Husky hooks in .husky/. pnpm install runs the prepare script and installs them automatically.
The current hook split is:
commit-msg- enforces the Conventional Commits header format:
<type>[optional scope][optional !]: <description>
- enforces the Conventional Commits header format:
pre-commitpnpm check:lockfileto keeppackage.jsonandpnpm-lock.yamlin syncpnpm checkfor Biome lint/format issuespnpm check:storiesfor Storybook title conventions, primitive/pattern story coverage, and colocated story ownershippnpm check:ui-kitfor shared UI boundary rules
pre-pushpnpm typecheckpnpm test
If TypeScript errors block a commit, fix the errors instead of updating or relying on a baseline file.
-
Ensure your PR:
- Has a clear, descriptive title
- References any related issues
- Includes a detailed description of changes
- Contains tests for new features (when applicable)
- Updates documentation as needed
- Follows the coding standards
- Has been tested on multiple screen sizes
-
PR Checklist:
- Code follows project style guidelines
- Self-review completed
- Comments added for complex code
- Documentation updated
- No new warnings or errors
- Shared UI is authored in
primitives/orpatterns/when appropriate, not added ad hoc toshared/ - Storybook stories were added or updated for shared UI changes
-
pnpm check:storiespasses for Storybook changes - Tested on mobile, tablet, and desktop
- Tested in light and dark themes
- All automated checks pass
-
Review Process:
- Maintainers will review your PR
- Address any feedback promptly
- Make requested changes in new commits
- Once approved, your PR will be merged
- Check existing issues to avoid duplicates
- Ensure you're using the latest version
- Test with different browsers if applicable
**Description**
A clear description of the bug.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior**
What you expected to happen.
**Screenshots**
If applicable, add screenshots.
**Environment:**
- OS: [e.g., macOS, Windows, Linux]
- Browser: [e.g., Chrome, Firefox, Safari]
- Version: [e.g., 0.1.0-beta.1]
**Additional Context**
Any other context about the problem.We welcome feature requests! Please:
- Check if the feature already exists
- Search existing feature requests
- Provide a clear use case
- Explain why this feature would be useful
- Consider if it fits the project's goals
**Feature Description**
A clear description of the feature.
**Use Case**
Explain the problem this feature would solve.
**Proposed Solution**
How you envision this feature working.
**Alternatives Considered**
Other solutions you've thought about.
**Additional Context**
Mockups, examples, or references.By contributing, you agree that your contributions will be licensed under the same license as the project (AGPL-3.0-only).
Questions? Feel free to open an issue or discussion on GitHub!