-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Garot Conklin edited this page Apr 24, 2026
·
1 revision
Sift is a local-only desktop application composed of three main parts: a native host, a Node orchestrator, and a web UI. Together they form a polyglot sidecar architecture that keeps all clinical data processing on the local machine.
flowchart LR
subgraph host [Tauri host -- Rust]
Tray[System tray]
Watch[Folder watcher -- notify]
end
subgraph orch [Node orchestrator]
API[Express REST]
DB[(SQLite)]
Pipes[FHIR / HL7 / PDF pipelines]
LLM[OpenAI-compatible client]
end
subgraph ui [Vite React UI]
Dash[Dashboard / Documents / Settings]
end
Watch -->|POST filePath| API
Dash -->|HTTP| API
API --> DB
Pipes --> LLM
Tray --> ui
-
Window + WebView: loads the built or dev UI (
tauri.conf.json→devUrl/frontendDist). - System tray: Show / Quit; uses the bundled window icon.
-
Folder watch: Uses
notifywith recursive watching on the user-selected path. On create/modify events for files, the host issues an HTTP POST tohttp://127.0.0.1:4000/api/ingestwith{ "filePath": "..." }. -
Command:
set_watch_folder— starts or replaces the watcher (previous watch is cancelled). -
Sidecar lifecycle (production): Spawns the
sift-backendNode.js executable and pollsGET /healthfor up to 15 seconds before the UI loads. Kills the child process when Quit is triggered.
-
Express on
127.0.0.1— health, settings, document listing, single-document fetch, ingest, document delete, scan. -
SQLite (
better-sqlite3) — settings, document rows, summaries, confidence scores, error messages. -
Ingest pipeline:
- Detects FHIR JSON, HL7-like text, or PDF (by extension and content hints).
- Extracts a text preview and structured highlights.
- Calls the LLM for a clinical-style narrative; on failure, stores a heuristic summary.
- LLM client: OpenAI-compatible chat completions; base URL and model are user-configurable.
-
React + Tailwind — dashboard status, document list and detail, printable report view, settings (folder dialog via
@tauri-apps/plugin-dialog, LLM fields via API). -
Tauri invoke —
set_watch_folderwhen a watch path is chosen or restored from settings (guarded so plain browser dev does not crash). - Print output — Tailwind print classes produce professional clinical document formatting.
- User selects a watch folder in Settings (stored in SQLite).
- Tauri starts notify on that path.
- New file detected → host POSTs path to
/api/ingest. - Backend reads file, classifies pipeline (FHIR / HL7 / PDF), persists a document row with summary, confidence, and optional error_message.
- UI polls or refreshes and displays the new document card.
| Method | Path | Description |
|---|---|---|
GET |
/health |
Liveness check |
GET |
/api/settings |
Read all settings |
POST |
/api/settings |
Write one or more settings |
POST |
/api/ingest |
Trigger ingest for a file path |
GET |
/api/documents |
List all document records |
GET |
/api/documents/:id |
Get a single document |
DELETE |
/api/documents/:id |
Delete a document record |
POST |
/api/scan |
Manually scan the watch folder |
All network I/O for the product is loopback to the local orchestrator and (optionally) the local LLM HTTP server. No cloud service is required for core operation. See Security and Compliance.
In a production Windows installer, Tauri bundles the following together:
Sift_x.y.z_x64-setup.exe (NSIS installer)
└── Sift.exe -- Tauri host
├── frontend/dist/ -- Embedded React build
└── sift-backend-x86_64-pc-windows-msvc.exe -- Node.js sidecar (pkg'd)
Optionally, llama-server-x86_64-pc-windows-msvc.exe may be bundled as an additional sidecar for fully offline inference.
Report Bug | Request Feature | Documentation | Contributing Guidelines
© 2026 Sift / fleXRPL. All Rights Reserved.