Overview
OpenFlow is a local-first desktop voice dictation app built with Tauri v2, React/TypeScript frontend, and Rust backend with SQLite storage.
┌─────────────────────────────────┐
│ React Frontend │
│ (TypeScript, Tailwind, lucide) │
├─────────────────────────────────┤
│ Tauri Command API │
├─────────────────────────────────┤
│ Rust Backend │
│ ┌──────┐ ┌──────┐ ┌────────┐ │
│ │Audio │ │Hotkey│ │Cleanup │ │
│ │ │ │ │ │Engine │ │
│ └──────┘ └──────┘ └────────┘ │
│ ┌──────────┐ ┌─────────────┐ │
│ │Transcr. │ │ Clipboard │ │
│ │Provider │ │ & Paste │ │
│ └──────────┘ └─────────────┘ │
│ ┌──────────────────────────┐ │
│ │ SQLite Database │ │
│ └──────────────────────────┘ │
└─────────────────────────────────┘
Frontend
- React + TypeScript with Vite
- Tailwind CSS for styling (preserving Wispr Flow-inspired design)
- lucide-react for icons
- Custom hooks (
useSettings,useSnippets,useDictionary,useHistory,useTransforms,useScratchpad) wrap Tauri invoke calls - API wrapper module (
src/lib/api.ts) provides typed functions for all backend commands - Shared types in
src/types/app.ts
Backend (Rust)
Modules
| Module | Purpose |
|---|---|
db | SQLite database initialization & migrations |
settings | App settings CRUD (key-value store) |
snippets | Snippet CRUD and expansion logic |
dictionary | Dictionary term CRUD |
history | Dictation history CRUD |
transforms | Transform CRUD |
scratchpad | Scratch note CRUD |
cleanup | Text cleanup pipeline |
models | Model status, audio devices, clipboard |
errors | Typed error enums |
Cleanup Pipeline
Raw Transcript
│
├── Call Gemini API (REMOVED)
│
▼
Clean Transcript
│
├── RuleBasedProvider (always available)
│ ├── Remove filler words
│ ├── Handle corrections (I mean, actually)
│ ├── Expand spoken punctuation
│ ├── Apply formatting commands
│ └── Capitalize and punctuate
│
└── LocalLlamaCppServerProvider (optional)
├── POST to http://127.0.0.1:8080/v1/chat/completions
├── System prompt for speech cleanup
├── 8 second timeout
└── Falls back to rule-based on failure
Transcription Pipeline
Hotkey Pressed → Start Recording
│
Hotkey Released → Stop Recording
│
Transcribe (Whisper)
│
Clean Transcript
│
Expand Snippets
│
Save History
│
Paste or Preview
│
Return to Idle
App States
idle— Waiting for hotkeylistening— Recording audioprocessing_transcription— Running Whisperprocessing_cleanup— Running cleanup modelpreview— Showing preview before pastepasting— Inserting text into active appsuccess— Dictation completeerror— Something went wrong
Storage
All data is stored in local SQLite at:
Windows: %APPDATA%\openflow\openflow.db
Tables
settings— Key-value app configurationsnippets— Snippet shortcuts and expansionsdictionary_terms— Personal dictionary wordshistory— Dictation history entriestransforms— Transform templatesscratch_notes— Scratchpad notes
Security
- No outbound network connections except
localhost:8080(for optional llama.cpp server) - No telemetry or analytics
- Audio processed and discarded locally
- All data encrypted at rest in SQLite