Hyprnote is a local-first desktop application for audio recording, real-time transcription, and AI-enhanced note-taking. Built with Tauri (Rust backend) and React (TypeScript frontend), it emphasizes privacy and offline capability while maintaining cloud service fallbacks for enhanced functionality.
Hyprnote's architecture prioritizes local processing with optional cloud enhancement:
| Capability | Local Implementation | Cloud Fallback |
|---|---|---|
| Speech-to-Text | whisper-local (Whisper models), hypr-am2 (Argmax models) | Deepgram, AssemblyAI, Azure, AWS via transcribe-proxy |
| LLM Processing | hypr-llama (llama.cpp integration) | OpenAI, Anthropic, Google via AI SDK providers |
| Audio Processing | hypr-audio (cpal/WASAPI/CoreAudio) | N/A (always local) |
| Data Storage | tauri-plugin-db2 (libsql), filesystem JSON/Markdown | Turso remote sync (optional) |
| Model Management | hypr-am (HuggingFace Hub downloads) | N/A (models cached locally) |
This architecture ensures the application remains functional without internet connectivity while allowing users to leverage cloud services for improved accuracy or performance when available.
Sources: Cargo.toml36-109 apps/desktop/src-tauri/Cargo.toml22-76
This overview introduces Hyprnote's structure and capabilities. For subsystem details:
The Hyprnote monorepo uses dual workspace systems:
apps/*, crates/*, and plugins/*Workspace Member Counts:
Sources: Cargo.toml10-33 package.json1-24 pnpm-lock.yaml1-50
The desktop application (apps/desktop/) is the primary deliverable. The Rust backend compiles to hyprnote_desktop_lib as both staticlib and rlib (apps/desktop/src-tauri/Cargo.toml10-17), providing a plugin-based architecture with 40+ extensibility points.
Main Application Flow:
Key Code Entities:
Sources: apps/desktop/src-tauri/src/lib.rs1-310 apps/desktop/src-tauri/Cargo.toml1-103
Sources: apps/desktop/package.json17-129 apps/desktop/src-tauri/Cargo.toml22-88 Cargo.toml116-273
The application uses tauri-specta for type-safe IPC:
Type Generation Test:
Command Registration:
Frontend Usage:
Sources: apps/desktop/src-tauri/src/lib.rs311-349 Cargo.toml265-267
The desktop application organizes functionality into modular plugins. Each plugin follows the Tauri plugin pattern and may expose extension traits for type-safe access.
Plugin Categories:
| Category | Plugins | Primary Traits/Types |
|---|---|---|
| Core Infrastructure | db2, store2, auth, path2 | Database2PluginExt, Store2PluginExt, Path2PluginExt |
| Audio/AI Processing | listener, listener2, local-stt, network | ListenerState, ModelStatus, session actors |
| Window Management | windows, overlay, tray | AppWindow enum, WindowsPluginExt |
| Integrations | apple-calendar, apple-contact, importer | Platform-specific commands |
| Utilities | notification, dialog, shell, fs-sync | Native OS features |
| Development | tracing, hooks, detect | Debugging and diagnostics |
Plugin Registration Pattern:
Extension Trait Pattern (Store2 Example):
Sources: apps/desktop/src-tauri/Cargo.toml22-76 apps/desktop/src-tauri/src/lib.rs69-150 Cargo.toml136-173
The repository includes three companion services that support the desktop application:
apps/web/ - TanStack Start site for public-facing content:
| Component | Technology | Purpose |
|---|---|---|
| Framework | TanStack Start + React 19 | SSR and static generation |
| Routing | @tanstack/react-router file-based | Type-safe navigation |
| Styling | Tailwind CSS 4 via @tailwindcss/vite | Utility-first CSS |
| Content | MDX with content-collections | Documentation pages |
| Authentication | @supabase/ssr + Supabase Auth | User login/signup |
| Deployment | @netlify/vite-plugin-tanstack-start | Netlify Edge Functions |
Sources: apps/web/package.json1-91 pnpm-lock.yaml753-829
apps/api/ - Hono server on Bun runtime:
Service Architecture:
Dependencies:
[email protected], @hono/[email protected][email protected], [email protected][email protected], @types/[email protected]@posthog/[email protected], [email protected][email protected], @supabase/[email protected]Sources: apps/api/package.json45-106 pnpm-lock.yaml45-119
apps/bot/ - Probot-based GitHub integration for CI/CD automation, issue triage, and release management.
Sources: apps/bot/package.json1-24 pnpm-lock.yaml121-150
The Cargo.toml35-302 workspace section defines shared dependencies for all crates and plugins:
Framework and Runtime:
tauri = "2.9" - Desktop application framework with IPC layertauri-plugin = "2.5" - Plugin development kittokio = "1" with multi-threaded runtime and macrosractor = "0.14.3", ractor-supervisor = "0.1.9" - Fault-tolerant concurrencyAudio Processing Stack:
cpal = "0.15.3" (patched from RustAudio/cpal#51c3b43)rodio = "0.21" - Audio playback librarydasp = "0.11.0" with interpolate and interpolate-linear featurescidre = "0.11.4" (macOS CoreAudio FFI)ML Inference:
hypr-llamasilero-rs (git: emotechlab/silero-rs@26a6460)HTTP and Networking:
reqwest = "0.12" with middleware and streaming supportreqwest-middleware = "0.4", reqwest-tracing = "0.5"reqwest-streams = "0.10.0" for SSE supporttokio-tungstenite = "0.26.0"Data Management:
libsql = "0.9.24" - Turso/SQLite clientserde = "1", serde_json = "1", serde_yaml = "0.9"jsonschema = "0.29", schemars = "0.8.21"Type Safety and Code Generation:
specta = "2.0.0-rc.22", tauri-specta = "2.0.0-rc.21"specta-typescript = "0.0.9" for .ts generationPlatform Integration (macOS):
objc2 = "0.6", block2 = "0.6"objc2-app-kit = "0.3", objc2-foundation = "0.3", objc2-event-kit = "0.3"swift-rs (git: yujonglee/swift-rs@41a1605)Sources: Cargo.toml116-302 Cargo.lock1-100
The pnpm workspace pnpm-lock.yaml1-50 manages shared frontend dependencies:
Core Framework:
[email protected], [email protected] - Latest stable release@tanstack/[email protected] - File-based, type-safe routing[email protected] - Fast development server and bundlerState Management:
[email protected] - Minimal store for UI state[email protected] - Reactive database for sessions/transcripts/chats[email protected], @xstate/[email protected] - FSM for complex workflowsData Fetching:
@tanstack/[email protected] - Server state management@tanstack/[email protected] - Type-safe form handlingAI Integration:
[email protected] - Unified AI provider interface@ai-sdk/[email protected], @ai-sdk/[email protected], @ai-sdk/[email protected]@ai-sdk/[email protected] - useChat, useCompletionUI Components:
@hypr/ui (workspace package) - Radix UI + Tailwind[email protected], @iconify-icon/[email protected][email protected] - Motion One for webRich Text Editing:
@hypr/tiptap (workspace package) - TipTap + CodeMirror extensions@uiw/[email protected] - CodeMirror 6 wrapperTauri Integration:
@tauri-apps/[email protected] - Core Tauri functions@tauri-apps/plugin-* - Native capabilities (fs, http, shell, etc.)apps/desktop/src/types/tauri.gen.tsUtilities:
[email protected] - Date formatting and manipulation[email protected] - TypeScript-first schema validation[email protected] - Functional programming utilitiesSources: pnpm-lock.yaml195-533 apps/desktop/package.json17-129 packages/ui/package.json19-51
The application captures system audio and microphone input simultaneously using platform-specific APIs, processes the streams through AGC/AEC/VAD, and dispatches to STT engines:
Audio Flow:
Platform-Specific Audio Implementations:
cidre bindings for CoreAudio tap with lock-free ring bufferAudioCaptureClient event-driven captureFor detailed audio system architecture, see Audio System.
Sources: Cargo.toml44-280 [crates/audio/]
The application supports running AI models entirely on-device for privacy and offline capability:
Local Model Integration:
GPU Acceleration:
For AI model details, see Local LLM System and Local STT Plugin.
Sources: Cargo.toml36-109 [crates/whisper-local/], [crates/llama/], [crates/am/]
The frontend uses TinyBase as a reactive in-memory database with custom persisters that sync to filesystem:
State Architecture:
Persistence Patterns:
_session.json, _transcript.json, note.md_chat.json, _messages.jsonStoreKey enum in tauri-plugin-store2For data persistence details, see TinyBase and Persisters.
Sources: [packages/store/], apps/desktop/package.json121
The monorepo coordinates TypeScript and Rust builds through workspace-level scripts and per-app build configurations:
Desktop Application Build Flow:
Build Scripts:
Tauri Configuration:
Sources: apps/desktop/package.json6-15 apps/desktop/src-tauri/tauri.conf.json6-11 .github/actions/pnpm_install/action.yaml1-14
The repository uses GitHub Actions workflows with Graphite optimizer for efficient CI:
| Workflow | Trigger | Purpose |
|---|---|---|
| desktop_ci.yaml | PR, push to main | Rust tests, TypeScript tests, multi-platform checks |
| desktop_cd.yaml | Manual, tags | Multi-platform builds, CrabNebula upload, GitHub releases |
| web_ci.yaml | PR, push to main | Playwright tests, build verification |
| web_cd.yaml | Push to main | Deploy to Netlify Edge |
| api_ci.yaml | PR, push to main | Bun tests, API contract validation |
| api_cd.yaml | Push to main | Deploy to production |
CI Optimization: Graphite CI optimizer skips redundant jobs on stacked PRs, reducing CI time by up to 70%.
For detailed CI/CD, see CI Pipeline and Desktop CD and Release.
Sources: [.github/workflows/], documentation from Diagram 5
The desktop application compiles for three platforms with distinct toolchains and dependencies:
| Platform | Targets | Audio Backend | Build Requirements |
|---|---|---|---|
| macOS | aarch64-apple-darwin x86_64-apple-darwin | CoreAudio via cidre | Xcode, Apple Developer signing |
| Windows | x86_64-pc-windows-msvc | WASAPI via windows | Visual Studio 2022, Windows SDK |
| Linux | x86_64-unknown-linux-gnu | PulseAudio via libpulse-binding | ALSA/PulseAudio dev packages |
Sidecar Binaries:
Local STT and LLM models run as sidecar processes, built separately for each platform and bundled with the main application. Sidecar processes are managed by hypr-host::kill_processes_by_matcher(ProcessMatcher::Sidecar) on app exit.
Sources: Cargo.toml269-305 apps/desktop/src-tauri/src/lib.rs273
The codebase enforces end-to-end type safety from Rust backend to TypeScript frontend:
Type Generation Workflow:
Implementation:
Sources: apps/desktop/src-tauri/src/lib.rs329-349 Cargo.toml265-267
The desktop app configuration is defined in apps/desktop/src-tauri/tauri.conf.json1-70:
Key Settings:
com.hyprnote.dev for dev, com.hyprnote.app for productionhyprnote:// for external integrationsSources: apps/desktop/src-tauri/tauri.conf.json1-70
Fine-grained permissions are defined in apps/desktop/src-tauri/capabilities/default.json1-290:
File System Permissions:
$DATA/hyprnote/**/* (user data directory)$APPDATA/**/* (application data)/Applications/* (macOS app detection)Network Permissions:
http:defaultShell Permissions:
shell:allow-execute with validator regexsh -c {command} with argument validationPlugin Permissions:
Each plugin exposes a {plugin}:default permission set that grants access to its commands and events.
Sources: apps/desktop/src-tauri/capabilities/default.json1-290
The desktop app is configured via apps/desktop/src-tauri/tauri.conf.json1-89:
The application defines granular permissions in apps/desktop/src-tauri/capabilities/default.json1-184:
$DATA/hyprnote/**/*Sources: apps/desktop/src-tauri/tauri.conf.json1-89 apps/desktop/src-tauri/capabilities/default.json1-184
Refresh this wiki
This wiki was recently refreshed. Please wait 6 days to refresh again.