npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

callskit

v0.0.6

Published

A toolkit for building call experience using Cloudflare Realtime

Downloads

406

Readme

CallsKit

A toolkit for building realtime call experiences with Cloudflare Realtime.

CallsKit provides vanilla JS APIs as well as React hooks that makes development with the core APIs easier in React.

Usage

Server setup

API Server

First you would need to route API requests in an API server like so:

import { routeApiRequest } from 'callskit/server';

app.all('/partytracks/*', (c) => {
	return routeApiRequest({
		appId: c.env.REALTIME_APP_ID,
		token: c.env.REALTIME_API_TOKEN,
		turnServerAppId: c.env.TURN_TOKEN_ID,
		turnServerAppToken: c.env.TURN_API_TOKEN,
		request: c.req.raw,
	});
});

Refer servers/api/src/index.ts for a full hono example.

Make sure to put your env variables in the .dev.vars file.

Deploy this and use the URL in the client side.

Socket Server using PartyKit

CallsKit provides a PartyKit worker that you can use to handle room state.

Just create a PartyKit project using:

npm create partykit@latest

Then, replace the contents of the src/server.ts with this:

import { PartyKitServer } from 'callskit/server';

export default PartyKitServer;

Then just deploy and use this URL in the client side.

npm run deploy

Core API Usage (Vanilla JS)

const call = await createCall({ room: 'abc-xyz' });

// then access APIs like so
call.started_at;
call.room;
call.self;
call.self.name;
call.participants.joined.toArray();
call.participants.joined.toArray()[0].name;
call.chat;

React Hooks

You set up the provider like so:

import { useCreateCall, CallProvider } from 'callskit/react';

function App() {
	const [call, createCall] = useCreateCall();

	useEffect(() => {
		createCall({
			room: 'abc-xyz',
			socketBaseUrl: 'YOUR_SOCKET_URL',
			// API Base should exclude `/partytracks` at the end
			apiBaseUrl: 'YOUR_API_URL',
		});
	}, []);

	return (
		<CallProvider call={call} fallback={<div>Loading...</div>}>
			<MyCallApp />
		</CallProvider>
	);
}

Then your app can use the provided hooks like so.

import { useCall, useCallSelector } from 'callskit/react';

function MyCallApp() {
	const call = useCall();
	const participants = useCallSelector(
		(call) => call.participants.joined,
	).toArray();

	const chatMessages = useCallSelector((call) => call.chat.messages);

	// ...
}