https://github.com/orbitinghail/sqlsync Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} orbitinghail / sqlsync Public * Notifications You must be signed in to change notification settings * Fork 20 * Star 1.8k * SQLSync is a collaborative offline-first wrapper around SQLite. It is designed to synchronize web application state between users, devices, and the edge. sqlsync.dev License Apache-2.0 license 1.8k stars 20 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 26 * Pull requests 0 * Discussions * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Discussions * Actions * Security * Insights orbitinghail/sqlsync This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 200 Commits .cargo .cargo .github .github .vscode .vscode demo demo examples examples lib lib .editorconfig .editorconfig .gitignore .gitignore .prettierrc .prettierrc .rustfmt.toml .rustfmt.toml CHANGELOG.md CHANGELOG.md CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTING.md Cargo.lock Cargo.lock Cargo.toml Cargo.toml GUIDE.md GUIDE.md LICENSE LICENSE README.md README.md biome.json biome.json justfile justfile package.json package.json pnpm-lock.yaml pnpm-lock.yaml pnpm-workspace.yaml pnpm-workspace.yaml View all files Repository files navigation * README * Code of conduct * Apache-2.0 license SQLSync github actions Join the SQLSync Community SQLSync is a collaborative offline-first wrapper around SQLite designed to synchronize web application state between users, devices, and the edge. Example use cases * 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 * Running SQLSync on the edge with high tolerance for unreliable network conditions * Enabling optimistic mutations on SQLite read replicas SQLSync Demo The best way to get a feel for how SQLSync behaves is to play with the Todo list demo. Clicking this link 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. You can also learn more about SQLSync and it's goals by watching Carl's WasmCon 2023 talk. The recording can be found here. Features * Eventually consistent SQLite * Optimistic reads and writes * Reactive query subscriptions * Real-time collaboration * Offline-first * Cross-tab sync * React library If you are interested in using or contributing to SQLSync, please join the Discord community and let us know what you want to build. We are excited to collaborate with you! Installation & Getting started Please refer to the guide to learn how to add SQLSync to your application. Tips & Tricks How to debug SQLSync in the browser By 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. The easiest way is to use Google Chrome, and go to the special URL: 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. My table is missing, or multiple statements aren't executing SQLSync 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. For example: // DON'T DO THIS: execute!("create table foo (id int); create table bar (id int);").await?; // DO THIS: execute!("create table foo (id int)").await?; execute!("create table bar (id int)").await?; Community & Contributing If you are interested in contributing to SQLSync, please join the Discord community 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. Join the SQLSync Community About SQLSync is a collaborative offline-first wrapper around SQLite. It is designed to synchronize web application state between users, devices, and the edge. sqlsync.dev Topics sql database offline-first sqlite collaborative relational-database local-first sqlsync Resources Readme License Apache-2.0 license Code of conduct Code of conduct Activity Custom properties Stars 1.8k stars Watchers 23 watching Forks 20 forks Report repository Contributors 2 * * Languages * Rust 87.1% * TypeScript 11.0% * Just 1.4% * JavaScript 0.5% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.