Documentation
One schema. Every output. Backend-first TypeScript framework with schema-driven codegen.
One Schema. Every Output.
QUESTPIE is a backend-first TypeScript framework where you define your data schema once, and codegen + introspection project it into typed runtimes, APIs, and frontends.
Schema → Codegen → Typed Runtime → Projection → Any FrontendDefine collections, routes, jobs, and hooks as plain files. Codegen wires them into a type-safe runtime. The admin panel, client SDK, and OpenAPI spec are all projections of the same schema — not separate definitions.
Active Development — QUESTPIE follows semantic versioning. The API may change between releases. Full stability is targeted for v3.
How It Works
import { collection } from "#questpie/factories";
export default collection("posts").fields(({ f }) => ({
title: f.text(255).required(),
body: f.textarea().localized(),
cover: f.upload({ to: "assets", mimeTypes: ["image/*"] }),
author: f.relation("users"),
status: f.select(["draft", "published"]),
publishedAt: f.date(),
}));This single file defines:
- Database schema — Drizzle table with correct column types
- API validation — Zod schemas for create/update
- Query operators — Type-safe
where,orderBy,with - Client types — End-to-end TypeScript from server to frontend
- Admin UI — Form fields, list columns, filters (when
@questpie/adminis installed)
Package Architecture
Required
questpie — core runtime (collections, fields, hooks, routes, codegen)
@questpie/<adapter> — HTTP adapter (hono, elysia, or nextjs)
Optional
@questpie/admin — admin interface via schema introspection
@questpie/tanstack-query — TanStack Query hooksDocumentation Sections
- Start Here — What is QUESTPIE, installation, first app, project structure
- Build Your Backend — Data modeling, rules, business logic, architecture
- Build Your Workspace — Admin panel setup, views, blocks, actions
- Integrate Frontend — Client SDK, TanStack Query, realtime, adapters
- Operate in Production — Database, auth, storage, email, queue, deployment
- Extend the Platform — Custom fields, views, plugins, modules
- Examples — TanStack Barbershop end-to-end walkthrough
- Reference — Complete API reference
Canonical Example
All code examples in these docs come from the TanStack Barbershop — a real booking app with 7 collections, server routes, background jobs, email templates, and a full admin dashboard.