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 push one logical dirty set through staged push sessions
- clients replay the authoritative committed bundle returned by the server
- clients pull complete committed bundles only
- fresh installs and prune 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/nethttp_server/: referencenet/httpserverexamples/mobile_flow/: simulator for the current sync contractswagger/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
Start Here
- Read Core Concepts for the vocabulary and end-to-end model.
- Use Getting Started to stand up a server and client.
- Use HTTP API for the wire contract.