-The [PowerSync Service](/architecture/powersync-service) and client SDK operate in unison to keep client-side SQLite databases in sync with a backend database. Learn about their architecture:
+The [PowerSync Service](/architecture/powersync-service) and client SDK operate in unison to keep client-side SQLite databases in sync with a backend source database. Learn about their architecture:
-
-
-The local SQLite database embedded in the PowerSync SDK is automatically kept in sync with the backend database, based on the [Sync Rules](/usage/sync-rules) configured by the developer:
+The Client SDK provides access to a managed [SQLite](/resources/faq#why-does-powersync-use-sqlite-as-the-client-side-database) database that is automatically kept in sync with the backend source database via the PowerSync Service, based on the [Sync Rules](/sync/rules/overview) that are active on the PowerSync Service instance.
-#### Writing Data
-Client-side data modifications, namely updates, deletes and inserts, are persisted in the embedded SQLite database as well as stored in an upload queue. The upload queue is a blocking [FIFO](https://en.wikipedia.org/wiki/FIFO_%28computing_and_electronics%29) queue that gets processed when network connectivity is available.
+## Reading Data (SQLite)
-Each entry in the queue is processed by writing the entry to your existing backend application API, using a function [defined by you](/installation/client-side-setup/integrating-with-your-backend) (the developer). This is to ensure that existing backend business logic is honored when uploading data changes. For more information, see the section on [integrating with your backend](/installation/client-side-setup/integrating-with-your-backend).
+App clients always read data from the client-side [SQLite](https://sqlite.org/) database. When the user is online and the app is connected to the PowerSync Service, changes on the source database reflect in real-time in the SQLite database, and [Live Queries / Watch Queries](/client-sdks/watch-queries) allows the app UI to have real-time reactivity too.
-
-
-
-### Schema
+## Client-Side Schema and SQLite Database Structure
-On the client, the application [defines a schema](/installation/client-side-setup/define-your-schema) with tables, columns and indexes.
+When you implement the PowerSync Client SDK in your application, you need to define a [client-side schema](/intro/setup-guide#define-your-client-side-schema) with tables, columns and indexes that correspond to your [Sync Rules](/sync/rules/overview). You provide this schema when the PowerSync-managed SQLite database is [instantiated](/intro/setup-guide#instantiate-the-powersync-database).
-These are then usable as if they were actual SQLite tables, while in reality these are created as SQLite views.
+The tables defined in your client-side schema are usable in SQL queries as if they were actual SQLite tables, while in reality they are created as _SQLite views_ based on the schemaless JSON data being synced (see [PowerSync Protocol](/architecture/powersync-protocol)).
-The client SDK maintains the following tables:
-1. `ps_data__PS_DATABASE_URI |
- **Connection string obtained from Supabase** See step 5 in [Connect PowerSync to Your Supabase](/integration-guides/supabase-+-powersync#connect-powersync-to-your-supabase) |
+ **Connection string obtained from Supabase** See step 5 in [Connect PowerSync to Your Supabase](/integrations/supabase/guide#connect-powersync-to-your-supabase) |
PS_PORT |
@@ -291,7 +291,7 @@ The following Compose file serves as a universal starting point for deploying th
# This is valid if using the `mongo` service defined in `ps-mongo.yaml`
- # Connection settings for sync bucket storage
+ # Connection settings for bucket storage
storage:
type: mongodb
uri: !env PS_MONGO_URI
@@ -346,7 +346,7 @@ The following Compose file serves as a universal starting point for deploying th
The default one-click deployable PowerSync Service uses
* MongoDB for internal storage,
* PostgreSQL for replication, and
- * [Sync Rules](/usage/sync-rules) as defined for the To-Do List demo application found in [Demo Apps / Example Projects](/resources/demo-apps-example-projects).
+ * [Sync Rules](/sync/rules/overview) as defined for the To-Do List demo application found in [Demo Apps / Example Projects](/intro/examples).
If you are running the demo To-Do List application, you can jump to Step 4 and simply deploy the PowerSync Service.
@@ -362,8 +362,8 @@ The following Compose file serves as a universal starting point for deploying th