The open API
No accounts, no sessions, no reset emails. Requests come in, rows go out, and the only thing you have to be careful about is how many of them one caller can make.
This is the smallest complete Atlas server, and more services should stop here than do. Add identity the day a caller needs to be told apart from another caller — not before.
What you are carrying
@atlas/configTyped environment variables, read once at boot.
@atlas/dbSchemas, a query builder, Postgres or SQLite.
@atlas/migrateTimestamped SQL, generated from the schema you already wrote.
@atlas/serverPipe-based routes over Bun.serve.
@atlas/securityRate limiting, because public means public.
Start it
atlas init -n myapi --template api
What it looks like
import { connect, from } from "@atlas/db"
import { migrate } from "@atlas/migrate"
import { serve, get, json } from "@atlas/server"
import { posts } from "./schema"
const db = connect({ driver: "sqlite", path: "./app.db" })
await migrate.up(db, "./migrations")
serve({
port: 3000,
routes: [
get("/posts", async (c) =>
json(c, 200, await db.all(from(posts).select("id", "title").limit(50)))),
],
})