Typebase
A type-safe backend library that lets you define database schema, server actions, and auth as TypeScript files inside your existing app, then deploy with one command.
At a Glance
Fully open-source under MIT license. Free to use, modify, and deploy anywhere.
Engagement
Available On
Listed Aug 2026
About Typebase
Typebase is an open-source TypeScript library that turns a typebase/ folder inside your existing frontend project into a fully typed, deployable backend server. It is published under the MIT license and its source code lives in a public monorepo on GitHub. The project positions itself as combining the developer experience of Convex-style TypeScript functions with the openness of a standard Postgres database you actually own.
What It Is
Typebase is a backend-as-a-folder tool for JavaScript and TypeScript developers. Instead of maintaining a separate backend project, you drop a typebase/ directory into your existing Next.js, SvelteKit, Nuxt, or Expo app and write your server logic there. The CLI handles code generation, schema migrations, and deployment. Your frontend then calls server actions like local functions, with full end-to-end type safety and autocomplete — no manual type declarations, no drift between client and server.
How the Folder Structure Works
The typebase/ directory follows a set of conventions the CLI understands:
actions/queries/andactions/mutations/— exported action functions that map directly to typed client calls (e.g.,actions/queries/todos.tsbecomesclient.queries.todos.*)db/schema.ts— PostgreSQL table definitions using Drizzle ORM; a typeddbclient is automatically injected into action handlersdb/relations.ts— registers table relationships for relational queriesauth.ts— configures email/password and social OAuth providers via better-auth in a single fileenv.ts— declares and validates environment variables at server boot time using Zod, so missing variables are startup errors rather than runtimeundefinedvaluespublisher.ts— declares typed realtime events that actions can publish and stream over SSE
Built on Established Open-Source Libraries
Typebase is a thin orchestration layer over three well-established libraries:
- oRPC — handles the type-safe RPC layer and generates the typed client
- Drizzle ORM — provides the SQL-like TypeScript query API and schema management
- better-auth — powers authentication with sessions, social providers, and a plugin system
Because Typebase delegates to these libraries, their full documentation applies directly when you need capabilities beyond what Typebase's own docs cover.
Deployment Model
The CLI deploys the typebase/ folder as a standalone HTTP server to Vercel, Cloudflare Workers, or Deno Deploy. For the database, Neon (serverless Postgres) is the currently supported target, provisioned and managed automatically during deployment. The homepage notes that Typebase owns zero servers — your backend runs on your own cloud account. The project also supports ejecting: you can generate the server code and host it anywhere, with no vendor lock-in.
Authorization Approach vs. RLS
The homepage makes an explicit architectural argument against Row-Level Security (RLS) as used in tools like Supabase. Typebase's position is that RLS policies are implicit, live in a SQL dialect that editors cannot typecheck, and are easy to misconfigure. With Typebase, authorization is explicit TypeScript code: an action declares the columns it accepts, and auth checks run in code before any data reaches the database. Adding a column surfaces who can write to it at compile time.
Current Status
The repository was created in April 2026 and last pushed in August 2026, indicating active early development. The GitHub repo has an MIT license and is publicly available. The homepage roadmap notes that storage support is not yet available and is next on the roadmap. The project describes itself as having first-class guides for Next.js, SvelteKit, Nuxt, and Expo, with idiomatic client patterns for each framework (Server Components, SvelteKit load functions, Nuxt plugins, Expo SecureStore).
Community Discussions
Be the first to start a conversation about Typebase
Share your experience with Typebase, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully open-source under MIT license. Free to use, modify, and deploy anywhere.
- Full source code access
- MIT license
- CLI for scaffolding and deployment
- Type-safe server actions
- Drizzle ORM database layer
Capabilities
Key Features
- Type-safe server actions callable as local functions from the frontend
- Database schema definition with Drizzle ORM
- End-to-end TypeScript type inference with no drift
- Authentication via better-auth (email/password, social OAuth)
- Environment variable validation at server boot with Zod
- Realtime event streaming over SSE with typed publisher
- CLI for scaffolding, code generation, schema push, and deployment
- Deploy to Vercel, Cloudflare Workers, or Deno Deploy
- Neon Postgres provisioning and management
- Eject anytime — no vendor lock-in
- Works with Next.js, SvelteKit, Nuxt, and Expo
- Explicit TypeScript-based authorization instead of SQL RLS policies
Integrations
Demo Video

