SearchBox is a local-first document search app shipped as a single Rust binary: an Axum web server with the entire UI (MiniJinja templates + vanilla JS) embedded via rust-embed, a Meilisearch sidecar process it spawns and supervises for full-text search, and SQLite (via sqlx) for app state. On Windows release builds the same binary also opens a native WebView2 window (wry + tao) pointed at its own localhost server, so it behaves like a desktop app; everywhere else (dev builds, Linux, Docker) it runs headless and you use a browser. Everything binds to 127.0.0.1 by default — nothing leaves the machine unless the user opts in.
| Doc | What's in it |
|---|---|
| architecture.md | Process model, Meilisearch sidecar, storage layout, auth, vault crypto, indexing pipeline, jobs, updater |
| api.md | The HTTP API surface (/api/* routes) |
| frontend.md | Templates, static JS modules, and how the UI talks to the API |
| development.md | Local dev workflow, testing, conventions |
| ../../BUILD.md | Building from source, Docker image, Linux tarball, Windows MSI + winget release process |
| ../../SECURITY.md | Threat model, vault encryption details, hardening, vulnerability reporting |
End-user docs (installing, searching, the vault, settings) live in ../manual — written for non-technical readers. Keep the two in sync when behavior changes: the manual describes what the UI does, these pages describe why and where in the code.
- Entry point:
src/main.rs— socket bind, runtime, window vs. headless, shutdown. - Routes:
src/routes/— one file per feature area, merged insrc/routes/mod.rs. - Services:
src/services/— Meilisearch client + supervisor, extractor, thumbnails, Ollama, updater, secret storage. - Schema:
schema.sql— applied idempotently at boot; there are no migrations (see architecture.md). - License: AGPL-3.0-or-later (
Cargo.toml, SPDX headers).