Skip to main content

Quickstart

Get EdgeBase running in under 5 minutes.

1. Create and Start

npx edgebase init my-app

That's it — one command. init scaffolds the project, starts the dev server, and opens the Admin Dashboard in your browser automatically. If you only want the files without starting a persistent session, use npx edgebase init my-app --no-dev.

The scaffolded project structure:

my-app/
├── edgebase.config.ts ← DB blocks, access rules, auth settings
├── config/
│ └── rate-limits.ts
├── functions/ ← App functions (DB/HTTP/schedule triggers)
│ └── onPostCreated.ts
├── .env.development ← Local dev secrets (JWT keys auto-generated, git-ignored)
├── .env.development.example ← Template for dev env vars (committed)
├── .env.release.example ← Template for production env vars (committed)
├── .gitignore
├── package.json
└── wrangler.toml

The Admin Dashboard opens at http://localhost:8787/admin.

Restart Later

To restart the dev server after closing it:

cd my-app
npx edgebase dev

The dashboard opens automatically. Use --no-open to disable: npx edgebase dev --no-open

2. Install an SDK

npm install @edgebase/web

3. Connect and Use

Localhost on mobile

http://localhost:8787 works from the browser on your dev machine. For mobile runtimes, use a device-reachable address instead:

  • Android emulator: http://10.0.2.2:8787
  • iOS simulator: http://127.0.0.1:8787
  • Physical device: http://<your-lan-ip>:8787
import { createClient } from '@edgebase/web';

const client = createClient('http://localhost:8787');

// Sign up
await client.auth.signUp({ email: 'user@example.com', password: 'password123' });

// Create a record
await client.db('shared').table('posts').insert({
title: 'Hello EdgeBase!',
content: 'My first post.',
});

// Query records
const posts = await client.db('shared').table('posts')
.where('title', 'contains', 'Hello')
.orderBy('createdAt', 'desc')
.limit(10)
.getList();
Thinking About Scale?

The quickstart uses a shared database — one instance for all users. When you're ready to scale, EdgeBase's DB block pattern lets each user or workspace get their own isolated instance. The architecture change is a config switch, not a rewrite:

// Before: shared database (great for starting out)
const posts = await client.db('shared').table('posts').getList();

// After: per-user database (each user = independent instance)
const notes = await client.db('user', userId).table('notes').getList();

10 users and 10 million users run on the same architecture — the only difference is the number of instances. See Isolation & Multi-tenancy for details.

4. Deploy

# Cloudflare Edge (global serverless)
npx edgebase deploy

# Docker self-hosting
npx edgebase docker build
npx edgebase docker run

# Direct run (any Node.js server)
npx edgebase dev

Next Steps