Happy Pods

podbay.dev — static hosting with a database in the trunk

Deploy a folder,
get a URL.

Point the pods CLI at a directory and it’s live at <name>.podbay.dev. Every site also gets its own JSON document store with a REST API — so your “static” site can have a guestbook, a poll, or a leaderboard without a backend.

  • HostingStatic files served at <name>.podbay.dev. All sites are public.
  • DatabaseA JSON store per site — a dedicated SQLite DB — with a REST API and a zero-dependency browser client at /pods.js.
  • IdentityPublishing requires GitHub sign-in. Every site is owned by the GitHub account that deployed it.
  • TokensOne JWT API token that auto-refreshes. No token juggling.

01 / launch sequence

Quick start

  1. Install the CLI

    curl -fsSL https://podbay.dev/install.sh | sh

    One line, Linux & macOS. Or go install github.com/slopus/pods/cmd/pods@latest, or grab a binary from Releases.

  2. Sign in with GitHub

    pods login

    Defaults to podbay.dev and opens GitHub device login — you get a short code, authorize it in the browser, done.

  3. Create and deploy

    pods init hello && pods deploy hello

    That’s it. Your site is live at https://hello.podbay.dev.

Then keep going

pods dev hello # preview locally — live files + in-memory store, no deploy
pods list # every pod in the bay
pods open hello # open it in your browser
PODS_ENDPOINT=https://hello.podbay.dev pods db guestbook create '{"name":"hi"}' # the JSON store is per-site — point at the site host
pods rm hello # gone

03 / flight manual

Docs

Auth model

Reading is public; publishing needs GitHub. Anyone can browse sites, query document stores, and watch event streams. To deploy or delete a site you sign in with GitHub: the CLI runs the GitHub device flow and stores a single JWT, which it refreshes automatically before expiry via POST /api/auth/refresh. Identity is provider-agnostic (user IDs are provider:subject) — GitHub is the only provider today.

Global API https://podbay.dev

Auth & identity
EndpointDoesAccess
GET /api/meCurrent user, or {authenticated:false} when anonymous (send a bearer JWT or session to identify)public
POST /api/auth/github/device/startStart device login → {device_code, user_code, verification_uri, expires_in, interval}public
POST /api/auth/github/device/pollBody {device_code}{token, user} — the token is your JWTpublic
POST /api/auth/refreshTrade a still-valid bearer JWT for a fresh {token, user}auth
GET /api/auth/login/githubBrowser OAuth loginpublic
Sites & events
EndpointDoesAccess
GET /healthzLiveness check → {"ok":true}public
GET /api/sitesList all sitespublic
PUT /api/sites/{name}Deploy a site — body is a tar.gz; name is DNS-label styleauth
DELETE /api/sites/{name}Delete your site (owner only)auth
GET /api/eventsSSE stream of all site/doc changespublic

Site API https://<site>.podbay.dev

Every deployed site serves this, same-origin, no setup:

Static files, documents, events
EndpointDoesAccess
GET /Your static filespublic
GET /api/dbList collectionspublic
GET /api/db/{coll}Query docs — ?where=f=v&sort=-f&limit=n&offset=npublic
POST /api/db/{coll}Create doc; server sets id/created_at/updated_atpublic
GET/PUT/PATCH/DELETE /api/db/{coll}/{id}Get / replace / merge / delete a docpublic
DELETE /api/db/{coll}Drop the collectionpublic
GET /api/eventsSSE stream scoped to this sitepublic
GET /pods.jsZero-dependency browser clientpublic

Browser client

Drop one script tag in any page on your pod — no build step, no npm:

<script src="/pods.js"></script>
<script type="module">
  const pods = Pods();
  const posts = pods.db.collection("posts");
  await posts.create({ title: "hi" });
  const { docs } = await posts.query({ sort: "-created_at", limit: 10 });
</script>

Deploy with curl

No CLI required — the deploy endpoint takes a plain tar.gz:

tar -czf - -C ./site . | curl -X PUT --data-binary @- \
  -H "Authorization: Bearer $TOKEN" \
  https://podbay.dev/api/sites/hello

For AI agents

The repo ships a Claude / agent skill at skills/pods/SKILL.md that teaches an AI agent to drive the pods CLI end to end — log in, deploy, and work the document store on your behalf.

Links