Handbook
Architecture v1.2.0· updated 2026-07-17

Platform Architecture

OMS is a single execution kernel: one router, one auth surface, one data plane. Brains are modules on that kernel, not separate apps.

The system runs on TanStack Start with a file-based router. Every public URL is a route file under src/routes; there is no parallel page framework. Backend logic runs as server functions (createServerFn) for app-internal calls and as file-based server routes under src/routes/api for webhooks and cron.

Data lives in one Postgres schema behind row-level security. Roles are stored in a dedicated user_roles table and checked through a security-definer function — never on profiles, never in localStorage.

Intelligence is organised as numbered Brains (3.0 through 11.0) plus the Kernel Copilot. Each Brain is a module surface, not a separate deployment. Adding a new capability means adding to the kernel, not forking it.

References