Thanks for your interest in improving Flow Desktop — a privacy-respecting YouTube and YouTube Music client with a native, fully local recommendation engine, built with Rust, Tauri, React, and TypeScript.
This guide explains how to set up the project, the standards we hold code to, and how to get your changes merged. Contributions of every size are welcome, from typo fixes to new subsystems.
This project is governed by our Code of Conduct. By participating, you are expected to uphold it. Please report unacceptable behavior through the channels described there.
- Report bugs using the bug report template.
- Request features using the feature request template.
- Fix bugs or build features by opening a pull request.
- Improve documentation — the README, this guide, code comments, and in-app copy.
- Help with localization — translation strings live in
src/lib/i18n/strings.json. - Report security issues privately as described in SECURITY.md — please do not open a public issue for vulnerabilities.
- Search existing issues and pull requests first to avoid duplicates.
- For anything beyond a small fix, open an issue (or comment on an existing one) to discuss the approach before writing code. This avoids wasted effort on changes that may not be a good fit.
- Keep pull requests focused. One logical change per PR is far easier to review and merge than a large, mixed one.
- Node.js 22.12 or newer
- pnpm 11.9 or newer (this project uses pnpm, not npm or yarn)
- Rust (stable toolchain)
- The Tauri 2 prerequisites for your operating system
On Linux you also need a compatible glibc, GTK 3, and WebKitGTK 4.1 environment.
pnpm install --frozen-lockfile
pnpm tauri devpnpm tauri dev launches the full desktop app with hot reload for the frontend. Use pnpm dev if you only need the Vite frontend in a browser (note that Tauri-only features fall back to mocks outside the native shell).
pnpm test # frontend unit tests (Vitest)
pnpm build # type-check + production frontend build
pnpm tauri build # build native packages for the current OSWindows, Linux, and macOS packages are produced natively by the GitHub Actions release workflow.
src/ React + TypeScript frontend
components/ UI primitives (ui/) and smart domain components ([domain]/)
pages/ Top-level routed views
store/ Zustand global state
lib/ Hooks, API wrappers, i18n, and other non-UI logic
locales/ Localization resources
types/ Shared TypeScript types
src-tauri/ Rust backend (Tauri 2)
src/commands/ Tauri command handlers exposed to the frontend
src/db/ SQLite access and migrations
src/flow_neuro/ Local video recommendation engine
src/music_brain/ Local music recommendation engine
src/streaming/ Media extraction and the loopback media proxy
src/security/ Validation and integrity (BotGuard/PO-token) handling
migrations/ SQL migrations
Assets/ Brand and donation assets
public/ Static assets served by Vite
The UI follows a strict design system. Read Design.md before writing or modifying any React or Tailwind code — it is the source of truth for our look and feel. In short:
- No gradients, glassmorphism/
backdrop-blur, drop shadows, colored borders, or arbitrary hex codes. Use the CSS variables defined insrc/App.css(e.g.var(--color-primary),bg-surface-container). - Keep
components/ui/primitives "dumb" — props in, events out, no data fetching. Put data-fetching containers incomponents/[domain]/and compose them inpages/. - Abstract all backend communication (
invoke(...),fetch(...)) into custom hooks or modules undersrc/lib/— never inside a component'suseEffect. - Use Zustand (
src/store/) for global state; local component state only for transient UI toggles. - Do not hardcode user-facing strings. Add them to
src/lib/i18n/strings.jsonand read them viagetString(...). - Prefer optimistic UI for local database actions, and debounce calls to the Innertube client to avoid
429rate limits.
- Validate all untrusted input (search terms, video/channel/browse IDs, continuation tokens) before making network requests.
- Keep media access behind the tokenized loopback proxy; do not expose public local servers.
- Do not introduce new broad Tauri permissions, secrets, telemetry, or analytics.
- Run
cargo fmtand addresscargo clippywarnings before submitting.
- Match the style, naming, and comment density of the surrounding code.
- Keep privacy and security front of mind — Flow contains no advertising or analytics SDK, requires no account, and stores user data locally. Contributions must preserve these guarantees.
Follow Conventional Commits. Existing history uses prefixes such as feat:, fix:, refactor:, docs:, and CI:, optionally with a scope:
feat(Music): implement endless radio playback
fix(player): correct subtitle offset on seek
docs: clarify Linux build requirements
Write clear, imperative subject lines and explain the why in the body when it is not obvious.
Run the same checks CI runs before opening a PR:
pnpm test
pnpm build
cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features
cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-featuresAdd or update tests when you change behavior, and smoke-test the affected desktop behavior in pnpm tauri dev.
- Fork the repository and create a branch from
main(e.g.feat/endless-radioorfix/subtitle-offset). - Make your changes following the guidelines above.
- Run the testing and quality checks and ensure they pass.
- Push your branch and open a pull request against
main. - Fill out the pull request template completely, including the validation checklist and screenshots or recordings for any visible UI change.
- Link related issues with
Closes #123where applicable. - Respond to review feedback. Maintainers may request changes before merging.
Please confirm that your PR introduces no new secrets, private data, telemetry, or broad permissions, and that dependency/lockfile changes are intentional and minimal.
Flow is free and open-source software maintained by an independent developer. If you would like to support development financially, you can do so through Patreon or via cryptocurrency — see the Support & donations section of the README, or the in-app Support Flow page. Always verify any crypto address and network before sending.
Flow Desktop is licensed under the GNU General Public License v3.0. By contributing, you agree that your contributions will be licensed under the same terms.