{"id":13503737,"url":"https://github.com/orbitinghail/sqlsync","last_synced_at":"2025-05-13T19:08:38.712Z","repository":{"id":193357029,"uuid":"645859939","full_name":"orbitinghail/sqlsync","owner":"orbitinghail","description":"SQLSync is a collaborative offline-first wrapper around SQLite. It is designed to synchronize web application state between users, devices, and the edge.","archived":false,"fork":false,"pushed_at":"2025-03-25T05:24:32.000Z","size":1145,"stargazers_count":2662,"open_issues_count":28,"forks_count":38,"subscribers_count":30,"default_branch":"main","last_synced_at":"2025-04-27T05:41:56.976Z","etag":null,"topics":["collaborative","database","local-first","offline-first","relational-database","sql","sqlite","sqlsync"],"latest_commit_sha":null,"homepage":"https://sqlsync.dev","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orbitinghail.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-26T15:52:29.000Z","updated_at":"2025-04-27T02:22:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"4e098284-e047-4e15-8fbd-f1bcc3e9fc92","html_url":"https://github.com/orbitinghail/sqlsync","commit_stats":null,"previous_names":["orbitinghail/sqlsync"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitinghail%2Fsqlsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitinghail%2Fsqlsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitinghail%2Fsqlsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitinghail%2Fsqlsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbitinghail","download_url":"https://codeload.github.com/orbitinghail/sqlsync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251094580,"owners_count":21535324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collaborative","database","local-first","offline-first","relational-database","sql","sqlite","sqlsync"],"created_at":"2024-07-31T23:00:44.276Z","updated_at":"2025-04-27T05:42:00.426Z","avatar_url":"https://github.com/orbitinghail.png","language":"Rust","readme":"# SQLSync\n\n[![github actions](https://github.com/orbitinghail/sqlsync/actions/workflows/actions.yaml/badge.svg?branch=main)](https://github.com/orbitinghail/sqlsync/actions?query=branch%3Amain)\n[![Join the SQLSync Community](https://discordapp.com/api/guilds/1149205110262595634/widget.png?style=shield)][discord]\n\n**SQLSync is a collaborative offline-first wrapper around SQLite** designed to synchronize web application state between users, devices, and the edge.\n\n**Example use cases**\n\n- A web app with a structured file oriented data model like Figma. Each file could be a SQLSync database, enabling real-time local first collaboration and presence\n- Running SQLSync on the edge with high tolerance for unreliable network conditions\n- Enabling optimistic mutations on SQLite read replicas\n\n**SQLSync Demo**\n\nThe best way to get a feel for how SQLSync behaves is to play with the [Todo list demo][todo-demo]. Clicking [this link][todo-demo] will create a unique to-do list and redirect you to its unique URL. You can then share that URL with friends or open it on multiple devices (or browsers) to see the power of offline-first collaborative SQLite.\n\n[todo-demo]: https://sqlsync-todo.pages.dev/\n\nYou can also learn more about SQLSync and it's goals by watching Carl's WasmCon 2023 talk. [The recording can be found here][wasmcon-talk].\n\n[wasmcon-talk]: https://youtu.be/oLYda9jmNpk?si=7BBBdLxEj9ZQ4OvS\n\n**Features**\n\n- Eventually consistent SQLite\n- Optimistic reads and writes\n- Reactive query subscriptions\n- Real-time collaboration\n- Offline-first\n- Cross-tab sync\n- React library\n\nIf you are interested in using or contributing to SQLSync, please [join the Discord community][discord] and let us know what you want to build. We are excited to collaborate with you!\n\n## Installation \u0026 Getting started\n\nPlease refer to [the guide](./GUIDE.md) to learn how to add SQLSync to your application.\n\n## Tips \u0026 Tricks\n\n### How to debug SQLSync in the browser\nBy default SQLSync runs in a shared web worker. This allows the database to automatically be shared between different tabs, however results in making SQLSync a bit harder to debug.\n\nThe easiest way is to use Google Chrome, and go to the special URL: [chrome://inspect/#workers](chrome://inspect/#workers). On that page you'll find a list of all the running shared workers in other tabs. Assuming another tab is running SQLSync, you'll see the shared worker listed. Click `inspect` to open up dev-tools for the worker.\n\n### My table is missing, or multiple statements aren't executing\nSQLSync uses [rusqlite] under the hood to run and query SQLite. Unfortunately, the `execute` method only supports single statements and silently ignores trailing statements. Thus, if you are using `execute!(...)` in your reducer, make sure that each call only runs a single SQL statement.\n\nFor example:\n```rust\n// DON'T DO THIS:\nexecute!(\"create table foo (id int); create table bar (id int);\").await?;\n\n// DO THIS:\nexecute!(\"create table foo (id int)\").await?;\nexecute!(\"create table bar (id int)\").await?;\n```\n\n## Community \u0026 Contributing\n\nIf you are interested in contributing to SQLSync, please [join the Discord community][discord] and let us know what you want to build. All contributions will be held to a high standard, and are more likely to be accepted if they are tied to an existing task and agreed upon specification.\n\n[![Join the SQLSync Community](https://discordapp.com/api/guilds/1149205110262595634/widget.png?style=banner2)][discord]\n\n[discord]: https://discord.gg/etFk2N9nzC\n[rusqlite]: https://github.com/rusqlite/rusqlite\n","funding_links":[],"categories":["Rust","Applications","Extensions","sqlite","backup and replicate"],"sub_categories":["Database"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitinghail%2Fsqlsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbitinghail%2Fsqlsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitinghail%2Fsqlsync/lists"}