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.
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
- JavaScript
- Dart/Flutter
- React Native
- Swift
- Kotlin
- Java
- C#
- C++
npm install @edgebase/web
dart pub add edgebase_flutter
npm install @edgebase/react-native
// Package.swift
dependencies: [
.package(url: "https://github.com/melodysdreamj/edgebase-swift", from: "1.0.0")
]
// build.gradle.kts
dependencies {
implementation("dev.edgebase:edgebase-client-kotlin:0.1.0")
}
// build.gradle
dependencies {
implementation 'dev.edgebase:edgebase-android-java:0.1.0'
}
Copy packages/sdk/csharp/src/ to Assets/Plugins/EdgeBase/ in your Unity project.
# Core (CMake)
cd packages/sdk/cpp/core
cmake -B build && cmake --build build
3. Connect and Use
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
- JavaScript
- Dart/Flutter
- React Native
- Swift
- Kotlin
- Java
- C#
- C++
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();
import 'package:edgebase_flutter/edgebase.dart';
final client = ClientEdgeBase('http://localhost:8787');
// Sign up
await client.auth.signUp(SignUpOptions(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
final posts = await client.db('shared').table('posts')
.where('title', 'contains', 'Hello')
.orderBy('createdAt', desc: true)
.limit(10)
.getList();
import { createClient } from '@edgebase/react-native';
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();
import EdgeBase
let client = EdgeBaseClient("http://localhost:8787")
// Sign up
try await client.auth.signUp(email: "user@example.com", password: "password123")
// Create a record
try await client.db("shared").table("posts").insert([
"title": "Hello EdgeBase!",
"content": "My first post."
])
// Query records
let posts = try await client.db("shared").table("posts")
.where("title", .contains, "Hello")
.orderBy("createdAt", .desc)
.limit(10)
.getList()
import dev.edgebase.sdk.client.ClientEdgeBase
val client = ClientEdgeBase("http://localhost:8787")
// Sign up
client.auth.signUp(email = "user@example.com", password = "password123")
// Create a record
client.db("shared").table("posts").insert(mapOf(
"title" to "Hello EdgeBase!",
"content" to "My first post."
))
// Query records
val posts = client.db("shared").table("posts")
.where("title", "contains", "Hello")
.orderBy("createdAt", "desc")
.limit(10)
.getList()
import dev.edgebase.sdk.client.*;
ClientEdgeBase client = EdgeBase.client("http://localhost:8787");
// Sign up
client.auth().signUp("user@example.com", "password123");
// Create a record
client.db("shared").table("posts").insert(Map.of(
"title", "Hello EdgeBase!",
"content", "My first post."
));
// Query records
ListResult posts = client.db("shared").table("posts")
.where("title", "contains", "Hello")
.orderBy("createdAt", "desc")
.limit(10)
.getList();
using EdgeBase;
var client = new EdgeBase("http://localhost:8787");
// Sign up
await client.Auth.SignUpAsync("user@example.com", "password123");
// Create a record
var post = await client.Db("shared").Table("posts").InsertAsync(new() {
["title"] = "Hello EdgeBase!",
["content"] = "My first post.",
});
// Query records
var posts = await client.Db("shared").Table("posts")
.Where("title", "contains", "Hello")
.OrderBy("createdAt", "desc")
.Limit(10)
.GetListAsync();
#include <edgebase/edgebase.h>
eb::EdgeBase client("http://localhost:8787");
// Sign up
auto result = client.auth().signUp("user@example.com", "password123");
// Create a record
auto post = client.db("shared").table("posts").insert(R"({
"title": "Hello EdgeBase!",
"content": "My first post."
})");
// Query records
auto posts = client.db("shared").table("posts")
.where("title", "contains", "Hello")
.orderBy("createdAt", "desc")
.limit(10)
.getList();
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
- Configuration → — Customize your
edgebase.config.ts - Database → — Learn CRUD operations
- Authentication → — Set up user auth