@oxy-hq/sdk) lets you build custom applications — real
React + Vite apps — that read from your Oxygen project: raw SQL, the
semantic model,
agents, and automations. You
write a normal frontend; a small set of hooks and drop-in components handle
authentication, querying, and streaming for you.
This is the code-first Customer Apps platform (React bundles shipped with
oxy publish) — distinct from YAML Data Apps
(.app.yml dashboards). Reach for the SDK when you want full control over the
UI; reach for Data Apps when a declarative dashboard is enough.Install
react (^19) is a peer dependency. @oxy-hq/vite-plugin wires the served base
path, copies oxy-app.json into the build, and injects the dev identity shim —
drop it into vite.config.ts:
vite.config.ts
Scaffold a new app
The fastest way to start iscreate-oxy-app, which copies a curated template
(Vite + React with the SDK already wired up):
First query
Wrap your tree in<OxyAppProvider> (it resolves the app’s identity), then read
data with hooks:
src/App.tsx
Identity (oxy-app.json)
Every app ships an identity-only manifest at its project root (next to
vite.config.ts, not under public/):
oxy-app.json
window.__OXY_APP__; OxyAppProvider reads the injection first and the manifest
second.
Authentication
There is no API key in the bundle. Requests are authorized by the viewer’s Oxygen session (a same-origin cookie) or, in cross-origin local dev, a bearer token the dev proxy attaches. A bundle can never read data its viewer couldn’t already read — access is always scoped to project membership.Deploy
Build the bundle and ship it to Oxygen with a one-way deploy:/customer-apps/<org>/<app>/.
Next steps
Hooks & components
useQuery, useSemanticQuery, useAgentRun, OxyChat, and moreOxygen Functions
Server-side handlers for work the browser shouldn’t do