Skip to main content

What is Pylon?

Pylon is a full-stack framework for coding agents. You or your agent write the schema, policies, and functions in TypeScript. Pylon runs the backend and React SSR on Bun behind one Rust server. It generates a typed client. It keeps shared state in sync for dashboards, CRMs, collaborative tools, and chat. The same server handles the database, the API, auth, and WebSocket connections. It runs on SQLite or Postgres. You deploy it with one command.

Quickstart

Build a live app in five minutes.

Core concepts

Entities, policies, functions, live queries.

SSR

File-based routes, instant navigation, and image optimization without Next.js.

Deploy

Self-host, Pylon Cloud, or Vercel + Pylon Cloud.

What you get

  • Typed schema: declare entities in TypeScript and get types everywhere.
  • Row-level policies: keep access rules next to your data, not in middleware.
  • Server functions: call queries, mutations, and actions from the client over RPC.
  • Live queries: db.useQuery(...) subscribes to results and updates them after a write.
  • Auth: email magic links, OAuth, and guest sessions, with no third-party SDK.
  • SSR: file-based React routes with <Link>, <Image>, and built-in Tailwind, with no Next.js.
  • One server: a Rust binary that runs your TypeScript and SSR on Bun, on one port.

One backend runtime

Most realtime backends are three systems: a database, an API server, and a realtime pub/sub layer. You keep them in sync yourself. Pylon puts those jobs in one runtime. Writes go through the same process that serves reads and pushes updates. A live query re-executes when a dependent row changes. It streams the diff to each subscriber, with no separate cache-invalidation or fan-out layer.

What it’s good for

  • SaaS apps with live dashboards
  • internal tools, CRMs, and ERPs
  • collaborative editors
  • multiplayer games and worlds
  • any case where two browsers show the same thing at the same time

Storage

Pylon runs on SQLite or Postgres. SQLite is the no-setup default for local development and single-node production up to tens of gigabytes. Use Postgres for horizontal scale, existing Postgres infrastructure, or shared-nothing deployments. The schema, policies, functions, and client APIs stay the same. Set DATABASE_URL=postgres://... to use the Postgres adapter.

How to read these docs

Start with the Quickstart. It shows the shape of a Pylon app in five minutes. Then use these sections:
  • Core concepts: entities, policies, functions, and live queries.
  • SSR: file-based routing, <Link>, <Image>, and the full-stack story.
  • Deploy: self-hosting.
  • Deploying to Vercel: the Next.js + Pylon Cloud production stack.
  • Examples on GitHub: full apps you can clone (CRM, ERP, chat, 3D world, SSR demos, and more).