Framework adapters
Integrate Silos with Next.js, Nuxt, SvelteKit, and TanStack using the @silos framework adapter packages.
Framework adapters wrap the TypeScript SDK with conventions that fit each framework — server-side helpers, environment wiring, and idiomatic data-access patterns. They exist so you can drop Silos into an app without writing the glue yourself.
The adapters are available and evolving alongside the core SDK. Each one builds on
@silos/sdk, so the underlying behavior is the same; the adapter's job is framework
ergonomics. For canonical operation semantics, see the
API reference.
Available adapters
Next.js
@silos/next — server-side helpers for the App Router and route handlers.
Nuxt
@silos/nuxt — server utilities and runtime config wiring for Nuxt.
SvelteKit
@silos/svelte — helpers for SvelteKit server endpoints and load functions.
TanStack
@silos/tanstack — integration for TanStack Start / Query data flows.
Install
Pick the adapter for your framework:
npm install @silos/nextnpm install @silos/nuxtnpm install @silos/sveltenpm install @silos/tanstackConfigure
Each adapter reads your Silos credentials from the environment. Set the API key for management calls and a connection string for SQL.
SILOS_API_KEY=sk_...
SILOS_DATABASE_URL=postgres://user:password@db-xxxx.silos.sh/main?sslmode=requireKeep credentials on the server. Run Silos queries and management calls from server code (route handlers, server endpoints, server actions) — never expose your API key or connection string to the browser.
Use it from server code
The pattern is the same across frameworks: import the adapter's client in a server-only context and run your query or management call there. For example, in a Next.js route handler:
import { silos } from "@silos/next";
export async function GET() {
const result = await silos.sql`SELECT id, email FROM users LIMIT 20`;
return Response.json(result.rows);
}The other adapters follow their framework's own server conventions (Nuxt server
routes, SvelteKit +server.ts endpoints, TanStack server functions) with the same
underlying client.
Standard drivers still work
You don't have to use an adapter. Because Silos speaks the Postgres wire protocol, any framework that supports Postgres supports Silos with a plain connection string and your driver or ORM of choice. The adapters are a convenience, not a requirement — see Connecting → Drivers and ORMs.