Skip to content

ChanX Kit

Pronounced "chan-X kit": a collection of composable, copy-in WebSocket kits for chanx (CHANnels-eXtension).

Instead of installing a framework that owns your consumers, you copy a kit into your project and own it. No hidden abstractions, no dependency you cannot inspect, and an install footprint that is exactly what you used.

  • Copy, don't install


    copit add @chanx-kit/notification drops readable source into your project. Edit it, delete half of it, rename things. It's yours.

  • Typed end to end


    pyright strict with no suppressions, and TypeScript types generated from the server's own AsyncAPI schema.

  • Django and FastAPI


    Kits import only chanx.core, so one component runs on Channels and fast-channels. Every kit's tests run on both in CI.

  • Composable


    Stack as many kits into one consumer as you like, with no type errors and no # pyright: ignore. In the browser, their UI kits share one socket.

Start a new project

uvx copit create gh:huynguyengl99/chanx-kit@main/templates/fastapi-react my-app

FastAPI and React, with the notification kit wired end to end. Run it.

Or add a kit in one minute

copit add @chanx-kit/notification
from chanx.fast_channels.websocket import AsyncJsonWebsocketConsumer

from .ws_kits.notification import NotificationMessage, UserNotificationTopic


class AppConsumer(AsyncJsonWebsocketConsumer[NotificationMessage]):
    channel_layer_alias = "default"
    topics = [UserNotificationTopic]

Then, from a signal, a worker, or another service, with the consumer never imported:

await UserNotificationTopic.notify_user(
    user.id, NotificationPayload(title="Build finished")
)

UI kits

The browser half, React first, over a framework-free core. Each binds to a contract, so the transcriber UI works with Deepgram, ElevenLabs or OpenAI alike, and kits build on each other. UI kits.

Voice, too

Microphone to captions, text to speech for every listener, and an AG-UI agent you can talk to and interrupt. Deepgram, ElevenLabs or OpenAI, with the key on your server, and one base class to switch. Add voice.

Browse the kits Getting started