OmniRoute Codebase Documentation
v3.8.1Last updated: 2026-05-13
Was this page helpful?
Loading OmniRoute...
Last updated: 2026-05-13
Was this page helpful?
Version: v3.8.0 Last updated: 2026-05-13 Audience: Engineers contributing to OmniRoute or building integrations on top of it.ARCHITECTURE.md. For deep dives on individual subsystems (Auto Combo, MCP server, A2A server, Skills, Memory, Cloud Agents, Resilience, Compression, etc.) see their dedicated files in this
directory.
what exists in the repository today so that a new engineer can navigate the tree, understand the runtime layering, and know where to add code without inventing new modules.
Next.js 16 (App Router, standalone output, no global middleware) |
| Language | TypeScript 5.9+ β target , , , |
| Runtime | Node.js (enforced via) |
| Database | SQLite via (singleton, WAL journaling) |
| Desktop | Electron 41 + 26.10 (separate workspace at ) |
| Tests | Node native test runner (unit/integration), Vitest (MCP, autoCombo, cache), Playwright (e2e + protocols-e2e) |
| Build | Next.js standalone via |
| Lint/format | ESLint flat config + Prettier ( via Husky pre-commit) |
| Module system | ESM everywhere () |
| Workspaces | npm workspace β is the only sub-workspace |
):
- β
- β
(API and dashboard share the same process). Data
directory is env var, defaulting to .
no global middleware β interception is done per-route.
:
| ) | |
, , |
|
, , |
|
, |
|
, , |
|
, , |
|
, , |
, , , , , , ,
, , , , , ,
, , , , , , ,
, , , , , ,
, , , plus root , ,
.
is the Gemini-style compat surface (a thin wrapper that translates into
the same pipeline).
, , |
|
, , |
|
, , |
|
| (password reset / hashing) | |
| ) | |
| ) | |
, , |
|
, |
|
, , |
|
| , β¦) | |
, , |
|
, , |
|
| ) | |
, |
|
, , |
|
, , |
|
| β settings for circuit breaker, cooldown, lockout | |
, , |
|
| (write-behind buffer) | |
, (Cloud Sync) |
|
| ) | |
, , |
|
:
, , , , , , , , , , , , , , , in , WAL journaling).
Never write raw SQL in routes or handlers β go through these modules.
diagrams/db-schema-overview.mmd
, ,
, , , ,
, , ,
, , ,
, , , ,
, , , , ,
, , ,
, , , ,
, , , ,
, , , ,
, , , ,
, , , ,
.
holds 55 versioned files (idempotent, transactional) and is
executed by at boot.
, , , , ,
, , ,
, ,
, , ,
, , , ,
, , ,
, , , , ,
, , , ,
, , ,
, , , ,
, , ,
, , ,
, , , ,
, , , ,
(plus FTS5 virtual tables for memory search).
, |
|
(Zod-validated provider catalog), ,
, , , ,
, , ,
, (denylist), ,
, , , ,
, , , ,
, .
- β
(~80 Zod schemas), ,
, , , .
- β public API contracts shipped to npm.
- β shared TS types.
- β
, , , ,
, , , , ,
, , , , ,
, , , ,
, , , ,
, , ,
, , ,
, plus dashboard hooks/components under , ,
, , , .
. Owns request processing, executors, translators, services, transformer, and the MCP server.
():
, , , , ,
, , , , , ,
, , , , , , ,
, , , , ,
, , , , , plus
(shared identity helper) and (registry).
using the generic
OpenAI-compatible executor. The full provider catalog (177+ entries) lives in
.
):
, , ,
, , ,
, , .
- 8 response translators (
):
, , , ,
, , ,
.
- 9 helpers (
):
, , , ,
, , , , plus
helper tests.
- Image helpers (
).
- ,
, , .
-based Responses API β Chat
Completions converter (used by the route catch-all).
):
(14 strategies), , |
|
β , |
|
(cooldown + lockout), , |
|
, , |
|
, , |
|
, , |
|
, , |
|
, , |
|
| β full compression engine wiring | |
, , |
|
, , |
|
, |
|
(12 scoped under ,
5 compression tools, 3 memory tools, 4 skills tools, plus advanced tools added
through ).
- 3 transports: stdio, HTTP Streamable, SSE.
- 13 scopes declared in
.
- (populated by
).
- ,
, , , ,
, , ,
,
plus tests under .
- MCP-SERVER.md for the full tool catalog.
, ,
), per-format model registries (,
, , ,
, , , ),
identity helpers (, ,
, , ,
, , ),
credential helpers (, ), and cloud
adapters (, , , ,
, , , , , ,
, , , ).
, ,
, , ,
, , , ,
, , ,
, , ,
, , , ,
, , , ,
, , , , ,
.
, ,
, . Auto-update is via
pointing at the GitHub release feed.
β :
- β
, , |
|
, , |
| via Node test runner (concurrency 10) | |
β , ,
, ,
, , ,
, , ,
.
β , ,
, , ,
, ,
, ,
, , ,
.
β , ,
, ,
, ,
, ,
, .
β , .
β , ,
, ,
, , ,
.
β , ,
, .
diagrams/request-pipeline.mmd
, persisted in |
||
in ; consumed by |
||
, persisted in |
RESILIENCE_GUIDE.md and the dedicated section in CLAUDE.md.
)..).. from .
-
- , numbered
sequentially, idempotent, transactional.
- (re-export only β no logic).
- .
).
- .
- .
- .
- MCP-SERVER.md.
A2A-SERVER.md Β§ Adding a New Skill. Skills live in
and are registered through the A2A task manager.
trailing commas β enforced by Prettier via .
- Imports: external β internal (
, ) β relative.
- Naming: files
or , components ,
constants .
- ESLint:
, , = everywhere;
= in and , error elsewhere.
- TypeScript:
(legacy posture). Prefer explicit types over
inference for cross-module boundaries.
- Database: never write raw SQL in routes or handlers β always go through
modules. Never add logic to .
- Errors: try/catch with specific error types, log with pino context. Never
silently swallow errors in SSE streams; use abort signals for cleanup.
- Security: never use
/ / implied eval. Validate
all inputs with Zod. Encrypt credentials at rest (AES-256-GCM). Keep
denylist aligned with the
sanitize/validation layer.
- Commits: Conventional Commits β
. Allowed scopes:
, , , , , , , , ,
, , .
- Branches: prefixes
, , , , ,
. Never commit directly to .
- Husky: pre-commit runs
+ +
; pre-push runs .
/ implied eval.