Hey this is amazing! I see the sqlite db is replicated but how does it handle multiple instances as writers? Curious if the underlying sqlite engine is syzy or if there's other restrictions to be aware of

Thanks! Yes, the write-replication part is syzy, which hooks into the standard unmodified sqlite engine that reads and writes normal sqlite db files locally - syzy just keeps multiple instances in sync by capturing writes and applying them elsewhere.

It handles multiple writers by capturing changes as logical operations, then resolving conflicts in a globally-deterministic order based on their contents based on a CRDT model.

There are some limitations (see https://github.com/wjordan/syzy/blob/main/sqlite/docs/LIMITA...), mostly around primary keys (they have to be non-NULL) and UNIQUE constraints (there's some subtle differences in behavior between nullable and NOT NULL uniqueness). But in general, the goal is for all of SQLite, DML and DDL, to just work normally!