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

ModulePurpose
dbSQLite database initialization & migrations
settingsApp settings CRUD (key-value store)
snippetsSnippet CRUD and expansion logic
dictionaryDictionary term CRUD
historyDictation history CRUD
transformsTransform CRUD
scratchpadScratch note CRUD
cleanupText cleanup pipeline
modelsModel status, audio devices, clipboard
errorsTyped 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 hotkey
  • listening — Recording audio
  • processing_transcription — Running Whisper
  • processing_cleanup — Running cleanup model
  • preview — Showing preview before paste
  • pasting — Inserting text into active app
  • success — Dictation complete
  • error — Something went wrong

Storage

All data is stored in local SQLite at:

Windows: %APPDATA%\openflow\openflow.db

Tables

  • settings — Key-value app configuration
  • snippets — Snippet shortcuts and expansions
  • dictionary_terms — Personal dictionary words
  • history — Dictation history entries
  • transforms — Transform templates
  • scratch_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