Skip to content

Repository files navigation

run402 examples

run402: Postgres, storage, auth, functions and deploys for AI agents. Learn more at run402.com.

Nine runnable applications, each one live, each one deployable as your own independent copy from a single command. Every example is a real app rather than a snippet: it has a schema, row policies, a serverless function, a front end, and a README that contains the whole thing.

Deploy any example as your own

From inside an example folder:

npx run402 up --yes --verify

That provisions a project on the free Prototype tier, applies the schema, deploys the function and the site, and prints your live URL. Change subdomains.set in the example's run402.json first, because the name in the file is the live deployment listed below and it is already taken.

Every example fits inside the free Prototype tier on a project of its own, so reproducing one costs nothing on testnet. No card, no funded wallet.

The examples

Example What it shows Live
shared-todo The smallest complete app: one table, public reading, sign in to write todo.run402.com
micro-blog Auth, image upload through a function, and blob storage microblog.run402.com
flash-cards Per-user data with row ownership, and a spaced repetition scheduler cards.run402.com
secret-santa Server-side logic a client cannot be trusted with, under real row policies santa.run402.com
trivia-night Multiplayer with a shared countdown, polled from the database trivia.run402.com
paste-locker Functions alone, with no REST surface at all paste.run402.com
astro-blog A real framework, with posts read from Postgres at build time blog.run402.com
agent-provisions-itself A script that goes from nothing to a live URL with no human in the loop selfserve.run402.com
x402-paywall-api An endpoint that answers 402, takes payment, then serves the content paywall.run402.com

One thing every example has in common

No project key is ever in the browser. Front ends fetch same-origin paths like /api/todos, and a routed serverless function does the database work with credentials the platform injects at runtime. View source on any of the nine and you will find no key of any kind, and no request to any host other than the site itself.

Writes always require an authenticated user. Reading is usually open; writing never is.

How an example is laid out

Each folder is self-contained. A reader with the folder and the published run402 CLI has everything.

File Purpose
README.md The whole example: every file reproduced verbatim, with prose explaining each one
run402.json The deploy manifest: migrations, table exposure, functions, routes, site and subdomain
schema.sql The schema, applied as a migration
seed.sql Starting data, where the example has any
index.html The front end
functions/ Serverless function sources

Licence

MIT. See LICENSE.

About

Runnable example apps on run402: Postgres, storage, auth, functions and deploys for AI agents. Every example has a live demo and deploys your own copy in one command.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages