Hyprnote is a privacy-first AI notepad consisting of a desktop application and web ecosystem. The system enables real-time audio transcription, AI-enhanced note-taking, and extensible workflows through a local-first architecture. The desktop application runs on macOS, Windows, and Linux, leveraging on-device AI models for speech-to-text and language model inference. The web ecosystem provides marketing, documentation, and cloud-based workflows via serverless components.
This page provides an architectural overview of the entire system, covering both desktop and web components, their interactions, and the underlying infrastructure. For detailed information about specific subsystems, see Architecture and its child pages.
Scope: This document covers the high-level system composition, technology stack, and how major components interact. It does not cover implementation details of individual features or subsystems—those are documented in their respective sections.
Sources: Cargo.toml11-17 package.json1-19 apps/desktop/package.json1-137 apps/web/package.json1-85 apps/api/package.json1-26 apps/restate/package.json1-26
| Component | Technologies | Primary Purpose |
|---|---|---|
| Desktop Frontend | React 19, TanStack Router, TinyBase, Zustand | User interface, state management, routing |
| Desktop Backend | Rust, Tauri 2.9, ~20 custom plugins | Native capabilities, audio I/O, local AI |
| Web Frontend | React 19, TanStack Start, Netlify | Marketing site, documentation, web app |
| Web Backend | Hono, Bun, Supabase, Stripe | API endpoints, authentication, payments |
| Serverless | Cloudflare Workers, Restate | Durable AI workflows, edge computing |
| Local AI | Whisper (STT), Llama (LLM), llama.cpp | On-device speech recognition, text generation |
| Cloud AI | Deepgram, OpenRouter, AWS Transcribe | Cloud-based STT/LLM fallbacks |
| Data Persistence | TinyBase, libsql, Turso, Supabase | Local/cloud data storage, sync |
| Build Tools | pnpm workspaces, Cargo workspaces, Vite, Tauri CLI | Monorepo management, bundling |
Sources: apps/desktop/package.json17-112 apps/web/package.json13-61 Cargo.toml92-221 pnpm-lock.yaml1-10
The desktop application is built with Tauri 2.9, combining a React frontend with a Rust backend. The architecture follows a plugin-based pattern where ~20 plugins extend Tauri's core functionality.
Sources: apps/desktop/src/main.tsx1-110 apps/desktop/src/routes/__root.tsx1-53 apps/desktop/src-tauri/src/lib.rs1-218 apps/desktop/src-tauri/Cargo.toml19-81 Cargo.toml22-85
The desktop application initializes through the following sequence:
Backend Initialization (apps/desktop/src-tauri/src/lib.rs12-38):
main() creates tokio runtimePlugin Registration (apps/desktop/src-tauri/src/lib.rs45-106):
.plugin() callstauri-plugin-single-instance must be first for deep-linkingFrontend Bootstrap (apps/desktop/src/main.tsx39-96):
App component initializes QueryClient for data fetchingTinyTickProvider manages background tasksTinyBaseProvider wraps reactive state managementRouterProvider handles routing with injected contextStore Initialization (apps/desktop/src/store/tinybase/main.ts79-159):
StoreComponent creates MergeableStore with schemaslocalPersister handles SQLite persistencelocalPersister2 handles filesystem persistence (markdown export)Sources: apps/desktop/src-tauri/src/lib.rs12-189 apps/desktop/src/main.tsx1-110 apps/desktop/src/store/tinybase/main.ts1-370
The web ecosystem consists of three primary applications deployed independently:
Sources: apps/web/package.json1-85 apps/api/package.json1-26 apps/restate/package.json1-26 apps/web/vite.config.ts1-44
The web app (apps/web) uses TanStack Start for SSR and static generation:
apps/web/src/routes/ with TanStack Router@content-collections/vite@tailwindcss/vite plugin@netlify/vite-plugin-tanstack-startThe API service (apps/api) runs on Bun with Hono:
@hono/zod-validator)hono-openapi generates API documentation@scalar/hono-api-referenceThe Restate service (apps/restate) provides durable execution on Cloudflare Workers:
@restatedev/restate-sdk-cloudflare-workers for durable workflows@restatedev/restate-sdk-zod for type-safe schemasSources: apps/web/vite.config.ts1-44 apps/api/package.json9-19 apps/restate/package.json12-17
Hyprnote's AI capabilities operate in two modes: local (on-device) and cloud (external services).
Sources: Cargo.toml23-82 apps/desktop/package.json17-112 apps/restate/package.json12-17
The local STT system supports multiple engines:
The tauri-plugin-local-stt (plugins/local-stt) orchestrates these engines, managing model downloads, health checks, and supervisor patterns for robust operation.
The local LLM system uses llama.cpp for efficient inference:
~/.cache/hyprnote//chat/completions endpointThe tauri-plugin-local-llm (plugins/local-llm) exposes an HTTP server that desktop app and external tools can use.
Cloud services provide fallback and specialized capabilities:
@deepgram/sdk@openrouter/sdkaws-sdk-transcribestreaming@ai-sdk/* packagesSources: Cargo.toml22-82 apps/desktop/package.json18-112 apps/restate/package.json12-17
Hyprnote uses different persistence strategies for desktop and web:
Sources: apps/desktop/src/store/tinybase/main.ts1-370 apps/web/package.json41-65 Cargo.toml38-39
TinyBase Store (apps/desktop/src/store/tinybase/main.ts):
@hypr/store packageUser Database (crates/db-user):
tauri-plugin-db2 with generated TypeScript bindingsConfiguration Storage:
auth.json, etc.)@t3-oss/env-coreDrizzle ORM (apps/web/package.json41):
Turso (crates/turso):
Supabase:
Sources: apps/desktop/src/store/tinybase/main.ts1-370 apps/web/package.json41-65 Cargo.toml38-77
The monorepo uses coordinated tooling for JavaScript/TypeScript and Rust:
| Tool | Purpose | Configuration |
|---|---|---|
| pnpm | JavaScript package manager | pnpm-lock.yaml workspaces in package.json14-18 |
| Cargo | Rust package manager | Cargo.toml10-17 workspace members |
| Taskfile | Task runner | Taskfile.yaml tasks for supabase, stripe, etc. |
| Vite | Frontend bundler | apps/desktop/vite.config.ts apps/web/vite.config.ts |
| Tauri CLI | Desktop app builder | apps/desktop/package.json10-14 |
| TypeScript | Type checking | Multiple tsconfig.json files per app |
| dotenvx | Environment variables | .env.sample Taskfile.yaml83-132 |
| Specta | Type generation | Cargo.toml219-221 generates TypeScript bindings |
hyprnote/
├── apps/
│ ├── desktop/ # Tauri desktop app
│ ├── web/ # TanStack Start web app
│ ├── api/ # Hono API service
│ ├── restate/ # Cloudflare Workers
│ └── pro/ # MCP server
├── packages/
│ ├── ui/ # Shared UI components
│ ├── tiptap/ # Rich text editor
│ ├── utils/ # Shared utilities
│ ├── store/ # TinyBase schemas
│ └── db/ # Database types
├── plugins/ # ~20 Tauri plugins
├── crates/ # ~50 Rust crates
├── extensions/ # Extension examples
└── owhisper/ # STT framework
Sources: Cargo.toml10-17 pnpm-lock.yaml10-769 package.json1-19 Taskfile.yaml1-282
Desktop CI/CD:
Web CI/CD:
API Deployment:
Restate Deployment:
Sources: Taskfile.yaml1-282 apps/web/vite.config.ts1-44 apps/desktop/package.json10-14
Hyprnote supports a sandboxed extension system for custom panels:
Sources: apps/desktop/src/extension-globals.ts1-95 apps/desktop/src/store/tinybase/iframe-sync.ts1-175 apps/desktop/src/routes/app/ext-host.tsx1-214 extensions/calendar/extension.json1-18
Manifest (extensions/calendar/extension.json):
main.js) and UI (dist/ui.js)Runtime Script (extensions/calendar/main.js):
__hypr_extension.activate() and __hypr_extension.deactivate()hypr.log API for loggingPanel UI (extensions/calendar/ui.tsx):
ExtensionViewProps interface/app/ext-hostwindow.__hyprnote runtime with React, UI components, TinyBase storeSynchronization:
createIframeSynchronizer() syncs TinyBase state between parent and iframecreateParentSynchronizer() provides iframe-side sync implementationSecurity:
allow-scripts allow-same-origin__TAURI_INTERNALS__ polyfill (apps/desktop/index.html18-35)Sources: apps/desktop/src/extension-globals.ts65-94 apps/desktop/src/store/tinybase/iframe-sync.ts31-175 apps/desktop/src/routes/app/ext-host.tsx1-214 apps/desktop/index.html18-35 extensions/calendar/extension.json1-18 extensions/calendar/main.js1-19 extensions/calendar/ui.tsx1-208
Refresh this wiki
This wiki was recently refreshed. Please wait 7 days to refresh again.