How thewuuryar/askbar works
Askbar is a self-hosted AI question popup: a paired desktop client sends text to the server, which runs and stores replies independently of the client window. The server delegates provider calls to the isolated model gateway; audit recording, user history, and search support that workflow. Separate branches cover administration, alerts, encrypted backups, and auditing. The README documents these capabilities and the service boundaries; source excerpts and the index establish selected implementation links, but many subsystem internals were not sampled.
Main entry points: web.rs Admin site · remote.rs Remote client · generation.rs Reply generation · main.rs Desktop runtime
Components 20
Desktop client
- Popup UI
clients/desktop/ui/main.js - Desktop runtime
clients/desktop/src-tauri/src/main.rs - Remote client
clients/desktop/src-tauri/src/remote.rs - Client settings
clients/desktop/src-tauri/src/client_config.rs - Pairing and TLS
clients/desktop/src-tauri/src/pinned_tls.rs - Pending messages
clients/desktop/src-tauri/src/outbox.rs
Conversation server
- Client API
services/server/src/client_api.rs - Reply generation
services/server/src/generation.rs - Conversation storage
services/server/src/store.rs - Client authentication
services/server/src/auth.rs
Administration
- Admin site
services/admin/src/web.rs - Admin routing
services/admin/src/routes.rs - Admin settings
services/admin/src/db.rs
Provider and alerts
- Model gateway
services/model-gateway/src/llm.rs - Model provider
- Alert delivery
services/alerter/src/lib.rs
Audit and backups
- Audit service
services/auditor/src/ingest.rs - Audit records
crates/askbar-audit/src/lib.rs - Encrypted backups
crates/askbar-service/src/backup.rs
Other components
- User
Connections 19
- User → Popup UI: asks
README.md - Popup UI → Desktop runtime: invokes
clients/desktop/src-tauri/src/main.rs - Desktop runtime → Remote client: delegates to
clients/desktop/src-tauri/src/main.rs - Remote client → Client API: sends requests
README.md - Remote client → Client settings: uses settings
clients/desktop/src-tauri/src/remote.rs - Remote client → Pairing and TLS: uses TLS pinning
clients/desktop/src-tauri/src/remote.rs - Desktop runtime → Pending messages: tracks pending text
clients/desktop/src-tauri/src/main.rs - Client API → Client authentication: authenticates
services/server/src/client_api.rs - Client API → Reply generation: starts replies
services/server/src/client_api.rs - Reply generation → Conversation storage: stores replies
- Reply generation → Model gateway: requests generation
README.md - Model gateway → Model provider: streams model output
services/model-gateway/src/llm.rs - User → Admin site: administers
README.md - Admin site → Admin routing: serves routes
services/admin/src/routes.rs - Admin site → Admin settings: manages settings
- Admin site → Alert delivery: configures alerts
- Reply generation → Audit service: records replies
README.md - Audit service → Audit records: keeps audit trail
- Admin site → Encrypted backups: manages backups