Skip to content

inqubehq/quack-wss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebChat Event Bus

A lightweight real-time event bus built with Deno and Fresh, with a browser workspace for collaborative chat, file sharing, and room-level dashboard actions.

Features

  • Realtime room channels over WebSockets
  • Built-in apps in one workspace:
    • Chat
    • File sharing (up to 512 KB per file)
    • Shared dashboard (online count, message/file counters, shared note)
    • Raw event feed
  • In-memory room history with persisted event types
  • Polished UI with custom Tailwind theme tokens plus handcrafted CSS

Stack

  • Runtime: Deno
  • HTTP layer: Fresh (@fresh/core)
  • Transport: native WebSockets (Deno.upgradeWebSocket)
  • Frontend: Fresh-rendered shell + Preact hooks app (src/frontend/client.js) with colocated styles (src/frontend/styles.css)
  • Theme customization: Tailwind CDN config + component layer embedded in the Fresh-rendered page

Getting Started

Requirements: Deno >= 1.40

deno task start

Development mode with file watching:

deno task dev

Type check:

deno task check

Server defaults:

  • UI: /
  • WebSocket endpoint: /ws
  • Port: 8000 (override with PORT)

Protocol

Client handshake:

{ "type": "hello", "name": "Ava", "room": "ops" }

Server ready payload:

{
  "type": "ready",
  "channel": "room:ops",
  "session": { "id": "...", "name": "Ava", "color": "#22d3ee", "room": "ops" },
  "users": [{ "id": "...", "name": "Kai", "color": "#4ade80" }],
  "history": [
    { "type": "event", "action": "chat.message", "data": { "text": "hi" } }
  ]
}

Publish payload:

{
  "type": "publish",
  "channel": "room:ops",
  "action": "chat.message",
  "data": { "text": "Deploying build #214" }
}

Persisted actions:

  • chat.message
  • files.share
  • dashboard.counter.bump
  • dashboard.note.set

Ephemeral actions:

  • chat.typing.start
  • chat.typing.stop
  • presence.join
  • presence.leave
  • presence.state

Notes

  • State is in-memory only; restarting the server clears channels and history.
  • The single-page workspace is rendered by Fresh from src/server.ts, then hydrated into a Preact component app from src/frontend/client.js.

About

WSS based webchat app that lets user host their own chat room and send join links using tailscale network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors