01
Local first
Reads and writes succeed with no network. The change log is the queue.
Hecate keeps local application databases and independent backends consistent. Change tracking, delivery, retries, checkpoints, and conflict handling live in the platform — not in every app you ship.
Powered by Hecate's Engine. Managed through Hecate's Torch
Offline
3 local changes pending
Developers already know how to read and write a database. The hard part is keeping that data honest across an offline client and a backend that does not share a transaction.
01
Reads and writes succeed with no network. The change log is the queue.
02
Local Sync is the product. Database Sync reuses the same runtime later.
03
Events carry identity, source, and ordering. Adapters differ. The runtime does not.
04
Status, retries, slot retention, and diagnostics are part of the design, not an afterthought.
Capability A · Primary
MVPSQLite on the device, PostgreSQL at the center, a TypeScript SDK in between. HTTP carries batches. WebSockets say when the server has something new.
React Native / Expo · JSON protocol · Device auth
Independent PostgreSQL databases, captured with logical replication and applied one way. Bidirectional sync waits until the one-way path is boring.
Event shape, delivery, checkpoints, idempotency, retry, observability, and configuration are shared. Sources and destinations are not.
The reverse path sends authorized backend changes back to connected devices.
pgoutput supplies the stream. The engine preserves transaction boundaries.
01
Stable ids, source identity, and source-specific cursors such as LSNs and SQLite sequences.
02
Events survive restarts. Pending work is stored, not held in memory.
03
At-least-once transport with explicit acknowledgements.
04
A successful apply and its checkpoint commit together when the destination allows it.
05
Replays do not duplicate effects on the destination.
06
Interrupted batches resume from the last durable point.
07
Structured logs, metrics, and sync status for operators and devices.
08
YAML for developers, validated before the runtime starts.
These are the constraints the engine is built around. They are also the ones a demo has to survive.
01
Hecate does not promise exactly-once delivery across independent databases. Application is idempotent, so a replay is safe.
02
Destination writes and the checkpoint that records them commit in one transaction wherever the database can do that.
03
PostgreSQL LSNs and SQLite change sequences stay distinct. Ordering mechanisms are not flattened into one fake clock.
04
Offline clients will write concurrently. Last-write-wins is a policy you choose, not a silent default.
05
Subscriptions enforce user, tenant, and record-level access before a row is offered to a device.
06
When a destination falls behind, consumption slows. Queue depth and PostgreSQL WAL retention stay visible.
Schema evolution is part of the same contract: clients and servers must define what happens to incompatible versions, in-flight events, and migrations before a pending change is applied.
Protocol, identity, acknowledgements, conflicts, and authorization — written down before the engine.
A Go runtime that can identify, validate, deliver, checkpoint, and retry events.
Triggers, change logs, transaction boundaries, and pending work that survives restart.
Device auth, batched HTTP upload, transactional apply on PostgreSQL, duplicate suppression.
Subscriptions, row filters, WebSocket hints, and HTTP catch-up for reconnecting devices.
Versioning, concurrent-update detection, and policies: server, client, last-write, or application.
A TypeScript SDK and Expo integration so apps do not build their own sync engine.
One-way PostgreSQL logical replication. The next capability, not a gate on the first prototype.
CLI, YAML, health, Docker, and a path from install to a running sync.
Partitions, crashes, large batches, schema changes, and slot growth — tested and documented.
MVP demonstration
01
A customer record is created in SQLite. The change log keeps it.
02
The app closes and opens again. Pending work is still there.
03
Device A reaches the Hecate server and resumes from its checkpoint.
04
The record lands in PostgreSQL inside a transaction.
05
An authorized subscription receives the new row.
06
Device B updates the customer. The change is captured upstream.
07
Device A receives the modification on the next catch-up.
08
Concurrent edits are detected and resolved by the configured policy.
09
The network drops mid-batch. Nothing is acknowledged early.
10
Sync continues without lost changes or duplicate effects.
Local Sync. A React Native or Expo app stores data in SQLite, tracks changes locally, and synchronizes with a central PostgreSQL database over HTTP, with WebSockets for “changes are waiting” notifications.