Hacker News

Show HN: Pylon Sync, an agent-first full-stack realtime framework

Show HN: Pylon Sync, an agent-first full-stack realtime framework

One TypeScript model - schema, policies, server functions, typed clients - and Pylon wires in live sync, auth, storage, jobs, and one-binary deploy over SQLite or Postgres. You build the product, not the plumbing.

db.useQuery("Order") live Pylon keeps rules, commands, generated types, local data, and logs inside the workflow. Your agent can scaffold, run, debug, and deploy without guessing which console owns the next step.

New apps include AGENTS.md, and the Pylon skill installs with npx skills add pylonsync/pylon. The agent reads the conventions before it edits code.

  • npm create @pylonsync/pylon scaffolds the app.
  • pylon dev runs it locally.
  • pylon deploy ships it to Cloud.
  • pylon codegen builds the client from your schema and functions.

Bad entity names, missing fields, and wrong arguments fail at compile time. The agent can inspect tables, live queries, and logs in /studio while pylon dev runs. Debugging happens against current data.

Declare an entity and its access policy. Pylon creates the table, REST and realtime API, row-level checks, and typed React client. No resolvers, ORM layer, or separate backend service to keep in sync.

// one entity → a synced table + typed client
const Order = entity("Order", {
  customer: field.string(),
  total: field.float(),
  paid: field.boolean().default(false),
});

// access rules next to the schema - deny by default
policy({
  entity: "Order",
  allowRead: "auth.userId != null",
  allowInsert: "auth.userId == data.ownerId",
});

// the React side - live, typed, no fetch
const { data } = db.useQuery("Order");

Schema, Sync, and Auth

Schema, sync, auth, functions, storage, search, jobs, rooms, and SSR share one schema and one runtime. Pick the pieces your app needs and ship them as one binary.

Define entities, fields, and indexes in TypeScript. Pylon turns them into tables and applies migrations on save.

entity("Order", { total: field.float() })

db.useQuery opens a WebSocket subscription. Every write pushes a diff to subscribed clients, without polling or cache invalidation.

const { data } = db.useQuery("Order")

Write query() for joins and derived data. The server tracks what it read and re-runs when those dependencies change.

Put queries, mutations, and actions in TypeScript files with v.* validators. React calls them through the typed client.

Access rules live next to the schema as expressions like auth.userId == data.authorId. Every read and write is checked; default deny.

allowRead: "auth.userId != null"

Magic-link email, 25+ OAuth providers, generic OIDC discovery, guest sessions, and API keys are built in.

Storage, Search, and Jobs

Start with SQLite in one file. Set DATABASE_URL=postgres://... and the same schema targets Postgres.

Browse tables, inspect live queries, tail logs, and run ad-hoc mutations at /studio. Admin-gated in prod.

Use presigned uploads. Store files on local disk or an S3-compatible bucket such as R2, Backblaze, or MinIO.

Add search to an entity for full-text queries, live facet counts, and sort. Search updates in the same transaction as your writes.

Schedule follow-up work with ctx.scheduler.runAfter, runAt, and cancel. Delays and retries run in the same process.

WebSocket rooms with live presence over the same server - broadcast ephemeral state (cursors, typing, who's online) without a separate realtime service.

Deploy and Scale

Install the Pylon Cloud GitHub App once. Pushes to the default branch deploy; pull requests get previews that disappear after merge.

git push origin main triggers a deploy to your-app.pyln.dev.

Use pylon deploy for CI, locked-down environments, or a manual release. It reaches the same Cloud runtime as the GitHub flow.

Every app sits behind a global edge network, with resize, replicas, regions, and storage a click away from where you deploy. No pre-provisioning. No per-seat pricing.

  • Every app sits behind Cloudflare's edge - CDN caching, TLS, and DDoS protection worldwide, with nothing to configure.
  • Add RAM up to 64 GB, choose performance CPUs, and expand the volume without redeploying.
  • Run up to 32 load-balanced replicas per region on Pro.
  • Deploy in US, EU, APAC, and South America regions.
  • Grow storage live when the app needs room.
  • Bundled SQLite by default; co-located managed Postgres is in private beta.
  • Free tier sleeps when idle. Paid projects stay warm.
  • Bring your domain; Pylon handles TLS.
  • Configure org-level SSO from the dashboard.
  • Activity log, one-click volume restore.

Four Questions Answered Straight

You don't hand your whole stack to a framework on faith. So here are the four questions we'd expect from you, answered straight - then open the repo and judge for yourself.

You could build this yourself. You've built each piece before: the schema and migrations, the row-level access checks, the session handling, the REST endpoints, the socket that pushes live updates, the generated client. The work isn't the hard part; it's that all of them have to agree, and they stop agreeing the day the schema moves. Pylon generates the whole set from one entity and its policy and regenerates them together on every change. What you buy back is the afternoon you'd otherwise spend re-syncing them by hand.

You're importing a framework. Your code does import Pylon's SDK - that's real, and it's the trade: one typed model in place of six services you wire together yourself. But the runtime is a single open-source binary you host, sitting on ordinary SQLite or Postgres. There's no proprietary datastore to escape - take a plain dump, or run the whole platform on your own box with no account.

Lock-in is real. The lock-in worth fearing is a cloud engine you can't self-host. Pylon isn't one.

It's a concrete set of affordances: the rules, commands, generated types, local data, and logs all live in one workflow an agent can drive end to end - scaffold, run a migration, read the failure, redeploy - without hopping between four consoles. Run npm create @pylonsync/pylon and watch an agent take it from empty folder to running app. That's the claim, and it's testable.

There's no starter abstraction to graduate from. The runtime is Rust on Postgres - the same engine you'd move to anyway - so scaling is turning on Postgres mode, adding replicas, and leaning on the edge that already fronts every app, with your code untouched. The migrations that hurt are the ones where a starter backend runs out of room; Pylon doesn't ship one for you to outgrow.

Pricing

  • Hobby: Start with one free project. For weekend builds and your first users.
  • Pro: $25 per org per month; heavier compute, replicas, and storage bill as usage. Production apps with room to grow.
  • Scale: Resize machines, add replicas, expand regions. Bespoke quotas, single-tenant, BYOC. For larger teams.

Pro is $25/org/month. Bigger machines, more replicas, and larger volumes are billed at the underlying compute rate for what you run. Or self-host the open-source framework anywhere - Pylon is one binary. No card for Hobby. Connect GitHub or deploy from the CLI when you are ready.

Comments

No comments yet. Start the discussion.