Getting Started
Get AYB running and make your first API call in under 5 minutes.
Install
curl (macOS / Linux)
bash
curl -fsSL https://allyourbase.io/install.sh | shHomebrew
bash
brew install allyourbase/tap/aybGo
bash
go install github.com/allyourbase/ayb/cmd/ayb@latestBinary download
Download the latest release from GitHub Releases for your OS and architecture.
Docker
bash
docker run -p 8090:8090 ghcr.io/allyourbasehq/allyourbaseStart the server
Embedded PostgreSQL (zero config)
bash
ayb startAYB will download and manage its own PostgreSQL instance automatically. No database setup needed.
External PostgreSQL
bash
ayb start --database-url postgresql://user:pass@localhost:5432/mydbThe API is now live at http://localhost:8090/api and the admin dashboard at http://localhost:8090/admin.
Create a table
Create a posts table in your PostgreSQL database:
sql
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
body TEXT,
published BOOLEAN DEFAULT false,
created_at TIMESTAMPTZ DEFAULT now()
);You can run this via psql, the admin dashboard SQL editor, or any PostgreSQL client.
Make your first API call
List records
bash
curl http://localhost:8090/api/collections/postsCreate a record
bash
curl -X POST http://localhost:8090/api/collections/posts \
-H "Content-Type: application/json" \
-d '{"title": "Hello World", "body": "My first post", "published": true}'Filter and sort
bash
curl "http://localhost:8090/api/collections/posts?filter=published=true&sort=-created_at"Get a single record
bash
curl http://localhost:8090/api/collections/posts/1Use the JavaScript SDK
bash
npm install @allyourbase/jsts
import { AYBClient } from "@allyourbase/js";
const ayb = new AYBClient("http://localhost:8090");
// Create
await ayb.records.create("posts", { title: "Hello", published: true });
// List
const { items } = await ayb.records.list("posts", {
filter: "published=true",
sort: "-created_at",
});
console.log(items);Next steps
- Configuration — Customize AYB with
ayb.toml - REST API Reference — Full endpoint documentation
- Authentication — Add user auth and RLS
- Quickstart: Todo App — Build a full app in 5 minutes