The Problem
Enterprises need a single place to search across heterogeneous workplace tools (Google Workspace, Slack, Confluence, Jira, file systems, etc.) while keeping data on‑premises and respecting source‑system permissions. Existing solutions either require cloud SaaS or force separate search stacks for each source.
What This Does
omni bundles a search backend, AI agent, and web UI into a self‑hosted platform. Core services live under services/ (Rust indexer, searcher, connector‑manager) and expose HTTP APIs used by the SvelteKit UI in web/. Connectors for each external system are isolated Rust crates in connectors/ (e.g., connectors/google/, connectors/atlassian/) each with its own Dockerfile. Shared utilities (DB models, content storage, SDK client) are in shared/. The sdk/ folder provides a TypeScript wrapper (sdk/typescript/src/index.ts) for external callers.
How It Is Wired
Execution begins in benchmarks/src/main.rs (line 65) – the only main function the static analysis could resolve. It calls run_server, which:
- Loads configuration via
from_env(reads.env.examplevariables). - Creates a Redis client (
RedisClient::open) – this is the first external resource access (filesystem‑based Redis socket). - Starts the HTTP server (
run_server) that routes to the Rust search service.
From the request path, the server eventually calls create_sync_run (≈20 distinct callers) which inserts a record into Postgres (shared/src/db/repositories/document.rs::insert). That function is a hub: 13 modules import web/src/lib/server/db/index.ts, and shared/src/embedding_queue.rs is the most‑used internal file (15 functions, called from 53 places, also writes to the DB).
Connector containers are built from the Dockerfiles under connectors/*/Dockerfile. When a sync job runs, the connector‑manager (services/connector-manager/src/scheduler.rs::run) invokes the appropriate connector binary (e.g., connectors/google/src/main.rs). The connector reads its source system (Google Drive, Slack, etc.) and writes documents via shared/src/content_storage.rs::store_content, which in turn persists to the DB.
Two import cycles inflate change risk:
services/ai/providers/__init__↔services/ai/embeddings/__init__(both in a cycle).sdk/typescript/src/connector.tsparticipates in the same cycle.
The hub module web/src/lib/server/db/index.ts has the highest inbound degree (13) and therefore a large blast radius; any API change here ripples through many UI components.
How To Use It
# Clone the repo
git clone https://github.com/moses-y/omni.git
cd omni
# Build all Rust crates (requires Cargo)
cargo build --workspace
# Build the UI (npm inferred from package.json in web/)
cd web
npm ci
npm run build # see package.json scripts for exact command
# Start the stack with Docker Compose (compose file lives in repo root)
docker compose up --build
Configuration is read from .env.example; replace placeholder values with your own secrets (Postgres URL, Redis URL, LLM API keys). The UI runs on port 3000, the Rust API on port 8000 (as defined in services/searcher/src/main.rs – not listed but inferred from Cargo.toml binaries).
Real‑World Use
A company deploys the stack behind its internal network. An employee searches “Q3 sales deck” in the web UI; the request hits run_server, which queries Postgres (BM25 + pgvector) via shared/src/db/repositories/document.rs. If the result is a Google Drive file, the AI agent calls the Google connector, which streams the document into shared/src/content_storage.rs and returns a summary generated by the LLM configured in services/ai/.
Code Health & Issues
Measured static‑analysis findings
- HIGH (cognitive_load) – Deep nesting (max depth 8) in
connectors/microsoft/ms_connector/graph_client.py,connectors/github/github_connector/connector.py,services/ai/providers/bedrock.py. - HIGH (soundness) – Import cycles in
services/ai/embeddings/__init__.py,services/ai/providers/__init__.py,sdk/typescript/src/connector.ts. - MEDIUM (resilience) – Bare
except:blocks inconnectors/microsoft/ms_connector/syncers/onedrive.py,.../sharepoint.py. - MEDIUM (clarity) – Hub module
web/src/lib/server/db/index.tshas 13 dependents; changes have high blast radius.
Health‑audit findings (11 total)
- HIGH – Pin GitHub Actions to commit SHAs (
.github/workflows/*.yml). - HIGH – Upgrade vulnerable dependencies (e.g.,
tar@0.4,futures-util@0.3,sqlx@0.8,opentelemetry_sdk@0.27). - HIGH – Remove committed
.env.testinservices/indexer/and rotate its secrets. - HIGH – Add a test step to CI workflows (currently no test command).
- MEDIUM – Enable Dependabot or Renovate (
.github/dependabot.yml). - MEDIUM – Pin Docker base images by digest in
connectors/atlassian/Dockerfile. - MEDIUM – Add a dependency‑vulnerability scan gate to CI.
- MEDIUM – Add a pre‑commit secret‑scan hook.
- MEDIUM – Run containers as non‑root (
USERdirective missing). - LOW – Set
timeout‑minuteson workflow jobs (.github/workflows/build-ai.yml).
No critical issues were detected; tests, CI, Dockerfiles, and a LICENSE are present.
The Bottom Line
omni delivers a fully self‑hosted, multi‑source search and AI assistant built on a consistent Rust‑centric backend with a Svelte UI. The codebase is modular but contains several high‑impact cycles and deep nesting that increase maintenance cost. Security‑related hygiene (pinned actions, secret handling, image digests) needs immediate tightening before production use. Teams comfortable with Rust, Docker, and Terraform will find the platform extensible; others should allocate effort to resolve the highlighted health issues first.