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
-
Install the CLI
curl -fsSL https://podbay.dev/install.sh | shOne line, Linux & macOS. Or
go install github.com/slopus/pods/cmd/pods@latest, or grab a binary from Releases. -
Sign in with GitHub
pods loginDefaults to podbay.dev and opens GitHub device login — you get a short code, authorize it in the browser, done.
-
Create and deploy
pods init hello && pods deploy helloThat’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
| Endpoint | Does | Access |
|---|---|---|
GET /api/me | Current user, or {authenticated:false} when anonymous (send a bearer JWT or session to identify) | public |
POST /api/auth/github/device/start | Start device login → {device_code, user_code, verification_uri, expires_in, interval} | public |
POST /api/auth/github/device/poll | Body {device_code} → {token, user} — the token is your JWT | public |
POST /api/auth/refresh | Trade a still-valid bearer JWT for a fresh {token, user} | auth |
GET /api/auth/login/github | Browser OAuth login | public |
| Endpoint | Does | Access |
|---|---|---|
GET /healthz | Liveness check → {"ok":true} | public |
GET /api/sites | List all sites | public |
PUT /api/sites/{name} | Deploy a site — body is a tar.gz; name is DNS-label style | auth |
DELETE /api/sites/{name} | Delete your site (owner only) | auth |
GET /api/events | SSE stream of all site/doc changes | public |
Site API https://<site>.podbay.dev
Every deployed site serves this, same-origin, no setup:
| Endpoint | Does | Access |
|---|---|---|
GET / | Your static files | public |
GET /api/db | List collections | public |
GET /api/db/{coll} | Query docs — ?where=f=v&sort=-f&limit=n&offset=n | public |
POST /api/db/{coll} | Create doc; server sets id/created_at/updated_at | public |
GET/PUT/PATCH/DELETE /api/db/{coll}/{id} | Get / replace / merge / delete a doc | public |
DELETE /api/db/{coll} | Drop the collection | public |
GET /api/events | SSE stream scoped to this site | public |
GET /pods.js | Zero-dependency browser client | public |
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
- Source on GitHub — slopus/pods
- Issues & ideas — bugs, requests, questions
- Shopify’s Quick — the engineering write-up that inspired this