Thank you for your interest in contributing to Flow! Whether you are fixing a bug, suggesting a new feature, refining translations, or optimizing performance, your contributions are welcome.
Flow is an independent, open-source project. Please:
- Be respectful and constructive in issues, discussions, and pull requests.
- Focus on actionable feedback and clear communication.
- Remember that contributors are volunteering their time.
- Search existing GitHub Issues to verify the bug or feature has not already been logged.
- If opening a new bug report, include:
- Browser name and version (e.g., Chrome 124, Firefox 125).
- Operating system (Windows, macOS, Linux).
- Clear step-by-step reproduction steps.
- Expected vs. actual behavior (and console errors if available).
Flow supports 11 locales located in src/_locales/. If you are a native speaker and notice awkward phrasing:
- Read our Translation Guide for formatting rules and placeholder constraints.
- Either submit a Pull Request editing the corresponding
messages.jsonfile, or post your feedback in the Translation Discussions Thread.
- Fork and clone the repository:
git clone https://github.com/<your-username>/Flow.git cd Flow
- Install dependencies:
npm install
- Load the extension in your browser:
- Chromium (Chrome / Edge / Brave): Go to
chrome://extensions, enable Developer mode, click Load unpacked, and select thesrc/folder. - Firefox: Go to
about:debugging#/runtime/this-firefox, click Load Temporary Add-on..., and selectsrc/manifest.json.
- Chromium (Chrome / Edge / Brave): Go to
Flow is built on Manifest V3. The data flow and component boundaries are structured as follows:
graph TD
User([User Interaction]) --> Page[Web Page]
User --> Popup[popup/<br/>Toolbar UI]
User --> Dashboard[dashboard/<br/>Settings & Heatmap]
Page --> Content[content/<br/>site-tracker.js]
Content -- "Heartbeats & Hiding" --> Background[background/<br/>service-worker.js]
Popup -- "Start Timer & Toggles" --> Background
Background -- "Update Rules" --> DNR{Declarative Net<br/>Request}
DNR -- "Redirects to" --> Blocked[blocked/<br/>index.html]
Popup -. "Settings" .-> Storage[(lib/storage.js)]
Dashboard -. "Config" .-> Storage
Background -. "Save Sessions" .-> DB[(lib/db.js)]
Dashboard -. "Load History" .-> DB
src/lib/constants.js— Shared constants, default categories, and CSS tweak maps.src/lib/db.js— IndexedDB wrapper for long-term daily analytics (FocusFlowDB).src/lib/storage.js—chrome.storagehelpers (local, sync, session) with in-memory cache.src/lib/icons.js— FlowIcons SVG icon engine (auto-rendersdata-iconattributes).src/lib/i18n.js— Localization helper and dynamic language switching.
We follow the Conventional Commits standard. This helps auto-generate changelogs and keeps the history clean. Please prefix your commits:
feat:for new features (e.g.,feat: add custom timer preset)fix:for bug fixes (e.g.,fix: reset cooldown overlay on click)docs:for documentation changesstyle:for formatting, missing semi-colons, etc.refactor:for code changes that neither fix a bug nor add a feature
- Local-First & Zero Telemetry: Never add external network calls, tracking scripts, or cloud dependencies. All state must remain on the client.
- Minimal Dependencies: Standard Web APIs are preferred over third-party npm packages.
- No Full-File Auto-Formatting: Avoid running global "Format Document" (Prettier / VS Code formatters) across existing files. Only format the specific lines you changed. Large reformatting diffs make code review difficult.
- Visual Context for UI Changes: If your PR changes the popup, dashboard, or blocked page, attach a screenshot or GIF of the UI in action.
- Use the Central Icon Engine (
FlowIcons): Do not write inline<svg>elements. Use<span data-icon="iconName"></span>in HTML orFlowIcons.get("iconName")in JS viasrc/lib/icons.js. - Locale Validation: Any added translation key must exist in
src/_locales/en/messages.jsonand follow Chrome's$placeholder$schema requirements. Runningnpm run buildwill verify this automatically.
All build tooling is defined in package.json and runs via Node.js:
| Command | Description |
|---|---|
npm run build |
Validates i18n parity, minifies JavaScript/CSS with esbuild, adjusts Firefox manifests, and outputs to dist/chrome/, dist/edge/, and dist/firefox/. |
npm run zip |
Runs the build and generates store-ready archives in release/. |
Skip Prompt Flag: To run the build without interactive CLI prompts, use
npm run build -- --yes.
Flow follows Semantic Versioning (SemVer). To cut a new release:
- Update the version number in
src/manifest.json. - Document the changes in
CHANGELOG.mdunder a new version heading. - Commit with
chore: release vX.Y.Z. - Run
npm run zipto generate the.zippackages for the Chrome Web Store, Edge Add-ons, and Mozilla AMO. - Upload the zips and create a GitHub Release with the source code.
Please test your changes on at least one browser engine before submitting a pull request:
| Engine | Target Browsers | Loading Method |
|---|---|---|
| Chromium | Google Chrome, Microsoft Edge, Brave, Opera, Vivaldi | chrome://extensions → Load unpacked → src/ |
| Gecko | Mozilla Firefox, Zen Browser, Floorp | about:debugging#/runtime/this-firefox → Load Temporary Add-on → src/manifest.json |
Before submitting a Pull Request, please ensure:
- Tested Locally: Tested in Developer Mode on at least one Chromium or Firefox browser.
- Build & Linter Passes:
npm run build -- --yescompiles with 0 errors (all i18n checks pass). - Commit Messages: Follow the
feat:,fix:,docs:convention. - No Full-File Reformatting: Git diff only includes the relevant logic/style changes.
- Visual Proof Attached: Screenshots or GIFs included in the PR description for any UI modifications.
- Zero Telemetry / Local-First: Verified that no external server requests or tracking mechanisms were introduced.