Quick Start
1. Run the kanban example
Section titled “1. Run the kanban example”From the repository root:
just example kanbanThis command builds the example and starts a Strata server at
http://localhost:8000. The server uses dev-strata-token unless you set
STRATA_TOKEN.
2. Open two tabs
Section titled “2. Open two tabs”Open http://localhost:8000 in two browser tabs. Add, move, or delete a card
in one tab. The change appears in the other tab.
Both tabs connect to the same WebSocket endpoint:
ws://localhost:8000/socket/websocket?token=dev-strata-token3. View the admin page
Section titled “3. View the admin page”While the example is running, open:
http://localhost:8000/admin?token=dev-strata-tokenThe read-only admin page lists the kanban document, its size, the number of
active connections, and who is present.
What just happened
Section titled “What just happened”- Each browser opened a WebSocket with the token.
- The server checked each token before it accepted the connection.
- The application sent a
joinframe for thekanbandocument. - The server sent a
snapshotof the document state. - Each edit became a
deltaframe. - The server merged and wrote the state. It then sent the state to the other tab.
- If a connection closes, the example connects and joins the document again.
Other examples
Section titled “Other examples”just example todo runs a checklist application. just example workspace
runs the document composition example. Each example is under
examples/ in
the repository. To run the server on its own without an example, use
just server.
Next: Build Your First Application shows how to connect an application to Strata.