@@ -275,11 +293,11 @@ for await (const rows of stream) render(rows);`,
- Ready to build the next generation of database APIs?
+ Try it
- Experience the power of composable, capability-first database queries with full type safety and
- AI-native architecture.
+ The playground runs Postgres in your browser via PGlite (no signup, no server) against a real
+ demo schema. Typegres is pre-1.0 and not recommended for production workloads yet.
@@ -297,7 +315,7 @@ for await (const rows of stream) render(rows);`,
className="inline-flex items-center justify-center gap-2 px-6 py-3 bg-gray-900 hover:bg-gray-800 dark:bg-white dark:hover:bg-gray-100 text-white dark:text-gray-900 font-medium rounded-lg transition-colors"
>
- Star on GitHub
+ View on GitHub
@@ -525,6 +543,34 @@ for await (const rows of stream) render(rows);`,
{/* Other FAQs */}
+
+
+ Q: What dialects do you support?
+
+
+ Postgres and SQLite. Both surfaces are code-generated from the engine itself: Postgres from its
+ catalog, SQLite from its documented functions. Each dialect gets its own real functions and
+ operators rather than a lowest-common-denominator abstraction over both.
+
+
+ Drivers: node-postgres and PGlite (WASM Postgres, which the playground on this site runs on) for
+ Postgres; better-sqlite3 and Cloudflare Durable Object storage for SQLite.
+
+
+
+
+ Q: What about tRPC?
+
+
+ tRPC removes most endpoint boilerplate, but it doesn't compose: the client can only call
+ procedures that already exist.
+
+
+ So every new question is another procedure: join these two datasets, filter on something nobody
+ anticipated, aggregate differently. Typegres pushes the composition itself to the server, so the
+ client asks a new question without you shipping a new endpoint.
+
+
Q: What about raw SQL + Row Level Security (RLS)?
@@ -555,23 +601,23 @@ for await (const rows of stream) render(rows);`,
Q: How does the RPC layer actually work?
- A highly constrained interpreter that evaluates untrusted code (the same shape as
- {" "}codemode for AI agents), inspired by{" "}
Cap'n Web
-
- . The client serializes a closure that composes over a set of classes/methods, and the
- server evaluates it in a single RPC call. There's also a{" "}
+ {" "}
+ is the transport, giving you capabilities, promise pipelining and live subscriptions over a
+ single WebSocket. The client serializes a closure that composes over the classes and methods you
+ exposed, and the server evaluates it against that surface in a single RPC call. Cap'n Web
+ ships bundled with Typegres until{" "}
- PR
+ this PR
{" "}
- in flight to make Cap'n Web itself work as a transport for Typegres.
+ lands upstream.
@@ -583,6 +629,12 @@ for await (const rows of stream) render(rows);`,
the framework explicitly guides you to define your allowed surface area (your classes and methods)
and enforces that all queries go through it.
+
+ The shape is close to GraphQL: the relations you define form a graph, and clients traverse it from
+ a root capability, usually the row representing the current user. The difference is what they can
+ do once they're inside those boundaries. GraphQL clients traverse edges; Typegres clients get
+ the database itself: joins, aggregations, and every builtin function and operator.
+
Q: What about DoS?
@@ -596,7 +648,8 @@ for await (const rows of stream) render(rows);`,
Q: What's the project status?