The full-stack realtime framework for TypeScript apps.

Render your React frontend and run your backend from one server. Server-rendered React, routing, and image optimization next to schema, live queries, auth, jobs, and search. SQLite or Postgres. Deploy to your VPS or Pylon Cloud. No separate Next.js.

Read the docs →
yourapp.com/acme/orders
live · 47 connectedK
acme · Orders · live

Orders dashboard streaming

Revenue · 24h
$48,920
↑ 12.4% from yesterday
Orders · 24h
1,284
↑ 8.1%
Live clients
47
steady · ws
Customer
Email
Total
Status
Created
JMJordan Moss
jordan@kindly.io
$89.00
3s ago
RPRhea Patel
rhea@northbeam.co
$145.00
22s ago
MTMaya Torres
maya@plant.studio
$22.50
pending
1m ago
ACAlex Chen
alex@vellum.dev
$312.00
4m ago
NSNoor Saleh
noor@kits.co
$56.00
failed
6m ago
The model

Three lines of code. The whole stack.

Most stacks are a database, an API server, a pub/sub layer, and a separate frontend framework glued together. Pylon collapses it — the handler is the transaction, the query is the subscription, and the same server renders your React pages.

01 · Declare

Schema as the source of truth.

Entities and indexes in TypeScript. Migrations apply on save. Generates a fully-typed client and an OpenAPI surface, in the same step.

  • Composite indexes declared inline — Pylon picks the right one at query time.
  • Row-level policies live next to the schema, compiled to bytecode in the hot path.
  • Soft delete, timestamps, slugify, versioning — attach with a single line in the manifest.
schema.ts
policies.ts
manifest.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { e, field, policy, timestamps, softDelete, audit } from "@pylonsync/sdk";

export const Order = e.entity("Order", {
  customer:  field.id("Customer"),
  total:     field.int(),                 cents
  status:    field.enum(["pending","paid","failed"]),
  createdAt: field.datetime().defaultNow(),
})
  .indexes(e.idx("customer", "createdAt"), e.idx("status"))
  .policies(policy({
    allowRead:   "auth.userId == data.customer || auth.hasRole('admin')",
    allowUpdate: "auth.hasRole('admin')",
  }))
  .behaviors([timestamps, softDelete, audit]);
// → pylon codegen client · OpenAPI at /api/openapi
02 · Subscribe

db.useQuery is a subscription.

Pylon walks the change log on every write and pushes a diff to every client whose query depends on it. No polling. No cache invalidation. No fan-out service to operate.

  • WebSocket-first with HTTP fallback. Reconnection, backoff and replay are handled.
  • IndexedDB mirror answers reads in 0.4ms while the diff is in flight.
  • Optimistic mutations with automatic rollback when the server rejects.
orders.live · 247 deltas / minute
−60s−30snow
ord_9f2aJordan Moss · paid+$89
ord_9f2bRhea Patel · paid+$145
ord_9f2cMaya Torres · pending$22.50
03 · Govern

Auth and policies, where they belong.

25+ OAuth providers, magic-link, OIDC discovery, guest sessions, API keys. Row-level policies sit next to the data and compile into the query plan, so the rule runs on every read whether you remembered it or not.

  • Multi-tenant with tenant_scope — never write WHERE org_id = ? by hand again.
  • RBAC with organizations, members, roles, and per-resource overrides.
  • Audit log records the actor and the diff for every mutation.
R
Order · read
auth.userId == data.customer || auth.role == 'admin'
live
W
Order · write
auth.role == 'admin'
live
D
Order · delete
disabled · soft_delete
off
Session · auth
magic-link + google, github, oidc
live
Order.create · workflow
chargeemail_receiptfulfill
live
Fifteen primitives

Fifteen primitives. No glue.

The pieces you usually stitch together ship as one system — frontend and backend. Render the React side, or use the data side alone, then layer on realtime, workflows, search, and game-shaped primitives when the product needs them.

web

Server-rendered React

Streaming SSR with hydration and per-route code splitting. Pages render on the server and ship only the JS the route needs.

web

<Link> & <Image>

Client-side navigation with prefetch, and image optimization in Rust — resize, WebP, content-addressed cache. No next/image.

~
web

Tailwind, wired

Tailwind compiles on save and ships with the page. No second build step, no PostCSS config to babysit.

{ }
app

Typed schema

Entities with composite indexes and relations. Migrations apply on save, generates a typed client.

app

Live queries

db.useQuery is a WebSocket subscription. Diffs over the wire on every relevant write.

fn
app

Server functions

Queries, mutations, actions in TypeScript with v.* validators. Filename is the RPC name.

==
app

Row-level policies

Access rules next to the schema. Compiled to bytecode, evaluated in the query plan.

app

Auth, included

Magic-link, 25+ OAuth providers, OIDC discovery, guest sessions, API keys. No third-party SDK.

app

Faceted search

BM25 + live facets across millions of rows. Maintained in the same transaction as your writes.

app

Files & uploads

Presigned uploads to local disk or any S3-compatible bucket. R2, Backblaze, MinIO — one env var.

app

Durable workflows

Multi-step flows with sleep, retries, event waits. State checkpointed on every step.

app

Jobs & cron

Enqueue with ctx.schedule. Cron lives in the manifest — version-controlled with code.

db
app

SQLite or Postgres

SQLite is the default. Set DATABASE_URL and the same schema targets Postgres.

game

Rooms & presence

WebSocket rooms, per-member presence, join/leave events, broadcast. No Ably, no Pusher.

game

Tick-based shards

Authoritative 20/30/60 tps loops in Rust. Area-of-interest, snapshot + delta replication, late-join.

Frontends

Renders the web. Serves every other client.

Pylon server-renders your React app from the same process that runs your data — and the same backend feeds your SPA, mobile, and native clients with realtime subscriptions, optimistic mutations, and a typed client.

WEB · SSRbuilt in

Pylon SSR

app/page.tsx

Server-rendered React from the same server as your data. Streaming SSR, per-route code splitting, <Link> and <Image> built in. No separate Next.js process. @pylonsync/next is there if you want it.

WEB · SPAany bundler

React

db.useQuery("Order")

Subscription hooks that re-run on every relevant write. IndexedDB mirror answers reads in 0.4ms while the diff is in flight. Optimistic mutations with auto-rollback.

MOBILE · CROSSexpo

Expo / RN

@pylonsync/react-native

The same hooks API, mobile-tuned. Hermes-friendly, background-safe sockets, on-device SQLite mirror so reads survive a bad cell tower.

NATIVE · IOSswiftpm

Swift

pylon codegen --target swift

First-class Swift SDK with TypeScript-sync parity and a Loro CRDT bridge. Codegen turns your schema into typed entities and structured-concurrency clients.

How it compares

Convex velocity. Rails ownership.

Pick a managed backend and you inherit its boundaries — and still bolt on a separate frontend framework. Pick raw infrastructure and you rebuild everything. Pylon is one model for the frontend and the backend, across both.

CapabilityPylonConvexSupabaseFirebase
Declarative schemaFirst-classYesYesPartial
Live queries with diffsFirst-classYesYesYes
Server-rendered frontendBuilt in
TypeScript server functionsNativeNativeEdge (Deno)Cloud Functions
Faceted search, no sidecarBM25 in DBpg_trgm
Tick-based authoritative loop20/30/60 tps
Self-host as one binaryscp-abledocker-composemulti-serviceVendor only
Open sourceMIT / ApacheYesYes
Deploy

One app, four ways to run it.

Pylon is not a hosting bet. The same frontend-and-backend app runs locally, on Pylon Cloud, on a VPS, or inside your AWS account — without rewriting handlers.

01 · LOCALSQLite

pylon dev

$ pylon dev

SQLite backend, hot reload, type-safe client regen on every save. Zero config while you build.

02 · CLOUDmanaged

Pylon Cloud

$ pylon deploy

Hosted infra when you want the framework, not another ops project. Same app, same APIs.

03 · SELF-HOSTportable

Your infra

$ docker run pylon

Run the same binary on a VPS, container platform, or private network when control matters.

04 · AWSterraform

ECS + Aurora

$ terraform apply

Move into your AWS account with Postgres, load balancing, secrets, and your VPC. Inherit none of the framework.

Quickstart

Four commands to a running app.

Frontend and backend live in minutes. Move to Pylon Cloud or your own infrastructure later — without changing a line of programming model.

my-app — pylon dev
npm create @pylonsync/pylon@latest my-app
Creating my-app in ./my-app
✓ Scaffolded api/ + web/ + shared schema
✓ Installed @pylonsync/cli, sdk, react
cd my-app && pylon dev
→ api http://localhost:4321
→ web http://localhost:3000
→ studio http://localhost:4321/studio
✓ Schema synced · 0 conflicts
◉ Live · 0 clients · listening
01
Scaffold

One npm command. Generates a Pylon backend + Next.js frontend in a single workspace — no global binary, no Rust toolchain, no Docker.

02
Install

Pulls @pylonsync/cli (platform binary) plus the SDK and React bindings. Nothing global.

03
Run dev

Spins up the API and web together. Watches your schema, regenerates the typed client on save.

04
Connect from React

One init call, then useQuery subscribes and re-streams on every change.

Claude Code skill

Your coding agent already knows Pylon.

One markdown file teaches Claude Code the schema model, the policy DSL, the server-function runtime, and the React client. Drop it into ~/.claude/skills/pylon/ and Claude generates code that compiles instead of code that looks like it should.

install pylon skill
mkdir -p ~/.claude/skills/pylon
curl -fsSL https://pylonsync.com/pylon-skill.md \
> ~/.claude/skills/pylon/SKILL.md
✓ Wrote 523 lines
Schema · policies · functions · React · deploy
 
# Restart Claude Code; the skill auto-loads
# whenever you work on a Pylon project.
01
One file, the whole framework

523 lines of conventions — schema shape, policy expressions, ctx.* helpers, manifest behaviors, deploy paths. The same handbook the maintainers write to.

02
User-wide or project-scoped

Save to ~/.claude/skills/pylon/SKILL.md for every project, or .claude/skills/pylon/SKILL.md committed alongside one app.

03
Stays current with the framework

The skill lives at pylonsync.com/pylon-skill.md and ships with each Pylon release. Re-curl when a new version drops.

Read it first

Full install instructions and the whole skill rendered inline at pylonsync.com/skill.

Stop gluing services together.

Open source, MIT/Apache. Free tier on Pylon Cloud — pay when you outgrow it, or take the binary and run it yourself.

Or run locally: