How arpitteli/strata works
1. Overall shape
Strata is a desktop-first Tauri app: a React/Vite front end in src/ and a Rust host in src-tauri/. The app is designed to be local-first, with the UI talking to local storage and Tauri-backed native capabilities rather than a remote backend.
2. Core boundary: the vault
The main architectural unit is the vault folder in the user’s app data directory. It mixes:
- plaintext .md node files for human-readable notes
- encrypted sidecar/system files for graph state, tags, inbox, notifications, agent config/history, Drive token, etc.
The vault.lock file stores the generated master key material and vault metadata. This makes the repo’s key boundary: notes are readable outside the app, system state is not.
3. Data model
The note system is built around typed nodes: Project, Component, Skill, Patent, Funding, Lead, and Simple Note. The repo emphasizes:
- YAML frontmatter for node metadata
- wikilinks ([[...]]) for graph edges
- type conversion while preserving shared/base fields
The UI components under src/components/panels/typefields/ suggest each node type has a specialized field set layered on top of common node data.
4. Application shell and navigation
The front end is organized as a shell with top-level pages under src/pages/ and shared chrome in MainLayout, Sidebar, and TopBar. This implies the user moves between major work areas such as:
- Graph
- Leads
- Search
- Notifications
- Settings
- Tags
- Agent
- Inbox
- Unlock screen
Even though the README says there is no passphrase unlock in v0.1.0, the presence of UnlockScreen suggests the shell supports a security/login state, likely for future or alternate modes.
5. Central client state
src/stores/StrataStore.ts is the main shared state boundary for the app. It likely coordinates:
- loaded vault data
- selected node / current view
- graph state
- tags, inbox, notifications
- search results
- agent session/config
This store is what lets otherwise separate views stay consistent without a server.
6. Graph subsystem
GraphView.tsx is the visualization surface for the knowledge graph. The README says it uses Cytoscape.js with color-coded nodes by type. The graph is likely derived from:
- node files and their wikilinks
- persisted graph layout/state in the encrypted graph.nxs
In architecture terms, the graph is a read-model over the vault content plus saved layout metadata.
7. Node detail and editing subsystem
NodePanel.tsx and its tabs handle the per-node experience: notes, files, checklist, activity, canvas, and type-specific metadata. This is the main editor/detail boundary between the graph/list views and the underlying vault files.
The LeadsView / LeadDetail area is a specialized subdomain for CRM-like records, with its own tabs for summary, activity, files, and links.
8. Inbox, tagging, search, and markdown utilities
The repo has a cluster of local productivity subsystems:
- InboxView for quick capture
- TagsView plus TagsInput
- SearchView backed by local full-text indexing
- markdown helpers and search utilities in src/lib/markdown.ts and src/lib/search.ts
The import path for Obsidian vaults is also part of this layer, reinforcing that Strata treats markdown as a first-class interchange format.
9. Automation and AI agent
src/lib/agent.ts plus encrypted agent-config.nxs and chat.nxs form the AI subsystem. The README says it is OpenAI-compatible and can summarize individual nodes or the whole graph using a user-supplied API key.
Architecturally, this is a client-side agent integration, not a server-side AI service. Its data flows are local chat/config persistence plus outbound model requests.
10. Sync, export, and backup
driveSync.ts and export.ts are the persistence/portability layer:
- Google Drive sync provides encrypted backup/sync
- vault export produces a single encrypted .nxs archive
- Obsidian import walks a directory and ingests .md files as notes
These flows all sit at the boundary between the local vault and external storage, with encryption handled before data leaves the machine.
11. Notifications and idle/security behavior
The notification layer includes notificationEngine.ts, nativeNotifications.ts, and useNotificationCheck.ts. The README indicates due-date and threshold checks for projects/components. There is also useIdleLock.ts, which suggests the app can react to inactivity for privacy or state management even though v0.1.0 does not use a passphrase unlock flow.
12. Rust/Tauri backend
The Rust side (main.rs, lib.rs, api.rs) is the native execution layer for Tauri capabilities, file access, and any privileged operations the browser-side UI cannot or should not do directly. The capabilities/default.json and generated schema files indicate Tauri’s permissioned command model is part of the app boundary.
13. Tech stack and build shape
The repo is a TypeScript React app built with Vite and styled with Tailwind/PostCSS, wrapped by a Rust/Tauri desktop runtime. That combination matters architecturally because the UI is a local SPA, but system access, packaging, and native integrations are handled through Tauri rather than a traditional web backend.
14. How the main data flows connect
The typical flow is:
- user edits or captures data in a page/component
- the client store updates UI state
- node content is written to markdown files, while app-level metadata is written to encrypted sidecars
- graph/search/notifications recompute from the vault
- optional sync/export/agent actions bridge to external services or formats
So the repo is best drawn as a local vault-centric desktop system with multiple read models over the same underlying markdown + encrypted metadata store.
Main entry points: StrataStore.ts Store · Sidebar.tsx Sidebar · storage.ts Storage · MainLayout.tsx Layout
Components 28
Frontend shell
React/Vite UI, layout, and page routing.
- App · Top-level React app bootstrap and routing.
src/App.tsx - Layout · Main application chrome and workspace container.
src/pages/MainLayout.tsx - Sidebar · Primary navigation between work areas.
src/components/ui/Sidebar.tsx - Top bar · Global actions and current-context controls.
src/components/ui/TopBar.tsx - Unlock · Locked-state entry screen.
src/pages/UnlockScreen.tsx
Workspace views
Top-level screens for graphing, capture, search, and settings.
- Graph view · Cytoscape-based graph visualization over vault nodes.
src/components/graph/GraphView.tsx - Node panel · Node detail, notes, files, checklist, and activity.
src/components/panels/NodePanel.tsx - Leads view · Lead-oriented workspace and pipeline entry point.
src/pages/LeadsView.tsx - Lead detail · Detailed lead record with summary, activity, files, and links.
src/components/leads/LeadDetail.tsx - Inbox · Quick capture and triage workspace.
src/pages/InboxView.tsx - Tags · Tag browsing and tag input workflow.
src/pages/TagsView.tsx - Search view · User-facing search results and lookup surface.
src/pages/SearchView.tsx - Notifications · Notification center for due-date and threshold events.
src/pages/NotificationsView.tsx - Settings · App configuration and account/sync settings.
src/pages/SettingsView.tsx - Agent · Client-side AI assistant workspace.
src/pages/AgentView.tsx
Data core
Local state, vault I/O, markdown, indexing, and encryption.
- Store · Shared client state for vault, selection, and derived views.
src/stores/StrataStore.ts - Storage · Local vault persistence and file operations.
src/lib/storage.ts - Crypto · Vault encryption and key handling.
src/lib/crypto.ts - Markdown · Frontmatter, wikilinks, and note serialization.
src/lib/markdown.ts - Search · Local search and result ranking helpers.
src/lib/search.ts - Node factory · Typed node creation and conversion helpers.
src/lib/nodeFactory.ts
Integrations
Agent, sync, export, notifications, and external import paths.
- Agent · OpenAI-compatible agent orchestration and chat logic.
src/lib/agent.ts - Drive sync · Encrypted sync to Google Drive or similar remote storage.
src/lib/driveSync.ts - Export · Encrypted vault export and portable archive creation.
src/lib/export.ts - Obsidian import · Imports markdown vault content from Obsidian-style folders.
src/lib/obsidian.ts - Notify engine · Local notification evaluation and scheduling.
src/lib/notificationEngine.ts
Connections 30
- App → Layout: renders · App composes the shell and workspace container.
- App → Unlock: locked state · Locked sessions route to the unlock screen.
- Layout → Sidebar: contains · Main layout hosts primary navigation.
- Layout → Top bar: contains · Main layout hosts global actions.
- Layout → Store: binds · Layout and pages read shared client state.
- Sidebar → Graph view: navigates · Navigation routes into the graph workspace.
- Sidebar → Leads view: navigates · Navigation routes into the leads workspace.
- Sidebar → Search view: navigates · Navigation routes into search.
- Sidebar → Settings: navigates · Navigation routes into settings.
- Store → Storage: loads/saves · Store coordinates vault persistence.
- Storage → Crypto: protects · Vault data is encrypted before leaving local storage.
- Storage → Markdown: reads/writes · Note files are serialized as markdown with frontmatter.
- Store → Search: indexes · Derived search state comes from vault content.
- Store → Node factory: creates · Typed node creation and conversion feed the store.
- Graph view → Store: consumes · Graph view renders from shared vault state.
- Node panel → Store: edits · Node detail updates flow through the store.
- Leads view → Lead detail: drills into · Lead list opens detailed lead records.
- Lead detail → Store: consumes · Lead detail shares the common vault state.
- Inbox → Store: captures to · Quick capture writes into the shared vault model.
- Tags → Store: filters · Tag views derive from stored node metadata.
- Search view → Search: queries · Search UI uses local indexing helpers.
- Notifications → Notify engine: drives · Notification screen reflects the local rules engine.
- Agent → Agent: uses · Agent UI invokes local agent orchestration.
- Agent → Store: summarizes · Agent operates over vault state and selected content.
- Drive sync → Storage: syncs · Sync operates on the local vault boundary.
- Export → Crypto: packages · Exports are encrypted for portability.
- Obsidian import → Markdown: imports · Obsidian import converts markdown notes into vault content.
- Notify engine → Rust host: notifies via · Notification engine can surface native alerts.
- Rust host → Tauri API: exposes · Rust host exposes desktop commands through the API layer.
- Tauri API → Storage: accesses · Native commands handle privileged file and system operations.