go-oversync
go-oversync is a Go library suite for bundle-based sync between local SQLite clients and PostgreSQL servers.
Current Model
The verified contract in this repository is:
- PostgreSQL business tables are authoritative
- clients send bounded uploads through
POST /sync/push - clients settle terminal upload outcomes and acknowledge them under the original binding
- clients pull complete committed bundles only
- retained-history gaps, fresh installs, and source recovery rebuild through frozen snapshot sessions
Repository Surface
oversync/: PostgreSQL adapter, bundle capture, schema validation, HTTP handlersoversqlite/: SQLite client SDK with trigger-based dirty captureexamples/samplesync_server/: maintained application-facing sample serverintegration/: repository-owned server, simulator, schema-evolution, and qualification harnessesswagger/two_way_sync.yaml: OpenAPI description of the HTTP surface
Design Constraints
The runtime is intentionally fail-closed.
- registered PostgreSQL tables must define exactly one visible sync key column of type
uuidortext - registered PostgreSQL tables must define
_sync_scope_id TEXT NOT NULLand scope-inclusive identity / foreign keys - registered and managed table sets must be FK-closed
- unsupported key shapes and unsupported FK shapes fail during bootstrap
- one
oversqlite.Clientowns one SQLite database at a time - one SQLite database maps to one configured remote schema
- retained bundle history is bounded; clients below the retained floor recover through snapshot rebuild
Start Here
- Read the v0.5.0 release notes before deploying.
- Read Core Concepts for the vocabulary and end-to-end model.
- Use Getting Started to stand up a server and client.
- Run the maintained server example in
examples/samplesync_server/. - Use Server Deployment and Operations to configure capacity, monitoring, shutdown, upgrades, and recovery.
- Use HTTP API for the wire contract.