Optional, install-what-you-need components for OneBase. Each component is its own package, so apps install and mount only what they use. All packages follow the onebase component model: own tables, typed config, crons, HTTP routes, and no-codegen client exposure.
| Package | What it does |
|---|---|
@onebase/teams |
Teams with opt-in roles (owner/admin/member by default) |
@onebase/app-store |
Apple App Store: JWS verification, Server Notifications V2 webhook, StoreKit 2 transaction sync, subscription state |
@onebase/entitlements |
Plans, limits, and usage; can be driven by app-store events |
@onebase/push |
Push notifications: APNs and FCM, device registry, dead-token cleanup |
@onebase/email |
Email transports (Resend, Postmark, SMTP) + onebase auth sendCode helper |
@onebase/notifications |
In-app notification feed with live queries and an optional email channel |
Each package's README covers setup, usage and its functions. The same pages appear under Component packages on the OneBase docs site, which rebuilds from this repository daily.
ui/ is reserved for UI component packages (@onebase/ui-<name>).
bun install # links the checkout at ../onebase as the `onebase` dependency
bun test # every package's tests, plus the harness smoke test
bun run typecheck # tsc over the root test helper and every packagePackages ship their TypeScript source directly (no build step) — the same way
onebase itself is consumed, since bun runs TS natively. onebase is a peer
dependency; until it publishes to npm, this repo links the local checkout.
packages/<name>/with apackage.json(exports: { ".": "./src/index.ts" }), atsconfig.jsonextending the base (include: ["src", "test"]), andonebaseinpeerDependencies.- Model
src/index.tson any package here:defineSchemathe component's tables,componentServer<DataModelFromSchema<typeof schema>, Config>()for the function builders,defineComponent, then amountfactory withsplitMountOptions. - Tests go in
test/and mount the component through../../../test/app(openRuntime+call/callMutation), which runs a real onebase runtime on SQLite. The helper deep-importsRuntime/startAppfrom the linked checkout, sinceonebase's package exports don't expose them. bun testandbun run typecheckat the root pick the package up automatically.
Each package versions and publishes independently (bun publish inside the
package directory). Cross-package imports (e.g. entitlements → app-store) are
optional peer dependencies. Components themselves depend only on
onebase/components, onebase/server, and onebase/values at runtime.