Contributing
#
Getting the source#
Core, Web, Docker, and DocumentationThis repository holds the main Frigate application and all of its dependencies.
Fork blakeblackshear/frigate to your own GitHub profile, then clone the forked repo to your local machine.
From here, follow the guides for:
#
Frigate Home Assistant AddonThis repository holds the Home Assistant Addon, for use with Home Assistant OS and compatible installations. It is the piece that allows you to run Frigate from your Home Assistant Supervisor tab.
Fork blakeblackshear/frigate-hass-addons to your own Github profile, then clone the forked repo to your local machine.
#
Frigate Home Assistant IntegrationThis repository holds the custom integration that allows your Home Assistant installation to automatically create entities for your Frigate instance, whether you run that with the addon or in a separate Docker instance.
Fork blakeblackshear/frigate-hass-integration to your own GitHub profile, then clone the forked repo to your local machine.
#
Core#
Prerequisites- Frigate source code
- GNU make
- Docker
#
Web Interface#
Prerequisites- Frigate source code
- All core prerequisites or another running Frigate instance locally available
- Node.js 14
#
Making changes#
1. Set up a Frigate instanceThe Web UI requires an instance of Frigate to interact with for all of its data. You can either run an instance locally (recommended) or attach to a separate instance accessible on your network.
To run the local instance, follow the core development instructions.
If you won't be making any changes to the Frigate HTTP API, you can attach the web development server to any Frigate instance on your network. Skip this step and go to 3a.
#
2. Install dependencies#
3. Run the development server#
3a. Run the development server against a non-local instanceTo run the development server against a non-local instance, you will need to provide an environment variable, SNOWPACK_PUBLIC_API_HOST
that tells the web application how to connect to the Frigate API:
#
4. Making changesThe Web UI is built using Snowpack, Preact, and Tailwind CSS.
Light guidelines and advice:
- Avoid adding more dependencies. The web UI intends to be lightweight and fast to load.
- Do not make large sweeping changes. Open a discussion on GitHub for any large or architectural ideas.
- Ensure
lint
passes. This command will ensure basic conformance to styles, applying as many automatic fixes as possible, including Prettier formatting.
- Add to unit tests and ensure they pass. As much as possible, you should strive to increase test coverage whenever making changes. This will help ensure features do not accidentally become broken in the future.
- Test in different browsers. Firefox, Chrome, and Safari all have different quirks that make them unique targets to interact with.
#
Documentation#
Prerequisites- Frigate source code
- Node.js 14
#
Making changes#
1. Installation#
2. Local DevelopmentThis command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
The docs are built using Docusaurus v2. Please refer to the Docusaurus docs for more information on how to modify Frigate's documentation.
#
3. Build (optional)This command generates static content into the build
directory and can be served using any static contents hosting service.