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
- Execute the migration steps to create the Cargo workspace (
speakr-core
,speakr-tauri
, optionalspeakr-ui
). - Commit and open a draft PR; CI should fail until tests are added.
- Add baseline CI workflows (lint, build, placeholder tests) that currently fail.
2. Core Library (speakr-core
)
Order | Spec | Task |
---|---|---|
2.1 | FR-2 | Implement audio capture (cpal ). Begin with failing unit test asserting 16-kHz mono stream & duration cap. |
2.2 | FR-3 | Implement transcription (whisper-rs ). Add latency test harness. |
2.3 | FR-4 | Implement text injection (enigo ). Integration tests across editors via mock window focus. |
2.4 | FR-5 | Implement clipboard fallback; write secure-field simulation tests. |
2.5 | FR-7 | Emit status events; test channel delivery & ordering. |
Merge each sub-task when its tests pass and CI is green.
3. Tauri Backend (speakr-tauri
)
Order | Spec | Task |
---|---|---|
3.1 | FR-1 | Register global hot-key via tauri-plugin-global-shortcut ; write E2E test with headless Tauri window. |
3.2 | — | Wire hot-key → async call into speakr-core pipeline; ensure status events are forwarded via emit . |
3.3 | FR-8 | Add settings persistence (JSON). Unit tests for load/save & corruption recovery. |
4. Front-End (Leptos)
Order | Spec | Task |
---|---|---|
4.1 | FR-6 | Build Settings & Status overlay UI; write component tests with Leptos testing utilities. |
4.2 | NFR-accessibility | Add automated axe-core & VoiceOver tests. |
5. Cross-Cutting Non-Functional Work
Spec | Focus |
---|---|
NFR-latency | Optimise model loading & thread usage; ensure performance tests pass. |
NFR-footprint | Strip symbols, enable lto , audit memory. |
NFR-reliability | Add monkey-test CI job (500 invocations). |
NFR-security | Socket-mock tests, Hardened Runtime flags, notarisation script. |
NFR-compatibility | Add Intel macOS runner to CI. |
6. Auto-Update
Reference: FR-9 Auto-update
- Integrate update check using
tauri-plugin-updater
(or custom). - Write integration tests mocking GitHub Releases API & download validation.
7. Documentation & Release
- Update
docs/book/
with usage & contribution guide. - Ensure
mdbook
build passes in CI. - Produce signed DMG via CI; attach to GitHub Release.
Progress Checklist
-
- Preparation complete
- Status: Preparation tasks completed.
- Preparation complete
-
- Repository scaffold merged (INIT-01)
- Status: Repository scaffold implemented (4 crates;
speakr-core
(backend processing),speakr-tauri
(Tauri backend),speakr-ui
(Leptos front-end) andspeakr-types
(shared types)).
- Status: Repository scaffold implemented (4 crates;
- Repository scaffold merged (INIT-01)
- 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 inspeakr-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.