Architectural Case Study
Local-FirstArchitectureTauri v2TypeScript

Studus: Local-First Knowledge OS & Cross-Platform Document Engine

A local-first knowledge operating system combining Notion-grade block editing and dynamic multi-view databases with an Obsidian-style 2D physics graph.

APS
Allprogrammers Engineering Team Systems Architecture & Infrastructure
Production Verified
Studus - Local-First Knowledge OS & Document Engine
14.8 MB Tauri v2 Desktop Memory Footprint
697 Automated Vitest & Node E2E Tests
15.4k Dead Lines Eradicated in Monorepo
:42000 Multithreaded Native Rust Sync
Project Breakdown & Specs (4 sections)
Project Snapshot
Role: Specialized Systems Engineering Team
Deliverable: Production Engine & Automated Verification
Local-FirstArchitectureTauri v2TypeScriptRustMCP
Schedule Advisory Call (15-min)

Studus: Local-First Knowledge OS & Cross-Platform Document Engine

Studus is a local-first, modular, and extensible knowledge operating system and document engine. It combines the structured block-editing and dynamic multi-view databases of Notion with the bidirectional linking and 2D physics knowledge graph of Obsidian and Roam, built from the ground up as a high-performance cross-platform monorepo.

Problem Solved

Modern knowledge workers and students are caught between two compromised paradigms:

  • Cloud Lock-in & Privacy Risks: Standard SaaS tools (Notion, Airtable) store personal notes and organizational data on proprietary remote servers, lock core capabilities behind monthly subscriptions, and become unusable during internet outages.
  • Feature Silos: Traditional local markdown tools (Obsidian, Logseq) offer data sovereignty and link graphs, but lack native multi-view relational databases (Kanban, Gantt, custom formulas, and inline data rollups).
  • Resource Bloat: Desktop productivity applications frequently rely on bloated Electron wrappers that consume 400–600 MB of RAM on startup, leading to sluggish performance, battery drain, and thermal throttling on laptop and mobile hardware.

Impact & Engineering Benchmarks

Rather than vanity metrics, Studus was built with strict mechanical software quality and verified engineering benchmarks:

  • Sub-15 MB Desktop Footprint: Migrated from Electron to Tauri v2 with an embedded multithreaded native Rust HTTP sync server, cutting memory consumption from 500+ MB to ~15 MB RAM.
  • Comprehensive Test Coverage: Verified across 697 automated tests (350 Vitest unit/integration tests and 347 Node E2E tests passing in ~220ms).
  • Strict Type Safety: Maintained 0 TypeScript errors across 5 monorepo packages under strict tsc --noEmit and eliminated all unlogged catch blocks across the codebase.
  • 15,400+ Lines Eradicated: Purged over 15,400+ lines of duplicate and dead code during the architectural transition to a modular package architecture backed by 12 Architecture Decision Records (ADRs).

Solution

We architected Studus as a decoupled, multi-package monorepo enforcing strict boundaries between headless business logic and presentation layers:

  • Headless Domain Core (@studus/core): Zero DOM/Browser dependencies compiled with lib: ["ES2022"]. Features a recursive hierarchical node tree with cycle prevention, a high-throughput reversible history transaction engine (HistoryManager), and a multi-view query engine with modular strategy maps supporting multi-column filtering, multi-sorting, swimlane grouping, and 15 statistical aggregations.
  • Presentation Layer (@studus/ui): Unified workspace shell driving desktop, web, and mobile app shells identically. Includes a Notion-grade block editor (slash commands /, markdown shortcuts, gutter drag handles ⋮⋮, floating formatting toolbar), decomposed multi-view databases (Table, Kanban via @dnd-kit, Gantt timeline with date resizing, Calendar), and an interactive D3-force knowledge graph with gesture state machines.
  • Native Rust Desktop & Mobile Targets: Native macOS desktop app built with Tauri v2 featuring an embedded native Rust HTTP sync server listening on port 42000, paired with a Capacitor iOS/Android app with camera QR pairing, touch ergonomics, and offline sync reconciliation.
  • Agentic Bridge (Model Context Protocol): Stdio server and WebSocket bridge (ws://127.0.0.1:4000) enabling autonomous AI agents to query, inspect, and mutate workspace documents and databases programmatically.

Tech Stack

  • Core & Languages: TypeScript, Rust, Node.js
  • Architecture: Monorepo (pnpm), Headless Domain Core, Sliced Zustand Stores (Tree, Database, Search, UI)
  • Desktop & Mobile: Tauri v2 (Rust HTTP Sync Server on port 42000), Capacitor (iOS/Android), Vite (Web)
  • UI & Visualization: React, Tailwind CSS, D3-force Physics, @dnd-kit
  • Agentic Integration: Model Context Protocol (MCP) Stdio & WebSocket Server