# livestorejs/livestore

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/livestorejs-livestore).**

3,475 stars · 121 forks · TypeScript · apache-2.0

## Links

- GitHub: https://github.com/livestorejs/livestore
- Homepage: https://livestore.dev
- awesome-repositories: https://awesome-repositories.com/repository/livestorejs-livestore.md

## Topics

`data-layer` `local-first` `signals` `sqlite` `state-management` `sync-engine`

## Description

Livestore is a reactive state management framework that utilizes a local SQLite database to store and synchronize application data. It provides an event-sourced state store that processes typed events through materializer functions to derive and persist application state.

The framework implements offline-first data synchronization using a push-pull engine and append-only event logs to maintain consistency between clients and servers. It includes a real-time presence system for tracking user activity and shared session status across connected clients.

The system covers a broad capability surface including event-driven state updates, reactive UI data binding, and durable state persistence. It features developer tools for state inspection and time-travel debugging based on immutable audit trails. Data processing and synchronization are offloaded to web workers to prevent blocking the main user interface.

A command-line interface is available for project scaffolding and initial setup.

## Tags

### Data & Databases

- [Reactive SQLite Libraries](https://awesome-repositories.com/f/data-databases/database-management-systems/database-engines/embedded-databases/sqlite-databases/reactive-sqlite-libraries.md) — A reactive state management framework that combines SQLite persistence with reactive data streaming for automatic UI updates.
- [Local-First Persistence](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-storage/client-side-persistence/local-first-persistence.md) — Uses a relational database on the client side to provide synchronous data reads and offline-first functionality.
- [Persistence & Durability](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/persistence-durability.md) — Saves data to a durable storage layer so it survives browser refreshes and server restarts. ([source](https://docs.livestore.dev/tutorial/1-setup-starter-project))
- [Event Stores](https://awesome-repositories.com/f/data-databases/event-stores.md) — Implements a data store that persists sequences of events for state reconstruction via materializer functions.
- [Local-First Databases](https://awesome-repositories.com/f/data-databases/local-first-databases.md) — Uses a local database as the primary data source to enable synchronous reads and offline-first functionality. ([source](https://docs.livestore.dev/overview/why-livestore))
- [Log Materialization](https://awesome-repositories.com/f/data-databases/materialized-views/transformation-materializers/log-materialization.md) — Transforms append-only event logs into a concrete local SQLite database to derive current application state. ([source](https://docs.livestore.dev/overview/introduction))
- [Offline Data Management](https://awesome-repositories.com/f/data-databases/offline-data-management.md) — Ensures the application remains fully operational during network outages by maintaining state in a local database. ([source](https://docs.livestore.dev/index))
- [Reactive Data Queries](https://awesome-repositories.com/f/data-databases/reactive-data-queries.md) — Binds database queries to UI frameworks using hooks that trigger automatic updates when underlying data changes.
- [SQLite Storage Adapters](https://awesome-repositories.com/f/data-databases/sqlite-drivers/sqlite-storage-adapters.md) — Uses a relational SQLite schema to structure and store application state locally or on a server. ([source](https://docs.livestore.dev/index))
- [Local Database Persistence](https://awesome-repositories.com/f/data-databases/sqlite-drivers/sqlite-storage-adapters/local-database-persistence.md) — Stores application data in a local database using the browser file system for persistence across sessions. ([source](https://docs.livestore.dev/tutorial/3-read-and-write-todos-via-livestore))
- [State Inspection Interfaces](https://awesome-repositories.com/f/data-databases/application-state-management/state-inspection-interfaces.md) — Provides visual tools for tracking and displaying real-time state changes and data flow within the application. ([source](https://docs.livestore.dev/tutorial/3-read-and-write-todos-via-livestore))
- [Data Schema Definitions](https://awesome-repositories.com/f/data-databases/data-schema-definitions.md) — Specifies database table structures and event types that translate events into permanent state changes. ([source](https://docs.livestore.dev/getting-started/react-web))
- [Offline-First Persistence](https://awesome-repositories.com/f/data-databases/offline-first-persistence.md) — Stores events locally to remain functional without connectivity and synchronizes pending changes once online. ([source](https://docs.livestore.dev/overview/introduction))

### Software Engineering & Architecture

- [State Materialization](https://awesome-repositories.com/f/software-engineering-architecture/event-sourcing/state-materialization.md) — Processes immutable event logs into relational database tables to derive the application state.
- [Background Data Synchronization](https://awesome-repositories.com/f/software-engineering-architecture/background-data-synchronization.md) — Implements mechanisms for updating local data stores from remote sources without interrupting the user interface. ([source](https://docs.livestore.dev/getting-started/react-web))
- [Event Sourcing](https://awesome-repositories.com/f/software-engineering-architecture/event-sourcing.md) — Manages application state as an immutable sequence of events to ensure data consistency and enable historical debugging.
- [Offline-First Synchronization](https://awesome-repositories.com/f/software-engineering-architecture/offline-first-synchronization.md) — Ships a push-pull synchronization engine and event logs to keep local and remote states consistent offline.
- [Append-Only Event Logs](https://awesome-repositories.com/f/software-engineering-architecture/stateful-distributed-actors/append-only-event-logs.md) — Distributes append-only event logs between clients and servers to ensure deterministic state reconstruction.
- [Type-Safe Event Contracts](https://awesome-repositories.com/f/software-engineering-architecture/event-dispatchers/type-safe-event-contracts.md) — Enforces a type-safe contract for events and queries to ensure unidirectional data flow.
- [Event Logs](https://awesome-repositories.com/f/software-engineering-architecture/event-logs.md) — Maintains an immutable log of every event to enable historical state reconstruction and analysis. ([source](https://docs.livestore.dev/overview/introduction))
- [Push-Pull State Distribution](https://awesome-repositories.com/f/software-engineering-architecture/push-based-data-stream-frameworks/push-pull-state-distribution.md) — Implements a push-pull synchronization engine to distribute immutable events across clients and servers. ([source](https://docs.livestore.dev/index))

### User Interface & Experience

- [State-Synchronized Bindings](https://awesome-repositories.com/f/user-interface-experience/data-binding-frameworks/state-synchronized-bindings.md) — Binds global state management to frontend libraries using reactive hooks to synchronize the user interface. ([source](https://docs.livestore.dev/index))
- [Event-Driven State Managers](https://awesome-repositories.com/f/user-interface-experience/event-driven-state-managers.md) — Provides a centralized mechanism to update application state via typed events and materializer functions. ([source](https://docs.livestore.dev/getting-started/react-web))
- [Reactive Data Bindings](https://awesome-repositories.com/f/user-interface-experience/reactive-data-bindings.md) — Binds a local SQLite database to frontend frameworks to automatically update the UI when data changes.
- [Reactive State Managers](https://awesome-repositories.com/f/user-interface-experience/reactive-state-managers.md) — Includes a built-in reactivity system that tracks data changes to automatically synchronize and update UI components. ([source](https://docs.livestore.dev/index))
- [Reactive UI Updates](https://awesome-repositories.com/f/user-interface-experience/reactive-ui-updates.md) — Triggers automatic UI updates when underlying data changes using a type-safe schema for events and queries. ([source](https://docs.livestore.dev/overview/why-livestore))

### Web Development

- [Main Thread Offloading](https://awesome-repositories.com/f/web-development/main-thread-offloading.md) — Moves computationally expensive state management and data processing tasks from the main UI thread to background web workers. ([source](https://docs.livestore.dev/getting-started/vue))
- [Offline-First Web Apps](https://awesome-repositories.com/f/web-development/offline-first-web-apps.md) — Provides a framework for building applications that function without internet by prioritizing local storage and synchronization.
- [Presence Tracking](https://awesome-repositories.com/f/web-development/presence-tracking.md) — Tracks and shares the online status and activity of users within shared sessions. ([source](https://docs.livestore.dev/index))
- [WebSocket State Synchronization](https://awesome-repositories.com/f/web-development/state-syncing-reactivity/websocket-state-synchronization.md) — Propagates data events between multiple clients in real-time using a WebSocket backend for shared state consistency. ([source](https://docs.livestore.dev/tutorial/4-sync-data-via-cloudflare))

### Business & Productivity Software

- [Real-time Collaboration](https://awesome-repositories.com/f/business-productivity-software/team-collaboration-events/collaboration-communication-tools/collaboration-tools/real-time-collaboration.md) — Enables real-time synchronization of application data across multiple users and devices for shared interactive experiences.

### Development Tools & Productivity

- [Time-Travel Debuggers](https://awesome-repositories.com/f/development-tools-productivity/time-travel-debuggers.md) — Provides a developer interface to inspect event logs and reconstruct state transitions for time-travel debugging.

### System Administration & Monitoring

- [Optimistic Offline Queues](https://awesome-repositories.com/f/system-administration-monitoring/background-job-queues/offline-request-queues/optimistic-offline-queues.md) — Maintains a local queue of pending changes during network outages with automatic synchronization once connectivity is restored.

### Part of an Awesome List

- [State Management](https://awesome-repositories.com/f/awesome-lists/devtools/state-management.md) — State management framework based on reactive SQLite.
