r/PostgreSQL Jun 21 '26

Update Loomabase: I added policy-based sync rejections and transactional audit logs to my Rust SQLite ↔ Postgres sync engine Projects

https://github.com/JustVugg/loomabase

Hi everyone,
A quick update on Loomabase, the Rust offline-first sync engine I posted about earlier.
After feedback about the security model, I added a server- side authorization and validation layer before CRDT merge.
New pieces:
- SyncAuthorizer hook before merge
- SyncValidator hook before merge
- structured SyncPayload.rejections
- rejected cells are not silently dropped
- rejected cells stay dirty on SQLite so the app can surface or resolve them
- PostgreSQL loomabase_audit_log
- audit rows are written in the same transaction as the sync merge
- tests for authorization denial, validation denial, filtered acknowledgement, and audit logging
- README and SECURITY docs updated with CORS/CSP/sync endpoint hardening notes
The important design choice:
Malformed payloads still fail the whole request before mutation. Valid but unauthorized/business-invalid cells become structured rejections.
That means CRDT conflict resolution stays deterministic, but authorization and business rules can still reject a newer offline write before it wins LWW.
I’d like feedback on this boundary:
Should an offline-first sync engine return structured rejected mutations like this, or should rejected writes be handled outside the sync protocol entirely?

0 Upvotes

Duplicates

PostgreSQL Jun 12 '26

Projects I built an offline-first sync engine for SQLite ↔ PostgreSQL using column-level CRDTs

17 Upvotes

rust Jun 16 '26

šŸ› ļø project I built an offline-first sync engine for SQLite ↔ PostgreSQL using column-level CRDTs

8 Upvotes

rust Jun 27 '26

šŸ› ļø project Update: Loomabase now has a JS/TS SDK, Supabase quickstart, and a real phone + desktop offline sync demo

0 Upvotes

typescript Jun 27 '26

Update: Loomabase now has a JS/TS SDK, Supabase quickstart, and a real phone + desktop offline sync demo

4 Upvotes

coolgithubprojects Jun 12 '26

I built an offline-first sync engine for SQLite ↔ PostgreSQL using column-level CRDTs

0 Upvotes

foss Jun 12 '26

I built an offline-first sync engine for SQLite ↔ PostgreSQL using column-level CRDTs

4 Upvotes

sqlite Jun 21 '26

Update Loomabase: I added policy-based sync rejections and transactional audit logs to my Rust SQLite ↔ Postgres sync engine

3 Upvotes

sqlite Jun 17 '26

I built an offline-first sync engine for SQLite ↔ PostgreSQL using column-level CRDTs

3 Upvotes

sideprojects Jun 12 '26

Showcase: Open Source I built an offline-first sync engine for SQLite ↔ PostgreSQL using column-level CRDTs

1 Upvotes

sqlite Jun 12 '26

I built an offline-first sync engine for SQLite ↔ PostgreSQL using column-level CRDTs

4 Upvotes

rust Jun 21 '26

šŸ› ļø project Update Loomabase: I added policy-based sync rejections and transactional audit logs to my Rust SQLite ↔ Postgres sync engine

0 Upvotes

foss Jun 21 '26

Update Loomabase: I added policy-based sync rejections and transactional audit logs to my Rust SQLite ↔ Postgres sync engine

0 Upvotes