Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Implementation Plan – Speakr

A step-by-step roadmap to deliver the Speakr application using the test-driven, multi-crate approach defined in the specification set under docs/specs/.


1. Repository Scaffold

Reference: INIT-01 Project Scaffold

  1. Execute the migration steps to create the Cargo workspace (speakr-core, speakr-tauri, optional speakr-ui).
  2. Commit and open a draft PR; CI should fail until tests are added.
  3. Add baseline CI workflows (lint, build, placeholder tests) that currently fail.

2. Core Library (speakr-core)

OrderSpecTask
2.1FR-2Implement audio capture (cpal). Begin with failing unit test asserting 16-kHz mono stream & duration cap.
2.2FR-3Implement transcription (whisper-rs). Add latency test harness.
2.3FR-4Implement text injection (enigo). Integration tests across editors via mock window focus.
2.4FR-5Implement clipboard fallback; write secure-field simulation tests.
2.5FR-7Emit status events; test channel delivery & ordering.

Merge each sub-task when its tests pass and CI is green.

3. Tauri Backend (speakr-tauri)

OrderSpecTask
3.1FR-1Register global hot-key via tauri-plugin-global-shortcut; write E2E test with headless Tauri window.
3.2Wire hot-key → async call into speakr-core pipeline; ensure status events are forwarded via emit.
3.3FR-8Add settings persistence (JSON). Unit tests for load/save & corruption recovery.

4. Front-End (Leptos)

OrderSpecTask
4.1FR-6Build Settings & Status overlay UI; write component tests with Leptos testing utilities.
4.2NFR-accessibilityAdd automated axe-core & VoiceOver tests.

5. Cross-Cutting Non-Functional Work

SpecFocus
NFR-latencyOptimise model loading & thread usage; ensure performance tests pass.
NFR-footprintStrip symbols, enable lto, audit memory.
NFR-reliabilityAdd monkey-test CI job (500 invocations).
NFR-securitySocket-mock tests, Hardened Runtime flags, notarisation script.
NFR-compatibilityAdd Intel macOS runner to CI.

6. Auto-Update

Reference: FR-9 Auto-update

  1. Integrate update check using tauri-plugin-updater (or custom).
  2. Write integration tests mocking GitHub Releases API & download validation.

7. Documentation & Release

  1. Update docs/book/ with usage & contribution guide.
  2. Ensure mdbook build passes in CI.
  3. Produce signed DMG via CI; attach to GitHub Release.

Progress Checklist

    1. Preparation complete
      • Status: Preparation tasks completed.
    1. Repository scaffold merged (INIT-01)
      • Status: Repository scaffold implemented (4 crates; speakr-core (backend processing), speakr-tauri (Tauri backend), speakr-ui (Leptos front-end) and speakr-types (shared types)).
  • 2.1 Audio capture (FR-2) implemented & tested - Status: Audio capture tested via debug UI, verified WAV file is written to disk and contains the expected audio.
  • 2.2 Transcription (FR-3) implemented & tested - Status: Not started
  • 2.3 Text injection (FR-4) implemented & tested - Status: Not started
  • 2.4 Injection Not started - Status: Preparation tasks completed.
  • 2.5 Status events (FR-7) implemented & tested - Status: Not started
  • 3.1 Global hot-key (FR-1) registered & tested - Status: Not started
  • 3.2 Backend pipeline wired - Status: Not started
  • 3.3 Settings persistence (FR-8) implemented & tested - Status:
  • [~] 4.1 Settings UI (FR-6) implemented & tested - Status: Preparation tasks completed.
  • 4.2 Accessibility audits (NFR-accessibility) passing - Status: Preparation tasks completed.
  • Non-functional targets (Latency, Footprint, Reliability, Security, Compatibility) met
  • Auto-update (FR-9) implemented & tested
  • Docs & Release pipeline finished

Tick each box as the corresponding PR merges with passing CI.

Recent Progress (2025-07-20)

  • Scaffolded speakr-core library crate and added it to the workspace manifest.
  • Added stub implementation (record_to_vec) and constants in speakr-core::audio.
  • Committed failing unit test audio_capture.rs verifying 16 kHz mono stream and placeholders.
  • Workspace compiles; test fails as expected, ready for implementation phase.