Thank you for your interest in contributing to Frigate Config GUI! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Process
- Pull Request Process
- Style Guidelines
- AI Assistant Guidelines
This project adheres to a Code of Conduct that all contributors are expected to follow. Please read CODE_OF_CONDUCT.md before contributing.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/Frigate-Config-GUI.git cd Frigate-Config-GUI
- Install dependencies:
npm install
- Create a new branch:
git checkout -b feature/your-feature-name
-
Test-Driven Development
- Write tests first
- Implement features to pass tests
- Refactor while maintaining test coverage
- Run tests:
npm test
-
Code Organization
frigate-config-gui/ ├── docs/ # Documentation │ ├── dev/ # Developer documentation │ └── user/ # User documentation ├── src/ │ ├── main/ # Electron main process │ ├── renderer/ # React application │ └── shared/ # Shared code ├── tests/ # Test files ├── tools/ # Build and development tools └── flatpak/ # Flatpak packaging
-
Commit Messages
- Use conventional commits format
- Start with type: feat, fix, docs, style, refactor, test, chore
- Example:
feat: Add camera configuration component
- Update documentation if needed
- Add tests for new features
- Ensure all tests pass
- Update CHANGELOG.md if applicable
- Submit PR against the
main
branch - Wait for review and address feedback
-
TypeScript/JavaScript
- Use TypeScript for new code
- Follow ESLint configuration
- Run
npm run lint
before committing
-
React Components
- Use functional components with hooks
- Follow component organization structure
- Include prop types/interfaces
- Add comprehensive comments for complex logic
-
CSS/Styling
- Use TailwindCSS classes
- Follow BEM naming convention for custom CSS
- Maintain responsive design principles
-
Testing
- Write unit tests for utilities
- Write integration tests for components
- Include accessibility tests
- Test across supported languages
-
File Management
- Check
.gitignore
before committing - Don't commit build artifacts
- Don't commit cache directories
- Use designated build directories
- Check
-
Environment Cleanup
# Clean untracked files (use with caution) git clean -fdx
Note: This section is specifically for AI assistants helping with the project.
-
Code Generation
- Always include type definitions
- Generate comprehensive tests
- Include i18n support by default
- Add detailed comments for complex algorithms
-
Documentation
- Keep README.md professional and concise
- Update documentation when adding features
- Include examples in markdown
- Maintain separate dev and user docs
-
Component Creation
- Follow the established component structure
- Include tooltips for all fields
- Support keyboard navigation
- Consider RTL languages
-
Configuration Handling
- Validate against Frigate's schema
- Include default values
- Add migration support
- Handle edge cases
-
Build System
- Update build scripts as needed
- Maintain Flatpak packaging
- Support Windows MSI packaging
- Keep dependencies updated
- Check existing issues first
- Open a new issue with a clear description
- Include relevant code snippets
- Provide error messages if applicable
By contributing, you agree that your contributions will be licensed under the MIT License.