You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Together, these components provide a complete, production-grade **offline-first synchronization stack** for SQLite and PostgreSQL.
9
9
10
-
# sqlite-sync
10
+
# SQLite Sync
11
11
12
-
**sqlite-sync** is a native SQLite extension that must be installed and loaded on all client devices.
12
+
**SQLite Sync** is a native SQLite extension that must be installed and loaded on all client devices.
13
13
We provide prebuilt binaries for:
14
14
* Desktop and mobile platforms
15
15
* WebAssembly (WASM)
16
16
* Popular frameworks including React, Expo, npm, and more
17
17
18
-
**Note:** The latest version (v0.9.96) is not yet available in the official sqlite-sync repository. Please use our development fork instead:[https://github.com/sqliteai/sqlite-sync-dev](https://github.com/sqliteai/sqlite-sync-dev)
18
+
**Note:** The latest version (v0.9.96) is not yet available in the official SQLite Sync repository. Please use our development fork instead:[https://github.com/sqliteai/sqlite-sync-dev](https://github.com/sqliteai/sqlite-sync-dev)
19
19
20
20
### Architecture Refactoring
21
21
The extension has been refactored to support both **SQLite** and **PostgreSQL** backends.
22
-
* All database-specific native calls have been isolated in database.h
22
+
* All database-specific native calls have been isolated in [database.h](../../src/database.h)
23
23
* Each database engine implements its own engine-dependent layer
24
24
* The core **CRDT logic** is fully shared across engines
25
25
@@ -35,7 +35,7 @@ Key Features
35
35
* Cross-platform, language-agnostic payload format
36
36
* Works seamlessly in any framework or programming language
@@ -46,12 +46,12 @@ Additional CRDTs can be implemented if needed, though LWW covers most real-world
46
46
47
47
48
48
49
-
# cloud-sync
49
+
# CloudSync
50
50
51
-
**cloudsync** is a lightweight, stateless microservice responsible for synchronizing clients with central servers.
51
+
**CloudSync** is a lightweight, stateless microservice responsible for synchronizing clients with central servers.
52
52
### Responsibilities
53
53
* Synchronizes clients with:
54
-
***SQLiteCloud servers**
54
+
***SQLite Cloud servers**
55
55
***PostgreSQL servers**
56
56
* Manages upload and download of CRDT payloads
57
57
* Stores payloads via **AWS S3**
@@ -73,46 +73,51 @@ Technology Stack
73
73
74
74
Observability
75
75
76
-
* Metrics dashboard available in grafana-dashboard.json
76
+
* Metrics dashboard available in [grafana-dashboard.json](grafana-dashboard.json)
77
77
78
78
* Additional logs available via the Fly.io monitoring dashboard
79
79
80
80
81
81
82
82
Demo Deployment
83
-
For the current demo, a single cloudsync node is deployed in **Europe** on Fly.io.
84
-
If testing from other regions, latency will reflect this single-node deployment. A production deployment would use **geographically distributed nodes with regional routing** for global coverage.
85
83
84
+
For the current demo, a single CloudSYnc node is deployed in **Europe** on Fly.io.
85
+
If testing from other regions, latency will reflect this single-node deployment. A production deployment would use **geographically distributed nodes with regional routing** for global coverage.
86
86
87
87
88
-
# postgres-sync
89
88
90
-
**postgres-sync** is a native PostgreSQL extension derived from sqlite-sync.
89
+
# Postgres Sync
90
+
91
+
**Postgres Sync** is a native PostgreSQL extension derived from SQLite Sync.
91
92
### Features
92
-
* Implements the same CRDT algorithms available in sqlite-sync
93
+
* Implements the same CRDT algorithms available in SQLite Sync
93
94
* Applies CRDT logic to:
94
95
* Changes coming from synchronized clients
95
96
* Changes made directly in PostgreSQL (CLI, Drizzle, dashboards, etc.)
96
97
97
98
This ensures **full bidirectional consistency**, regardless of where changes originate.
98
99
99
100
### Schema Handling
100
-
SQLite does not support schemas, while PostgreSQL does. To bridge this difference, postgres-sync introduces a mechanism to:
101
+
SQLite does not support schemas, while PostgreSQL does. To bridge this difference, Postgres Sync introduces a mechanism to:
102
+
101
103
* Associate each synchronized table with a specific PostgreSQL schema
102
104
* Allow different schemas per table
105
+
103
106
This preserves PostgreSQL-native organization while maintaining SQLite compatibility.
104
107
105
108
106
109
107
110
# Current Limitations
108
111
109
112
The PostgreSQL integration is actively evolving. Current limitations include:
110
-
***User Impersonation** : The microservice currently applies server changes using the Supabase Admin user. In the next version, changes will be applied under the identity associated with the client’s JWT.
111
-
***Table Creation** : Tables must currently be created manually in PostgreSQL before synchronization. We are implementing automatic translation of SQLite CREATE TABLE statements to PostgreSQL syntax.
112
-
***Row-Level Security**: RLS is fully implemented for SQLiteCloud servers. PostgreSQL RLS integration is in progress and will be included in the final release.
113
-
***Beta Status** : While extensively tested, the PostgreSQL sync stack should currently be considered **beta software**. Please report any issues, we are committed to resolving them quickly.
113
+
114
+
***User Impersonation**: The microservice currently applies server changes using the Supabase Admin user. In the next version, changes will be applied under the identity associated with the client’s JWT.
115
+
***Table Creation**: Tables must currently be created manually in PostgreSQL before synchronization. We are implementing automatic translation of SQLite CREATE TABLE statements to PostgreSQL syntax.
116
+
***Row-Level Security**: RLS is fully implemented for SQLite Cloud servers.PostgreSQL RLS integration is in progress and will be included in the final release.
117
+
***Beta Status**: While extensively tested, the PostgreSQL sync stack should currently be considered **beta software**. Please report any issues, we are committed to resolving them quickly.
114
118
115
119
# Next
116
120
*[CLIENT](CLIENT.md) installation and setup
117
121
*[CLOUDSYNC](CLOUDSYNC.md) microservice configuration and setup
118
122
*[SUPABASE](SUPABASE.md) configuration and setup
123
+
*[SPORT-TRACKER APP](SPORT_APP_README_SUPABASE.md) demo web app based on SQLite Sync WASM
0 commit comments