Skip to content
OxyHQPublic

About

The Oxy platform: identity, signed-record protocol, API, SDK, and the first-party apps (Commons, Accounts, IdP, Console)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Latest commit

Β 

History

3,959 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Oxy

Oxy FairCoin @oxy on Mention

@oxy.so/services @oxy.so/core Breathe License 1.0 Bun TypeScript

This is not an SDK repo with extras attached.
The SDK is one package of eighteen. So is the backend behind api.oxy.so,
the identity vault people install on their phones, and the OAuth provider third parties integrate against.


πŸ” One session, every platform

A device holds a {deviceId, deviceSecret} pair per origin and mints short lived access tokens by presenting it. The server stores only a hash of the secret.

No cookies. No refresh token family. Cold boot restores the session without ever redirecting to a login page.

✍️ Identity you actually own

Keys live on the person's device, in Commons. Records are signed client side and chained per subject, so ownership is proven by cryptography rather than granted by us.

DIDs resolve at did:web:oxy.so:u:<id>, reversible in both directions.

Map

graph TD
    P["@oxy.so/protocol<br/><i>signed records, canonical JSON</i>"] --> C["@oxy.so/core<br/><i>API client, session engine, crypto</i>"]
    K["@oxy.so/contracts<br/><i>Zod schemas, one source of truth</i>"] --> C
    K --> A["@oxy.so/api<br/><i>api.oxy.so</i>"]
    F["@oxy.so/federation<br/><i>ActivityPub identity</i>"] --> A
    C --> S["@oxy.so/services<br/><i>the single UI SDK</i>"]
    C --> A
    S --> Commons["Commons<br/><i>identity vault</i>"]
    S --> Accounts["Accounts<br/><i>account management</i>"]
    S --> IdP["auth.oxy.so<br/><i>OAuth provider</i>"]
    S --> Console["Console"]
    S --> Inbox["Inbox"]

    style P fill:#440151,stroke:#D26AE7,color:#fff
    style K fill:#440151,stroke:#D26AE7,color:#fff
    style F fill:#440151,stroke:#D26AE7,color:#fff
    style C fill:#5B0A6B,stroke:#D26AE7,color:#fff
    style A fill:#5B0A6B,stroke:#D26AE7,color:#fff
    style S fill:#5B0A6B,stroke:#D26AE7,color:#fff
Loading

Inference and agents

Kaana and Alia are complementary, not interchangeable:

one-shot product AI -> Oxy inference edge -> Kaana (https://kaana.ai)
agent or chat       -> Alia -> Oxy inference edge -> Kaana

Kaana executes model requests across providers. Alia owns agents, conversations, memory, tools and approvals. Provider keys belong only to Kaana's KMS-encrypted PostgreSQL store, including customer BYOK credentials; they are never app, Oxy or Alia environment variables. Oxy retains only BYOK metadata plus an opaque Kaana handle and revision. Kaana's custody source is merged, while the coordinated Oxy BYOK cut and all production gates remain pending; this contract is not a production-availability claim. Oxy selects an exact deploymentId from complete, current routing evidence: explicit profile priority first, score descending second, and exact ID UTF-16 code units only as a deterministic tie-break. Names and database row order never select a route. Kaana emits requests: 1 once per attempted request. A flat request fee may therefore be prefiltered from the catalogue, but maxPricePerRequest is decided at the edge from the complete maximum quote for this request. Within each explicit priority, only cap- and currency-matching routes survive; score descending and exact ID choose the first survivor. Final usage reports and partial streamed usage both name that exact deploymentId; Oxy never infers it from a provider or model name. Catalogue terms are conservative aggregates across visible deployments, not the terms of a route chosen by name. See the canonical request-routing guide.

🧱 Substrate

Package What it is
@oxy.so/protocol Signed record envelope, canonical JSON, signing and verification
@oxy.so/contracts Contract first API schemas in Zod. Zero React or Expo, so server and clients share one source of truth
@oxy.so/federation App agnostic ActivityPub identity and follow layer
@oxy.so/core API client, session engine, crypto, types. Node, browsers and React Native
@oxy.so/telemetry Framework-agnostic anonymous activity metadata, validation and aggregation primitives

πŸš€ Server and SDK

Package What it is
@oxy.so/api The Express backend behind api.oxy.so
@oxy.so/services The single UI SDK. Expo, React Native and web through React Native Web
@oxy.so/node Self hostable personal data node for a user's own signed records

πŸ“± Applications

App What it is
Commons Native identity vault. Creation, signed records, domain verification, sign in approvals
Accounts Keyless account management: sessions, privacy, settings
auth auth.oxy.so, the OAuth authorize and consent provider
Console console.oxy.so, application registry and credentials

πŸ›  Tooling

Package What it is
create-oxy-app bun create oxy-app, scaffolds a new app in the canonical shape
@oxy.so/app-preset The Oxy distro of Expo: config plugin and Metro, Babel, CSS, ESLint bases
@oxy.so/expo-splash Shared native splash toolkit
@oxy.so/ship oxy-ship, publishes Expo OTA updates

There is no separate web only auth SDK. Web apps use @oxy.so/services through React Native Web, so every platform shares one provider and one auth UI.

Quick start

bun install && bun run build:all

Requires Node 18+ and Bun 1.3+. Build order comes from the dependency graph: contracts β†’ protocol β†’ core β†’ services β†’ everything else.

React: Expo, React Native, or web
import { OxyProvider, useAuth } from "@oxy.so/services";

function App() {
  return (
    <OxyProvider clientId={process.env.OXY_CLIENT_ID} baseURL="https://api.oxy.so">
      <MyComponent />
    </OxyProvider>
  );
}

function MyComponent() {
  const { user, signIn, isAuthenticated } = useAuth();
  if (!isAuthenticated) return <button onClick={() => signIn()}>Sign in</button>;
  return <p>Welcome, {user?.username}</p>;
}

signIn() opens the in app dialog: the accounts already on this device, plus one Continue with Oxy action. Oxy picks how the request reaches the identity β€” opening Commons, pushing to it, or showing a QR β€” instead of asking the person to choose a transport.

Node backends
import { OxyServices, oxyClient } from "@oxy.so/core";

const user = await oxyClient.getUserById("user-id");

const oxy = new OxyServices({ baseURL: "https://api.oxy.so" });
const profile = await oxy.getProfileByUsername("johndoe");

Protect routes with @oxy.so/core/server: createOxyAuthMiddleware, requireOxyAuth, getRequiredOxyUserId, plus safeFetch for SSRF safe outbound requests and createOxyCors for a deny by default CORS policy.

Development commands
bun run build:all   # build every package in dependency order
bun run start       # run the API server
bun run dev         # dev mode across workspaces
bun run test        # tests, turbo dispatches each package's own runner

Packages never re-export from one another. Apps import @oxy.so/services for the provider and UI, @oxy.so/core for types and services, and @oxy.so/contracts for schemas.

Contributing

Issues and pull requests are welcome, especially from people who will tell us when something is badly designed. The mission is not a marketing layer, it is the part we are trying to protect.


Breathe License 1.0 Β· The Oxy Collective, Inc. Β· LICENSE

About

The Oxy platform: identity, signed-record protocol, API, SDK, and the first-party apps (Commons, Accounts, IdP, Console)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages