edytlab logoedytlabGitHub

Developer Guide

Build edytlab from source, run tests, and contribute new tools or providers.

Prerequisites

ToolVersionNotes
Rust1.88 (auto-installed)Pinned via rust-toolchain.toml
Node.js20+LTS recommended
pnpm9.15+npm install -g pnpm

Platform extras

macOS: xcode-select --install for Xcode Command Line Tools.

Windows: Visual C++ Build Tools (Desktop development with C++) + WebView2. Install via Visual Studio Build Tools.

Linux (Ubuntu 22.04+):

sudo apt-get install -y \
  libgtk-3-dev libwebkit2gtk-4.1-dev \
  libappindicator3-dev librsvg2-dev \
  libssl-dev libasound2-dev patchelf

Initial setup

git clone https://github.com/laadtushar/edytlab.git
cd edytlab
pnpm install
cargo build --workspace    # first build: 5–20 min
pnpm tauri:dev             # start dev mode

Subsequent incremental builds complete in under 30 seconds.

Project structure

apps/
  desktop/            Tauri shell — React frontend + Rust bridge
  cli/                Headless CLI for batch operations
crates/
  ai/                 LLM providers, agent loop, keychain
  tools/              28 audio-editing tools
  session/            Session DAG data model and store
  audio-decoder/      File decode (symphonia)
  audio-engine/       DSP graph and render
  audio-io/           cpal playback
  ml-demucs/          Stem separation (ONNX Demucs)
  ml-whisper/         Transcription (ONNX Whisper)
  ml-pipeline/        Shared ONNX runtime + model cache
  memory/             Global/project markdown memory
  skills/             User skill library
  agent_profiles/     Per-session model + tool profiles
  mcp/                MCP server lifecycle
docs/                 Comprehensive technical documentation
website/              Next.js marketing site (this site)

Running tests

Full acceptance gate (same as CI):

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace -- --test-threads=1
pnpm --filter @edytlab/desktop test
pnpm --filter @edytlab/desktop exec tsc --noEmit

Targeted runs:

cargo test -p ai                          # single crate
cargo test -p tools test_normalize        # single test
pnpm --filter @edytlab/desktop test:watch # vitest watch mode
--test-threads=1 is required because some AI crate tests share a model cache that is not safe for concurrent access.

Architecture overview

The system has three layers:

  1. Frontend — React 19 + Vite + Tailwind in a Tauri WebView. Thin UI layer; all state lives in Rust.
  2. Rust application layer — ~50 Tauri commands in commands.rs. Manages AppState: Store, Engine, Agent, Clipboard.
  3. Rust crates — AI subsystem, tool dispatcher, session DAG, audio engine, ML pipeline. Each is independently testable.

For the full technical design, see the architecture.md in the repository.

Adding a new audio tool

  1. Create crates/tools/src/tool/my_tool.rs implementing the Tool trait (name, description, input_schema, call).
  2. Register it in ToolDispatcher::new() in crates/tools/src/lib.rs.
  3. Write tests covering valid input, invalid input, and edge cases.
  4. Document the tool in the Audio Tools Reference.

Detailed step-by-step with code examples in contributing.md §6.

Adding a new LLM provider

  1. Implement the LlmProvider trait in crates/ai/src/provider.rs.
  2. Add it to SUPPORTED_PROVIDER_IDS and the from_id() factory.
  3. Add keychain slot handling in commands.rs.
  4. Update ProviderId in tauri-bridge.ts.

The trait handles auth, request serialization, and SSE stream parsing. See contributing.md §7 for full details.

Commit and PR process

  • Branch naming: claude/feature/<kebab-summary> or claude/fix/<kebab-summary>.
  • Commits follow Conventional Commits: feat(tools): add spectral repair tool.
  • Open PRs as drafts. Flip to ready when CI passes.
  • PRs are squash-merged. One concern per PR.
  • Run the full acceptance gate before pushing. CI blocks merge on any failure.

CI / release pipeline

ci.yml runs on every push and PR: fmt → clippy → cargo test → frontend build. Matrix: macOS 14 · Windows latest · Ubuntu 22.04.

On a green main push, auto-release.yml tags v<version>-dev.<run> and dispatches release-dev.yml, which builds unsigned installers. Signed production releases are manual workflow dispatches.

Documentation

All documentation lives in docs/ in the repository: github.com/laadtushar/edytlab/tree/main/docs. Update docs in the same PR as the code.