@theda/sdk
v0.7.6
Published
TypeScript SDK for the Theda platform — types, builders, and context interfaces
Readme
@theda/sdk
TypeScript SDK for the Theda platform — types, builders, and context interfaces for building Theda apps.
Install
npm install @theda/sdkQuick start
import { app, z } from "@theda/sdk";
const myApp = app("my-app");
const db = myApp.database("main");
myApp.route("GET", "/hello", {
handler: async (ctx) => ({ message: "Hello from Theda!" }),
});
export default myApp;What's included
- App builder —
app()entry point for declaring databases, routes, commands, workflows, and policies - Type-safe attributes — declare your data model with full type inference
- Zod re-export —
zfor input/output validation schemas - Manifest serialization —
toManifestJSON()for build tooling - Full contract parity — matches the OCaml contract (
lib/contract.mli) surface
Related packages
| Package | Description |
|---------|-------------|
| @theda/cli | Development CLI — theda dev, theda build, theda check |
| @theda/local | Local development shell with SQLite-backed database |
| @theda/test | Test doubles and in-memory backends |
| @theda/eslint-plugin | ESLint rules for Theda apps |
| create-theda-app | Project scaffolding — npx create-theda-app my-app |
License
Apache-2.0
