# SearchBox developer docs SearchBox is a local-first document search app shipped as a single Rust binary: an [Axum](https://github.com/tokio-rs/axum) web server with the entire UI (MiniJinja templates + vanilla JS) embedded via `rust-embed`, a [Meilisearch](https://www.meilisearch.com/) 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. ## Contents | Doc | What's in it | |---|---| | [architecture.md](./architecture.md) | Process model, Meilisearch sidecar, storage layout, auth, vault crypto, indexing pipeline, jobs, updater | | [api.md](./api.md) | The HTTP API surface (`/api/*` routes) | | [frontend.md](./frontend.md) | Templates, static JS modules, and how the UI talks to the API | | [development.md](./development.md) | Local dev workflow, testing, conventions | | [../../BUILD.md](../../BUILD.md) | Building from source, Docker image, Linux tarball, Windows MSI + winget release process | | [../../SECURITY.md](../../SECURITY.md) | Threat model, vault encryption details, hardening, vulnerability reporting | ## User documentation End-user docs (installing, searching, the vault, settings) live in [`../manual`](../manual/README.md) — 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. ## Quick orientation - Entry point: `src/main.rs` — socket bind, runtime, window vs. headless, shutdown. - Routes: `src/routes/` — one file per feature area, merged in `src/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](./architecture.md#storage-layout)). - License: AGPL-3.0-or-later (`Cargo.toml`, SPDX headers).