Show your live activity on kizam.fr directly on your Discord status (In Menu, Searching, Playing, Results, etc.).
Since browser extensions can't speak directly to Discord's local IPC socket, this project is split into two parts:
extension/: Chrome/Brave Manifest V3 extension monitoringkizam.fr.bridge/: A lightweight Node.js background process receiving events via WebSockets and sending them to Discord IPC.
kizam.fr -> Content Script -> Service Worker -> WebSocket -> Node Bridge -> IPC -> Discord
Note: Make sure the Discord desktop app is running.
git clone https://github.com/RedSavant/Kizam-RPC.git
cd kizam-rpc/bridge
pnpm install
pnpm startYou should see:
Bridge listening on ws://127.0.0.1:7654
Connected to Discord (your_username)
Keep this terminal open while playing (or set up a background service below).
- Open
chrome://extensionsorbrave://extensions. - Enable Developer mode (top-right toggle).
- Click Load unpacked and select the
extension/folder. - Head over to kizam.fr and play.
Clicking the extension icon shows your current bridge connection status and active state for quick debugging.
| Page / State | Extension State | Discord Status |
|---|---|---|
/ | menu | In Main Menu |
/browse | browsing | Browsing tracks |
/share?... (Lobby/Loading) | preparing | Getting Ready — Track — Artist |
/share?... (In-game) | playing | Playing: Track — by Artist |
/share?... (Paused) | paused | Paused |
/share?... (Results) | finished | Game Over — Track — Artist |
| Tab closed / Left site | closed | (Status cleared) |
By default, the bridge uses a shared "KIZAM" app client ID. To use your own app ID and assets:
- Create an application on the Discord Developer Portal.
- Copy the Application ID.
- In
bridge/, duplicate.env.exampleto.envand setDISCORD_CLIENT_ID. - Upload an asset named
kizam_logounder Rich Presence -> Art Assets.
A systemd user unit is included so you don't have to keep a terminal window open. The setup script generates the service from the template (bridge/kizam-rpc-bridge.service), substitutes the actual bridge path, installs dependencies if needed, then enables and starts the unit:
cd bridge
./install-service.shRequirements:
nodeavailable in yourPATH(otherwise the script aborts).- Your repo kept at its current location — moving it afterwards breaks the path baked into the unit.
View logs at any time with:
journalctl --user -u kizam-rpc-bridge -fStatus / uninstall:
systemctl --user status kizam-rpc-bridge # état du service
systemctl --user disable --now kizam-rpc-bridge # arrêter et retirer du démarrageTo do it manually instead of using the script:
mkdir -p ~/.config/systemd/user
cp bridge/kizam-rpc-bridge.service ~/.config/systemd/user/
# Edit the service file if your repo isn't in ~/Downloads/kizam-rpc
systemctl --user daemon-reload
systemctl --user enable --now kizam-rpc-bridge.serviceKizam is a Single Page Application (SPA) with dynamic CSS class names. Instead of fragile selectors, extension/content.js looks for specific on-screen text (e.g., "PRÉPARATION", "RÉSULTAT", "REPRENDRE").
If an update breaks state detection:
- Open DevTools (
F12) onkizam.fr. - Inspect the visible text during the broken state.
- Update the string checks inside
detectState()inextension/content.js.
PRs fixing detection rules are welcome!
- Service Worker Persistence:
extension/background.jsuseschrome.alarmsto wake up every ~24s, bypassing Manifest V3's ~30s idle termination that would break the WebSocket. - SPA Routing:
extension/content.jspatcheshistory.pushStateandhistory.replaceStatefor URL transitions, combined with aMutationObserverfor state changes under identical URLs (/share). - RPC Library: Built using
@xhayper/discord-rpc. - IPC Debugging:
bridge/debug-ipc.jsis included to test low-level Discord socket connectivity directly without the wrapper library.