Aurabase Logo
aurabasedocs
docs›Foundations›Quick start

Quick start

From zero to a queryable API in five minutes. Dedicated Postgres database, realtime, TypeScript type generation included — no credit card required.

5 min read·Level beginner·Revised on Apr 15, 2026
This English text was generated automatically from the French original and has not been reviewed yet.

Quickstart 60 Secondes

From terminal to your first request in 3 simple steps.

TTFV < 60s
1. Installation
pnpm add @aurabase/aurabase-js
2. Initialisation
import { createClient } from '@aurabase/aurabase-js'

const aura = createClient(
  process.env.AURA_URL ?? 'http://localhost:8080',
  process.env.AURA_ANON_KEY ?? 'votre_cle_anon'
)
3. DB Query
// Lecture instantanée avec filtres et relations
const { data, error } = await aura
  .from('posts')
  .select('id, title, author:authors(name)')
  .limit(10)

console.log('Données :', data)
#
Prerequisite

Prerequisites

We assume that Node.js ≥ 20 is installed and a POSIX terminal is within range. No local database is required: Aurabase provisions a dedicated Postgres database for each project.

Info

Are you coming from Supabase or Firebase? Most concepts are transposable. See the migration guide.

#
Official SDK

Installing the SDK

The official SDK exposes a typed client for CRUD, auth, realtime and storage. It works the same way in Next.js, React, Node, Bun or Deno.

terminalbash
# Recommended
pnpm add @aurabase/aurabase-js
Astuce

The SDK directly includes @aurabase/aurabase-js/ssr (createServerClient) export for Next.js (App Router, Server Actions, Middleware), Remix, Nuxt and SvelteKit with automatic session cookie management and anti-truncation chunking.

#
Provisioning

Create a project

From the Studio, each project receives four isolated sub-diagrams. You get a PROJECT_URL and a ANON_KEY that can be published on the client side, plus a SERVICE_ROLE_KEY to keep strictly on the server side.

SchemaAccessContains

project_{uuid}userYour business tables

project_{uuid}_authsystemusers, sessions, oauth_accounts, mfa

project_{uuid}_storagesystembuckets, objects, rls_policies

project_{uuid}_platformsystemfunctions, jobs, cron_jobs, api_keys

Service role key

Never include service_role_key in a client bundle. It bypasses all RLS policies. Reserve it for server calls (route handlers, server actions, jobs).

#
First code

First call

Create a reusable Aurabase client by reading keys from environment variables, then query your first table.

src/lib/aurabase.tstypescript
import { createClient } from '@aurabase/aurabase-js'
import type { Database } from './aurabase.types'

export const aura = createClient<Database>(
  process.env.AURA_URL!,
  process.env.AURA_PROJECT_ID!,
  process.env.AURA_ANON_KEY!,
)

Then, in a route handler or a server component:

app/api/sensors/route.tstypescript
import { aura } from '@/lib/aurabase'

export async function GET() {
  const { data, error } = await aura
    .from('sensors')
    .select('id, value, captured_at')
    .order('captured_at', { ascending: false })
    .limit(10)

  if (error) throw error
  return Response.json(data)
}
Astuce

The Database types are regenerated on each migration via aura gen types. Joins, filters and returns are inferred automatically.

#
Live by default

Connect realtime

Three auto-negotiated transports: WebSocket, SSE, NATS. Customer chooses the best one based on the network — no configuration necessary.

components/LiveSensors.tsxtypescript
'use client'
import { aura } from '@/lib/aurabase'
import { useEffect } from 'react'

export function LiveSensors() {
  useEffect(() => {
    const channel = aura.channel('sensors:live')
      .on('INSERT', ({ new: row }) => console.log(row))
      .subscribe()

    return () => channel.unsubscribe()
  }, [])
}
Astuce

Subscriptions are multiplexed over a single TCP connection. Open as many as you need — zero additional network costs.

CONCEPT

Architecture

The 8 services and their partitioning by project.

SERVICE

Database

Schemas, migrations, TypeScript codegen, RLS.

SERVICE

Authentication

OAuth 15+, MFA, granular RBAC.

SERVICE

Edge Functions

WASM multi-runtime, cron, DLQ, AI Gateway.

Last updated · Apr 15, 2026