FFDB Documentation

FFDB gives you a typed database client, built-in auth, and optional offline sync across web, mobile, desktop, and Node.js apps. This documentation focuses on using the CLI and SDKs in real applications.

Use search in the header, or press Cmd/Ctrl + K, to jump directly to any page.

What you need

Before you start, make sure you have:

  1. Node.js and npm installed.
  2. An FFDB app created in the dashboard.
  3. Your FFDB app URL and admin token for local setup tasks like type generation.

Choose your path

  • Name
    Fastest start: scaffold with CLI
    Description

    Run ffdb-cli init to generate a starter app, then ffdb-cli generate to produce your typed schema file.

  • Name
    Manual start: add SDK to existing app
    Description

    Install ffdb-client, configure apiUrl, sign in users, and query with typed helpers.

  • Name
    Framework-specific setup
    Description

    Use the React, Next.js, Expo, Node.js, and Electron guides when you need runtime-specific setup patterns.

Suggested reading order

  1. Quickstart
  2. Create an app
  3. Generate types
  4. Client

Guides

Quickstart

Connect your app, sign in a user, and run your first query in minutes.

Read more

Authentication

Understand the two-tier auth model: admin tokens and user sessions.

Read more

Querying data

Use the type-safe query builder and raw SQL with full TypeScript support.

Read more

Offline & sync

How local-first reads, mutation queues, and background sync work.

Read more

Resources

Client

Create and manage the FFDB client across environments. Configure connections, lifecycle, and cleanup.

Database

Query, insert, update, and delete data using the type-safe query builder or raw SQL.

Auth

User authentication, sessions, admin tokens, and automatic API key rotation.

Sync

Offline-first data flow with local cache, mutation queue, and background synchronization.

Configuration

Environment variables, storage adapters, network handling, and runtime options.

Type generation

Generate and maintain TypeScript types from your database schema for full type safety.

Was this page helpful?