BASE

PartyKit

PartyKit

Shared state / CRDT · Free

A runtime and tooling for realtime servers: it supports WebSocket scenarios for collaborative and multiplayer applications.

Also known as: partykit/partykit; partykit; multiplayer-app-dev

Resource illustration: PartyKit

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Create a realtime backend for a collaborative interface
  • Connect two clients and test room event transmission and handling

Example workflow

A possible workflow; this is not a report of hands-on testing.

Create a realtime backend for a collaborative interface.

Before you start

  • A document model and concurrent updates.
  • A client application and transport provider.

Steps

  1. Define the room and messages between WebSocket clients.
  2. Connect two clients and test room event transmission and handling.
  3. Test offline edits, merging, and reconnecting.

Check your result

  • Clients converge on one state after conflicting changes.
  • Transport authorization and history size suit the project.

Choosing PartyKit

Create a realtime backend for a collaborative interface

Choose this when

  • Create a realtime backend for a collaborative interface
  • Connect two clients and test room event transmission and handling

Consider alternatives when

  • When choosing for this topic, compare PartyKit with Automerge. A candidate to compare under the topic: APIs and server SDKs, Realtime and notifications. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
  • When choosing for this topic, compare PartyKit with Liveblocks. A candidate to compare under the topic: APIs and server SDKs, Realtime and notifications. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

Requirements

  • The README requires Node for the CLI; match specific version support to the branch in use.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: MIT for the code; dependencies have separate licenses.

Frequently asked questions

What can you use for free in PartyKit?

Code and local use under MIT.

What additional costs might arise with PartyKit?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for PartyKit?

MIT for the code; dependencies have separate licenses.

How do you get started with PartyKit?

Define the room and messages between WebSocket clients. Connect two clients and test room event transmission and handling. Test offline edits, merging, and reconnecting.

How can I add PartyKit to an existing project?

The README suggests init in an existing project's root; create makes a new directory with a server and client. Within the project, npm run dev starts the development server, and npm run deploy publishes the application to PartyKit cloud. Current development has moved to cloudflare/partykit.

Related tasks and approaches

  • Automerge

    A candidate to compare under the topic: APIs and server SDKs, Realtime and notifications. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

  • Liveblocks

    A candidate to compare under the topic: APIs and server SDKs, Realtime and notifications. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

  • Yjs

    A candidate to compare under the topic: APIs and server SDKs, Realtime and notifications. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

License

MIT for the code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • PartyKit
  • collab
  • Development

Sources

Other resources