Skip to content

👾 AllyourbasePostgreSQL backend in one binary

Auto-generated REST API. Auth. Realtime. File storage. Admin dashboard. Open source.

Install

curl (macOS / Linux)

bash
curl -fsSL https://allyourbase.io/install.sh | sh

Homebrew

bash
brew install gridlhq/tap/ayb

Docker

bash
docker run -p 8090:8090 ghcr.io/gridlhq/allyourbase

Go

bash
go install github.com/allyourbase/ayb/cmd/ayb@latest

Quickstart

1. Start AYB

bash
ayb start

AYB starts with managed PostgreSQL. No database setup needed.

2. Create a table

Use the admin dashboard at http://localhost:8090/admin, psql, or any PostgreSQL client:

sql
CREATE TABLE posts (
  id SERIAL PRIMARY KEY,
  title TEXT NOT NULL,
  body TEXT,
  published BOOLEAN DEFAULT false,
  created_at TIMESTAMPTZ DEFAULT now()
);

3. Use the API

bash
# Create a record
curl -X POST http://localhost:8090/api/collections/posts \
  -H "Content-Type: application/json" \
  -d '{"title": "Hello World", "published": true}'

# List records
curl "http://localhost:8090/api/collections/posts?sort=-created_at&perPage=10"
json
{
  "items": [
    { "id": 1, "title": "Hello World", "published": true, "created_at": "2026-02-17T12:00:00Z" }
  ],
  "page": 1, "perPage": 10, "totalItems": 1, "totalPages": 1
}

JavaScript SDK

bash
npm install @allyourbase/js
ts
import { AYBClient } from "@allyourbase/js";

const ayb = new AYBClient("http://localhost:8090");

// Auth
await ayb.auth.register("[email protected]", "password");

// Create
await ayb.records.create("posts", {
  title: "Hello World",
  published: true,
});

// List with filtering and sorting
const { items } = await ayb.records.list("posts", {
  filter: "title='Hello World'",
  sort: "-created_at",
});

// Realtime
ayb.realtime.subscribe(["posts"], (event) => {
  console.log(event.action, event.record);
});

Why PostgreSQL?

Most single-binary backends use SQLite. AYB uses PostgreSQL instead, giving you:

  • Row-Level Security — access control rules written in SQL, enforced by the database itself
  • Horizontal scaling — connect to any PostgreSQL instance, including managed services (RDS, Cloud SQL, Neon)
  • Concurrent writes — no single-writer bottleneck
  • The full PostgreSQL ecosystem — extensions, tooling, monitoring, backups, replication

AYB keeps the single-binary simplicity. For development, ayb start runs its own managed PostgreSQL with zero config. For production, point it at any PostgreSQL instance.

PocketBaseSupabase (self-hosted)Allyourbase
DatabaseSQLitePostgreSQLPostgreSQL
DeploymentSingle binary10+ Docker containersSingle binary
ConfigurationOne fileDozens of env varsOne file
Full-text searchNoYesYes
Row-Level SecurityNoYesYes
Docker requiredNoYesNo

Full comparison →

License

Allyourbase is open source under the MIT License.

Released under the MIT License.