New in PocketOne
PocketOne does everything PocketBase does, and adds the features below. They're all built into the pocketone
binary, and most are on by default. There's nothing to install.
Three of them set PocketOne apart: hooks with async, import and TypeScript,
async pages in TSX, and hundreds of apps running as isolates in one process.
Modern JavaScript on the server
Hooks with async, import and TypeScript. Your pb_hooks run on QuickJS with the same JS API you
already use, plus:
asynchandlers andawait. The app keeps serving other requests while a handler waits on the database or an HTTP call.- ES modules:
importandexportbetween your files, and packages fromnode_modules. - TypeScript: write
.pb.tsfiles and they run as they are. - Globals shared by every handler, and memory and time limits that stop a runaway script instead of the app.
// pb_hooks/orders.pb.ts
import { total } from "./lib/pricing.mjs"
routerAdd("GET", "/api/orders/{id}/total", async (e) => {
const order = await e.app.findRecordById.async("orders", e.request.pathValue("id"))
return e.json(200, { total: total(order) })
})
Pages in TSX, TypeScript or EJS. Put a .tsx, .jsx, .ejs or .md file in pb_pages
and it's a server-rendered page, with your records a function call away. Components import each other, and a page's
code and endpoints are .ts files beside them. Every part of a page can await: loaders, handlers, middleware, EJS tags and
async components, and sibling components render at the same time. esbuild is built into the binary: no Node, no
npm install, no build step.
// pb_pages/products/[id].tsx
import Price from './_private/Price'
export default async function Product({ ctx }: any) {
const product = await ctx.app.findRecordById.async('products', ctx.params.id)
return (
<article>
<h1>{product.getString('name')}</h1>
<Price cents={product.getInt('price')} />
</article>
)
}
Hundreds of apps in one process
PocketBase isolates. One pocketone process runs hundreds of PocketBase apps as
isolates, routed by hostname. Each is a complete app with its own data, hooks and dashboard. It starts on its first
request in tens of milliseconds, costs about 3 MB while it runs, and is sandboxed from the others: its own memory cap,
time limits, files, SQL and secrets. No container per app, no idle memory to pay for.
# pocketone.yaml: every hostname you ask for becomes its own app (dev mode)
multisite: {}
instances: { dev: true }
pocker: { root: ./pb_root }
Everything new at a glance
| What you get | |
|---|---|
| QuickJS hooks | async/await, ES module import, TypeScript, shared globals and hard limits, on the same JS API |
| Pages | Server-rendered pages in TSX, JSX, TypeScript, EJS or Markdown, with await everywhere and no build step |
| PocketBase isolates | Hundreds of apps in one process, each starting in tens of ms, about 3 MB each, sandboxed |
| Point-in-time restore | Every change recorded; restore to any second in the last 72 hours, and undo the restore |
| Deploy and live sync | pocketone deploy uploads only what changed; pocketone dev syncs a folder both ways and streams logs |
| Remote CLI | Admin commands against any app, from your terminal, a script or an agent |
| API tokens and OAuth | Named, scoped tokens you revoke one by one; your app is an OAuth server |
| MCP for AI agents | /mcp on every app, with OAuth sign-in and your own tools from pb_hooks |
| Bulk mail | Campaigns from the dashboard, with unsubscribes, suppression and pacing |
| Desktop apps | The same folder builds into native macOS, Windows and Linux apps with pocketone desktop build, each user's data on their machine (preview) |
| pocketone.yaml | One config file, with every extension's options and a .env for secrets |
Each page shows the feature in the dashboard, from your terminal and from an agent. For how a feature works or how to build on it, follow its How it works links to the extension pages.
Also built in
Smaller additions you'll notice without a page of their own:
- Mail you can see in dev mode: with
serve --devand no SMTP settings, mail is caught and shown athttp://127.0.0.1:8025instead of being sent (Mail Trap). - S3 redirects: files kept in S3 download straight from the bucket through short-lived signed links (S3 Redirect).
- Restylable sign-in pages: copy the OAuth sign-in screens into your app with
pocketone template ejectand edit them (Templates). - Settings and cache: one settings screen and one shared memory budget for every feature (Settings, Cache).
Coming from PocketBase? What stays the same, and how each feature compares.
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.