How rayfengleixing/tsflowy works
TsFlowy is a local-first desktop notes and knowledge-management app. The main workflow starts in the workspace page tree, opens a document editor or a database view, and persists content through frontend APIs, Tauri IPC, Rust commands, and SQLite. Search, trash, settings, and workspace import/export are additional product branches documented in the README. The tree and sampled excerpts support the application entry point, database flow, and persistence boundary; links for unsampled feature internals are limited to documented capabilities.
Main entry points: lib.rs Tauri command bridge · App.tsx Application shell · database.ts Database state · workspace.ts Workspace state
Components 23
Workspace navigation
- Application shell
src/App.tsx - Workspace state
src/stores/workspace.ts - Page tree
src/features/sidebar/Sidebar.tsx
Document editing
- Document editor
src/features/editor/EditorPage.tsx - Editor state
src/stores/editor.ts - Document API
src/lib/documents.ts
Database views
- Database page
src/features/database/DatabasePage.tsx - Grid board calendar
src/features/database/GridView.tsx - Database state
src/stores/database.ts - Filter and sort logic
src/lib/database-query.ts - Formula evaluation
src/lib/database-formula.ts - Column summaries
src/lib/database-aggregate.ts
Local persistence
- Database API
src/lib/database.ts - Tauri command bridge
src-tauri/src/lib.rs - Persistence commands
src-tauri/src/commands/db.rs - Database operations
src-tauri/src/db/database.rs - Local SQLite store
src-tauri/src/db/database.rs - Asset commands
src-tauri/src/commands/files.rs
Search and operations
- Global search
src/features/search/SearchResultsPage.tsx - Search service
src/lib/search.ts - Recycle bin
src/features/trash/TrashPage.tsx - Settings and backup
src/features/settings/SettingsPage.tsx
Other components
- User
Connections 25
- User → Application shell: uses
- Application shell → Workspace state: initializes
- Application shell → Page tree: renders
- Workspace state → Page tree: provides tree
- Application shell → Document editor: routes to
- Application shell → Database page: routes to
- Document editor → Editor state: edits through
- Editor state → Document API: persists via
- Document API → Tauri command bridge: invokes
- Database page → Grid board calendar: selects view
- Grid board calendar → Database state: loads and edits
- Database state → Filter and sort logic: filters and sorts
- Database state → Formula evaluation: computes values
- Database state → Column summaries: summarizes
- Database state → Database API: persists via
- Database API → Tauri command bridge: invokes
- Tauri command bridge → Persistence commands: dispatches
- Persistence commands → Database operations: calls
- Database operations → Local SQLite store: reads and writes
- Global search → Search service: searches through
- Search service → Tauri command bridge: invokes
- Recycle bin → Tauri command bridge: manages deleted pages
- Settings and backup → Workspace state: configures
- Settings and backup → Asset commands: imports and exports
- Asset commands → Tauri command bridge: registered with