The website and documentation for GoSync
GoSync is an offline-first, real-time sync engine for web apps that you host yourself. Your app reads and writes a local database in the browser, so it's instant and works offline. GoSync syncs changes to your server and to the user's other devices and tabs in real time, and resolves conflicts automatically. The server is a single Go binary on SQLite or PostgreSQL.
import { createClient } from '@harshalpatel2868/gosync-client';
const db = await createClient({ url: 'wss://sync.example.com/sync', getToken: () => auth.getIdToken() });
await db.set('todos', crypto.randomUUID(), { title: 'Buy milk', done: false }); // works offline
db.watch('todos', (todos) => render(todos)); // live across tabs and devicesThe engine itself, its source, releases and issue tracker live in HarshalPatel1972/GoSync. This repository is only the website.
| Path | Contents |
|---|---|
app/ |
Next.js App Router pages: home, /docs/[slug], /examples |
components/ |
Homepage sections and docs UI |
content/docs/ |
Documentation pages in MDX (one file per page) |
The homepage's sync animation is a simulation that runs entirely in the browser. It shows how
GoSync behaves but doesn't connect to a server. The runnable demo is
examples/todo in the main repo.
git clone https://github.com/HarshalPatel1972/GoSync-zero.git
cd GoSync-zero
npm install
npm run dev # http://localhost:3000
npm run build # production buildEach docs page is an MDX file in content/docs/. To add a page:
- Create
content/docs/NN-your-page.mdxwithtitleanddescriptionfront matter. - Map its slug to the file in
slugToFileinapp/docs/[[...slug]]/page.js. - Add it to
navItemsincomponents/docs/DocsSidebar.jsx.
Keep code samples in sync with the real client API
(sdk/js/index.d.ts)
and the server configuration
(docs/OPERATIONS.md).
Contributions are welcome. Please read the Contributing Guide first.
MIT. See LICENSE.
Built by Harshal Patel