▄▄████████▄▄ 
 ▄██████████████▄ 
  ████████████████
  ████  ████  ████
 ████████████████ 
 ██████▀  ▀██████ 
 ██████    ██████ 
██████▄  ▄██████  
████████████████  
████████████████  
 ██▄ ▀█▄▀ █▀ ▄█▄█ 
 ▀   █   █   ▀ ▀ 

Focus on Product.
We Handle Sync.

$ npx @spooky-sync/cli@canary create
queries.ts
const result = useQuery(db, () =>
  db.query("thread")
    .related("author")
    .related("comments")
    .orderBy("created_at", "desc")
    .limit(10)
    .build()
);

Local first. Your app reads and writes to a local database. Users get instant responses, even without a connection. When they're back online, Sp00ky resolves changes and syncs state across every device no loading spinners, no conflict modals, no extra code on your end.

Fig 0.1

Rust Core

Memory-safe. No runtime overhead. Just raw performance.

Fig 0.2

Instant UI

WASM powered optimistic updates. Every interaction feels immediate.

Fig 0.3

Job Scheduler

Retries, backoff, and outbox — your background work just runs.

Fig 0.4

Fast Realtime

Sub-50ms propagation. Changes arrive before you notice the delay.

How It Works

It feels like magic

Direct state synchronization powered by SurrealDB

SurrealDB native sync engine

Sp00ky bypasses traditional REST APIs in favor of direct state synchronization on top of SurrealDB. Built for modern real-time applications that need instant updates across all clients.

Authentication-agnostic security

Integrate with any identity provider while maintaining fine-grained access control. SurrealDB's flexible security model adapts to your authentication strategy.

Tasks
Refactor the refactoring
just now
Mass delete everything
2m ago
Fix bug that fixes itself
5m ago
Deploy to production on Friday
12m ago
synced · 3 tasksconnected
// SYSTEM_ARCHITECTURE_LIVE_VIEW
[ *WRITE* ] [ APP B ]
+--------------+ +--------------+
| LOCAL DB A | | LOCAL DB B |
+--------------+ +--------------+
+--------------------------------------------+
| REMOTE SURREALDB |
| |
| +----------+ +--------------+ |
| | EVENTS | | QUERIES | |
| +----------+ +--------------+ |
| |
+------------------------------------------+
+--------------------------------------------+
| SP00KY STREAM PROCESSOR |
+--------------------------------------------+

Horizontally Scalable. The Scheduler distributes queries across SSP instances with automatic load balancing and zero-downtime deployments.

Developer Tools

Exceptional DX

From schema-first codegen to fully reactive framework-native queries — Sp00ky gives you type safety across your entire stack, built by developers for developers.

FIG. 3.1
ThreadList.tsx
import { useQuery } from "sp00ky/solid"
import { db } from "./client"
export default function ThreadList() {
const threads = useQuery(
db.query("thread")
.related("comments")
.orderBy("created_at", "desc")
.build()
)
schema.generated.ts
// @generated by sp00ky-cli
export type Thread = {
id: string
title: string
body: string
author: Record<User>
comments: Comment[]
created_at: Date
}
schema.surql
DEFINE TABLE thread SCHEMAFULL;
DEFINE FIELD title ON thread TYPE string;
DEFINE FIELD body ON thread TYPE string;
DEFINE FIELD author ON thread TYPE record<user>;
DEFINE FIELD created_at ON thread TYPE datetime;
DEFINE TABLE user SCHEMAFULL;
DEFINE FIELD username ON user TYPE string;
DEFINE FIELD email ON user TYPE string;

Schema-First Intelligence

Define your schema once — get type-safe clients, context-aware autocomplete, and real-time validation across your entire stack.

FIG. 3.2
localhost:5173

My Sp00ky App

Syncing active...

Events History

info16:02:01.152
{
  "msg": "Sp00ky Sidecar initialized"
}
info16:02:01.340
{
  "msg": "Loading dbsp_worker.wasm... (2.1MB)"
}
warn16:02:02.005
{
  "msg": "State rehydration took 115ms",
  "hints": [
    "optimize-query"
  ]
}
info16:02:05.112
{
  "msg": "Registered query \"thread_list_view\""
}

Active Queries

#0x8f2a9cactive
Updates: 12 | Size: 1024B
SELECT * FROM thread ORDER BY ...
#0x99b1d4idle
Updates: 5 | Size: 256B
SELECT count() FROM notificati...

Query #0x8f2a9c

active
Created
4:02:05 PM
Update Count
12
Query
SELECT * FROM thread ORDER BY created_at DESC
Variables
{
  "limit": 10
}

Tables

user12
thread45
comment182
idtitleauthorcreated
thread:8x92m"Why Rust is the future"user:khadim2024-05-01
thread:p09s1"Local-first architecture"user:sarah2024-05-02
thread:7d66s"Sp00ky vs ElectricSQL"user:alex2024-05-03

Authentication

User authenticated: user:khadim

Effortlessly Transparent

A complete suite of developer tools embedded directly in your browser. Inspect state, monitor queries, and track events.

Inspect queries, track state, and debug your app in real time, right from your browser.

Available on the Chrome Web Store

Ready to build something amazing?

Start building local-first, offline-ready applications today. Dive into the documentation to learn more about the architecture and implementation details.

Get Started