The Platform API is the center of the SC ecosystem. Every tool, every agent, every data request routes through here. It handles authentication, authorization, and routing — connecting each consumer to exactly the data it's permitted to see, from the right source, in a consistent format.
It's built as a monorepo with three packages using hexagonal architecture — the package boundary is the architecture boundary:
ctx: { tenantId, principal, logger } as first argument.Multi-tenant from day one. Every domain table has tenantId. Queries that don't filter by tenant are bugs. Per-tenant variation (provider selection, credentials) lives in factories. When proactive agents arrive, they inherit this same security model — no new plumbing.
The Platform API ships as two container deployments from a single codebase:
The REST API that all tools call. Serves telemetry, assets, work orders, and other data. Live OpenAPI spec for every endpoint.
The Mastra-based agent runtime that powers Ask Ricky and will power proactive agents. Same codebase, same auth, separate scaling.
The Platform API connects to external systems and normalizes their data into a consistent format. Per-tenant configuration controls which integrations are active.
| Integration | Type | What It Provides |
|---|---|---|
| Murphy M-Link | IoT / Telemetry | Live compressor sensor data — pressures, temps, RPM, fault codes |
| Detechtion Enbase | Equipment Monitoring | Equipment health metrics, normalized alongside M-Link |
| Samsara | GPS / Fleet | Real-time vehicle locations, route history |
| NetSuite | ERP | Work orders, assets, inventory (migrating to Data Hub) |
| FieldAware | Field Service | Work order status, time/labor, field notes |
Every user-facing tool in the ecosystem gets its data through the Platform API:
The Platform API enforces the ecosystem's permissions and scoping model. For the full deep-dive, see the dedicated Permissions & Scoping page.
| Caller | Auth Method | How It Works |
|---|---|---|
| Humans | Entra ID (Bearer JWT) | Token identifies the person; DB User row determines tenant + role. No API keys for humans, no dev fallback in any environment. |
| Machines (agents, connectors) | sk_ API Keys |
Opaque bearer token, hash-matched to ApiKey row. Binds caller to tenant + carries scopes as ApiKeyScope rows. |
The Platform API is configured and monitored through Platform Admin, which provides: