TypeScript client libraries for PARCNET, providing APIs for third-party applications to connect to PARCNET clients.
This monorepo includes the following packages/apps:
client-web, an example PARCNET client in TypeScript and running in browser<iframe>, which accepts connections via a browserMessageChanneland is intended to be hosted by a third-party service (similar to Zupass)
app-connector, a TypeScript package which is imported by third-party apps which want to connect to a PARCNET client. It exposes an API and abstracts away the detail of which client and transport is being used.client-helpers, useful code for client developers which provides reusable code for handling messages via MessageChannel and websocket transportsclient-rpc, which defines the RPC protocol and API that clients support
test-app, an example of the functionality exposed by clients to third-party applications
To install the monorepo contents:
pnpm installTo build all packages and apps:
pnpm buildTo run a single app:
cd path/to/app
pnpm devTo run all apps:
pnpm devTo watch all packages and rebuild on change (good to run alongside pnpm dev):
pnpm watchTo see the apps in action, run client-web. Then run test-app and open test-app at http://localhost:3200.
By default it will connect to client-web on http://localhost:5173. By clicking the lightning icon in the top-right of the screen, you can configure it to connect to another client, such as Zupass.