Skip to content

docs: Document database: sync and the databaseSync experimental feature #811

Description

@FXschwartz

The 4.0 changelog advertises offline-first apps via database: sync and the serverpod_offline_sync module, but docs/ has zero hits for sync, offline_sync, databaseSync, or createSyncSession, and two pages state the opposite:

  • docs/06-concepts/03-data-and-the-database/02-database/01-tables.md:26-32 and docs/06-concepts/lookups/model-reference.md:17 - database "accepts three values"; the analyzer has four (server, client, all, sync) and its error text for shared packages literally says "all" or "sync" (analyzer/models/definitions.dart:561-570, restrictions.dart:245-256).
  • docs/06-concepts/01-server-fundamentals/03-configuration.md:332 and docs/06-concepts/lookups/configuration-reference.md:110 - "No experimental features are available"; databaseSync exists (tools/serverpod_cli/lib/src/config/experimental_feature.dart:13-19) and is required to use database: sync (restrictions.dart:310-322).

What the generator produces with sync on: lib/src/generated/sync_tables.dart on server and client, Client.createSyncSession(path, {runMigrations, isDebugMode, persistentUserId}), and the CRDT interceptor wiring in the generated Serverpod class (generator/dart/library_generators/library_generator.dart:53-100, 1620-1700). The module itself lives outside the framework repo.

  • Add sync as an experimental fourth value on the tables page and the model reference, with the experimental_features: databaseSync: true / --experimental-features databaseSync opt-in.
  • Fix the two "no experimental features" statements.
  • Add a short offline-sync section (or page under client-side database) covering the opt-in, createSyncSession, and a link to the serverpod_offline_sync README on pub.dev, marked experimental.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions