Documentation

Vaultbrix Documentation

Everything you need to build with Swiss-hosted, AI-native databases.

Quick Start

Getting Started
Create your first project and connect to your database

1Create an Account

Sign up at app.vaultbrix.com using email/password, Magic Link, or GitHub OAuth.

2Create Your First Project

Click "New Project" and select your region. Currently available:

  • CH-GVA-2 - Geneva, Switzerland (GDPR + LPD compliant)

3Get Your Connection Details

From your project dashboard, copy your connection details:

# Project URL
https://YOUR_PROJECT_REF.vaultbrix.com

# API Keys (Settings > API)
ANON_KEY=<jwt-placeholder>
SERVICE_ROLE_KEY=<jwt-placeholder>

# Database Connection
postgresql://tenant_<slug>:YOUR_PASSWORD@db.vaultbrix.com:5433/postgres?sslmode=require&schema=tenant_<slug>

4Connect with Supabase Client

Vaultbrix is Supabase-compatible. Use the official client libraries:

npm install @supabase/supabase-js

// Initialize client
import { createClient } from '@supabase/supabase-js'

const supabase = createClient(
  'https://YOUR_PROJECT_REF.vaultbrix.com',
  'YOUR_ANON_KEY'
)

// Query your database
const { data, error } = await supabase
  .from('users')
  .select('*')
API Reference
REST, GraphQL, and Realtime endpoints

REST API (PostgREST)

Auto-generated RESTful API from your PostgreSQL schema:

# Base URL
https://YOUR_PROJECT_REF.vaultbrix.com/rest/v1

# Examples
GET    /rest/v1/users              # List all users
GET    /rest/v1/users?id=eq.1      # Get user by ID
POST   /rest/v1/users              # Create user
PATCH  /rest/v1/users?id=eq.1      # Update user
DELETE /rest/v1/users?id=eq.1      # Delete user

# Headers required
apikey: <anon-key>
Authorization: Bearer YOUR_JWT_TOKEN

GraphQL API

Full GraphQL endpoint powered by pg_graphql:

# Endpoint
POST https://YOUR_PROJECT_REF.vaultbrix.com/graphql/v1

# Example query
query {
  usersCollection {
    edges {
      node {
        id
        email
        created_at
      }
    }
  }
}

Realtime API

WebSocket subscriptions for live data:

// Subscribe to changes
const channel = supabase
  .channel('db-changes')
  .on(
    'postgres_changes',
    { event: '*', schema: 'public', table: 'messages' },
    (payload) => console.log('Change:', payload)
  )
  .subscribe()

// Presence (who's online)
const presenceChannel = supabase.channel('room-1')
presenceChannel.on('presence', { event: 'sync' }, () => {
  console.log('Online:', presenceChannel.presenceState())
})

Authentication API

GoTrue-based authentication endpoints:

# Base URL
https://YOUR_PROJECT_REF.vaultbrix.com/auth/v1

# Endpoints
POST /signup         # Register new user
POST /token          # Sign in (returns JWT)
POST /logout         # Sign out
POST /recover        # Password recovery
POST /magiclink      # Magic link login
GET  /user           # Get current user
PUT  /user           # Update user
AI Context Engine (Snipara)
Tenant-scoped schema, memory, and query context for AI tools
Unique to Vaultbrix

What is the AI Context Engine?

Every Vaultbrix tenant exposes a context endpoint that lets AI tools inspect schema, query data, and persist conventions without manually stitching prompts together.

  • Token-efficient context - structured schema summaries instead of raw dumps
  • Anti-hallucination - source-tagged facts, no made-up data
  • Persistent memory - conventions and decisions stay attached to the tenant

MCP Setup for Claude Code

Add to ~/.claude/mcp.json:

{
  "mcpServers": {
    "vaultbrix": {
      "transport": "http",
      "url": "https://api.vaultbrix.com/mcp/YOUR_TENANT_SLUG",
      "headers": {
        "X-API-Key": "YOUR_VAULTBRIX_API_KEY"
      }
    }
  }
}

MCP Setup for Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "vaultbrix": {
      "transport": "http",
      "url": "https://api.vaultbrix.com/mcp/YOUR_TENANT_SLUG",
      "headers": {
        "X-API-Key": "YOUR_VAULTBRIX_API_KEY"
      }
    }
  }
}

Available MCP Tools

get_schema_context

Compressed schema context for the tenant

query_table

Read rows with safe filters

add_memory

Store conventions, decisions, and facts

run_sql

Tenant-scoped SELECT and DML with DDL approval

The full tenant MCP inventory also includes storage, backup, and migration tools. See the MCP docs for the management surface.

Features

Database

PostgreSQL 17 with enterprise extensions, hosted in Switzerland.

pgvector - Vector embeddings for AI/ML applications
Row Level Security - Fine-grained access control at row level
SQL Editor - Browser-based query interface
Schema Isolation - Multi-tenant with schema-per-tenant
-- Enable pgvector
CREATE EXTENSION IF NOT EXISTS vector;

-- Create table with embeddings
CREATE TABLE documents (
  id SERIAL PRIMARY KEY,
  content TEXT,
  embedding vector(1536)
);
Database Access Guide
Authentication

GoTrue-based auth with multiple providers and enterprise SSO.

Email/Password - Traditional signup with confirmation
Magic Links - Passwordless email login
OAuth Providers - GitHub, Google, GitLab, and more
JWT Sessions - Secure token-based auth
// Sign up
const { data, error } = await supabase.auth.signUp({
  email: 'user@example.com',
  password: 'secure-password'
})

// Sign in with OAuth
await supabase.auth.signInWithOAuth({
  provider: 'github'
})
Storage

S3-compatible object storage with access policies.

Buckets - Organize files into containers
Access Policies - RLS-based file permissions
CDN Integration - Fast global delivery
Swiss Storage - Infomaniak Swiss Cloud
// Upload file
const { data, error } = await supabase.storage
  .from('avatars')
  .upload('user-123.png', file)

// Get public URL
const { data: { publicUrl } } = supabase.storage
  .from('avatars')
  .getPublicUrl('user-123.png')
Edge Functions

Serverless TypeScript/Deno functions running in Switzerland.

Deno Runtime - TypeScript native, secure by default
Sub-100ms Cold Start - Fast function invocation
Version History - Rollback to previous versions
Environment Variables - Secure secrets management
// functions/hello/index.ts
import "jsr:@supabase/functions-js/edge-runtime.d.ts"

Deno.serve(async (req) => {
  const { name } = await req.json()
  return new Response(
    JSON.stringify({ message: `Hello ${name}!` }),
    { headers: { 'Content-Type': 'application/json' } }
  )
})
Realtime

WebSocket-based real-time subscriptions and presence.

Database Changes - Subscribe to INSERT/UPDATE/DELETE
Presence - Track online users in real-time
Broadcast - Send messages to all subscribers
Filtered Subscriptions - Only receive relevant changes
// Subscribe to new messages
supabase
  .channel('messages')
  .on('postgres_changes', {
    event: 'INSERT',
    schema: 'public',
    table: 'messages'
  }, (payload) => {
    console.log('New message:', payload.new)
  })
  .subscribe()
Database Branching

Git-like branching for your database schema and data.

Instant Branches - Create isolated dev environments
Schema Diff - Visualize changes between branches
Safe Merge - Conflict detection before merging
Reset & Rollback - Revert to any previous state
# Create a branch
vaultbrix branch create feature-auth

# Make changes to your branch
# ... run migrations, test data

# View diff
vaultbrix branch diff feature-auth

# Merge to production
vaultbrix branch merge feature-auth