Introduction
What OpenSync is, how it works and where to start.
On this page
OpenSync is a small synchronization server. Your apps and services send data to it over HTTP, on named channels such as orders or stock. OpenSync turns every request into a JSON message and sends it at once to all the clients that listen on that channel, over WebSocket or Server-Sent Events.
OpenSync is an official Total.js app under the MIT license. The code is on GitHub.
What you can do
- Send data to a channel with any HTTP method:
GET,POST,PUT,PATCHorDELETE, as JSON, form data, plain text or files. - Receive the data live in your apps, web pages and scripts, over WebSocket or Server-Sent Events.
- Send messages from one WebSocket client to all the others.
- Give each app its own access token, and limit which channels it receives.
- See the connected apps on the Clients page.
- Keep a log of every request.
- Receive webhooks, for example from Slack, with an extension.
How it fits together
- Your shop sends
POST /sync/orders/with the new order as JSON. - OpenSync answers
200with an empty body. - Every client connected with a token that can read
ordersgets a message with the channel, the method, the headers, the query and the body of that request.
Where to go next
- Install OpenSync from source or with Docker.
- Save the first setup and create access tokens.
- Connect a client: WebSocket or Server-Sent Events.
- Send data: Send data over HTTP.