Skip to content

☂️ Generate a client-side SQLite database using Serverpod models #4783

Closed
5 of 5 issues completed

Description

@marcelomendoncasoares

Problem to Solve

When working with Serverpod on the server, developers that need offline support have to rely on other packages, like Drift, which introduces asymmetry in the interaction with the same relational data between server and client, duplicated models, more documentation context, different migration systems, etc.

Proposal

Offer a fully integrated developer experience by exposing the same Model.db on the client to interact with a local SQLite database. The Client would expose a way to create a long-living session and migrations should share the same workflow as migrations on the server. The implementation can be broken out into several steps that will be discussed individually as sub-issues covering:

  1. Moving the database to a package that can be used on the client.
  2. Implementing SQLite database support.
  3. Adapting the CLI to generate client-side repositories.
  4. Exposing a DatabaseSession on the client.
  5. Adapting the migration system to generate and run client-side migrations.

Use Case

A developer wants to build an offline-first application with the same Serverpod ORM experience across the client and server.

Alternatives

Use other packages on the client and deal with the difference in the semantics.

Additional context

Related issues and discussions:

This issue is one big step towards seamlessly synchronizing data between client and server database for a true offline-first experience.

How experienced are you with this library?

Expert - Experienced and comfortable with using this library in complex projects

Are you interested in working on a PR for this?

  • I want to work on this

Sub-issues

Sub-issues

5 of 5 Issues completed
Loading 5 sub-issues

Activity

  1. added
    enhancement
    area: database
    area: client
    on Mar 2, 2026
  2. changed the title [-]Generate a client-side SQLite database using Serverpod models[/-] [+]☂️ Generate a client-side SQLite database using Serverpod models[/+] on Mar 5, 2026
  3. moved this from Inbox 📫 to Backlog 🗂️ in Serverpod Frameworkson Mar 5, 2026
  4. moved this from Backlog 🗂️ to Done 🚀 in Serverpod Frameworkson May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: clientarea: databaseenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions