Github|...

Introduction

You write your app. Sp00ky handles the rest.

Real-time sync. Offline support. End-to-end type safety. You don’t configure any of it. It just works.

Threads.tsx
TypeScript
import { useQuery } from '@spooky-sync/client-solid';
import { For } from 'solid-js';
import { db } from './db';

function Threads() {
  const threads = useQuery(db, () =>
    db.query('thread')
      .related('author')
      .orderBy('created_at', 'desc')
      .limit(20)
      .build()
  );

  return (
    <For each={threads.data()}>
      {(thread) => (
        <div>
          <h2>{thread.title}</h2>
          <span>{thread.author.username}</span>
        </div>
      )}
    </For>
  );
}

What you didn’t write

No fetch calls. No cache invalidation. No WebSocket setup. No offline logic. No manual type definitions.

That component is live. Type-safe. Works offline. Syncs across devices. You didn’t think about any of it.

Schema is your source of truth

Define your schema once. Types flow everywhere.

schema.surql
sql
DEFINE TABLE thread SCHEMAFULL;
DEFINE FIELD title ON TABLE thread TYPE string;
DEFINE FIELD author ON TABLE thread TYPE record<user>;
DEFINE FIELD created_at ON TABLE thread TYPE datetime VALUE time::now();
schema.gen.ts
TypeScript
type Thread = {
  id: RecordId<"thread">;
  title: string;
  author: RecordId<"user">;
  created_at: Date;
};

Run spky generate and your types are always in sync with your database. No drift. No guessing.

Queries are live

When data changes — from another user, another device, or another tab — your UI re-renders. Automatically.

TypeScript
await db.create('thread', {
  title: 'Hello world',
  author: currentUser,
});
// Every useQuery('thread') updates. Everywhere. Instantly.

No polling. No refetch logic. No stale data.

Offline by default

Your app works without a connection. Changes are stored locally and sync when the network comes back. You don’t configure this. It just works.

Get started

Bash
pnpm add @spooky-sync/core @spooky-sync/client-solid
Note

Sp00ky supports SolidJS, Flutter, and Vanilla JS/TS. Pick the guide for your stack.