Open-source primitives for building real-time experiences on the internet.
Introduction
AirState helps you build and deploy real-time syncing and collaboration experiences on the web without dealing with low-level intricacies of WebSockets.
It's a frontend library plus a fully open-source server implementation that is available on DockerHub.
An Alternative To Thinking in Messages
As the expectations for never refreshing the page, and all collaboration to happen visibly and in real-time becomes the default we need better mental models to implement real-time syncing that doesn't force engineers to think about individual messages going back and forth.
Not A BaaS and Not a Frontend DB
We set out to build a simple library that abstracts away the underlying communication layer, while not replacing your entire backend stack nor introducing a full-fledged database to your frontend.
AirState server (written in Node & Go) runs as a separate process from your actual backend. All authentication and authorization is handled via signed tokens that your backend signs for your frontend to replay to AirState server.
Who Is AirState For?
AirState is for developers who
-
Are building real-time collaboration experiences like Google Docs, or Figma.
-
Are building seamless remote-control or hand-off feature like Spotify's multi-device player, and Youtube or Netflix's media remote.
-
Are building applications where the server must update the frontend in realtime (and not the other way around.)
Thinking: updating the user's UI based on
- The status of long-running processes (that may or may-not be on a queue)
- Event that have happened on a separate server process (might even be a serverless execution)
Features
- Higher level abstraction ð§
Think in state and mutations, not messages. - Composable primitives ð§Đ
Mix and match SharedState, SharedPresence, and ServerState as needed. - Secure by default ðĄïļ
Server-signed tokens ensure trusted metadata and authorization. - Blazing fast âĄ
Go-powered core for performance-critical paths, Node for rapid iteration. - Lightweight ðŠķ
Minimal bundle size with zero unnecessary dependencies. - Not a Backend-as-a-Service âïļ
Easy to add into any backend or frontend. - Lots of Examples ð
Checkout our examples to get you up and running.
AirState Products
We call them products to be relatable. They all come packaged together in our client libraries and server images. Think of them more like components that you can mix and match.
SharedState
Every client views and edits the same JSON object. It's synced in real-time.
SharedPresence
Every client has their own JSON object that only they can write to. Other clients can just read this object.
ServerState
Clients can "listen" on any number of keys and server-side REST calls can modify the value.
YJS Integration
A syncing backend integration for the quite popular CRDT library YJS.
Quick Links
Get Started
The best place to start is typically by using one of our client SDKs.
By default the client libraries connect to our cloud (don't worry it's free to start), but you can connect to a self-hosted server too if you want.
ReactJS
For ReactJS applications on the web.
JavaScript
For other frameworks or vanilla JS/TS projects.
Self Host
If you already have your application built, you can go ahead and continue with AirState Cloud, or you could self-host using our Docker image on your own infra.
Self Hosting Instructions
For use on your own cloud.