Docs / Quickstart

On this page · 5 sections
Contents

PLANNED

Docker imageAPI referenceMigrating from Supabase

Docs / GET STARTED / Quickstart

Quickstart

Build the binary, start it and confirm it answers. No Supabase account needed.

docs/quickstart.md · Built from commit a1a6d87 · 2026-10-09 · Edit on GitHub ↗

Build from source

You need Rust 1.89 or newer. PostgreSQL 15+ is the intended external database; the 501 gateway starts without it. The judge also needs Docker.

SHELL
git clone --recurse-submodules https://github.com/Zouhairmaj/megabase.git
cd megabase
cargo run --locked -p megabase

Or cargo build --release --locked -p megabase and run ./target/release/megabase. Environment variables are in Configuration.

Check it runs

Keep the binary running, then in another terminal:

SHELL
curl -s localhost:8000/_megabase/health
# {"name":"megabase","version":"0.0.0","status":"ok"}
curl -sS -w '\nHTTP %{http_code}\n' localhost:8000/rest/v1/todos
# {"code":"MEGABASE_NOT_IMPLEMENTED",...}
# HTTP 501

A 501 on /rest/v1/todos means the gateway is up and that unit is not implemented yet.

Container image

SHELL
docker build -t megabase .
docker run --rm -p 8000:8000 megabase

Builder and runtime base images are pinned by digest; see Install.

Use with supabase-js

Point supabase-js at your local base URL. Every request to an unimplemented unit returns 501 today; Level 1 targets REST and Auth email/password first (see Roadmap).

JAVASCRIPT
import { createClient } from '@supabase/supabase-js'
const supabase = createClient('http://localhost:8000', ANON_KEY)
const { data, error } = await supabase.from('todos').select()
// today: error.code === 'MEGABASE_NOT_IMPLEMENTED'

Run the judge

The judge starts the official Supabase reference stack with Docker Compose and compares it with Megabase. From the repository root:

SHELL
just judge-up
just judge
just judge-down

Recipes and ports are in judge/README.md.

Wrong or unfinished? Open an issue or edit docs/quickstart.md on GitHub.