mirror of
https://github.com/RickeyWard/kkd-twitch-layout.git
synced 2026-12-01 03:50:58 +00:00
Twitch layout for KittyKatDevil
- TypeScript 98.9%
- JavaScript 0.8%
- HTML 0.1%
- CSS 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| app | ||
| deploystuff-dealwithlater | ||
| dev-scripts | ||
| packages | ||
| public | ||
| resources-source | ||
| results/actual | ||
| scripts | ||
| utils | ||
| .gitignore | ||
| .npmrc | ||
| .prettierrc | ||
| deno.lock | ||
| eslint.config.mjs | ||
| ideas.txt | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| TODOs | ||
| tsconfig.json | ||
InteraKitty Monorepo
A Twitch streaming OBS overlay layout featuring an interactive PixiJS-based kitten system. Subscribers get on-screen kittens that walk, jump, sleep, and respond to clicks. Built with React, PixiJS, and a custom Entity Component System.
Project Structure
├── app/ # React + Vite app (the OBS browser source)
├── packages/
│ ├── ecs-core/ # Generic ECS library (@diamonddrake/ecs-core)
│ ├── ecs-pixi/ # PixiJS rendering integration (@diamonddrake/ecs-pixi)
│ ├── kitty-game/ # Kitty game logic (@interakitty/kitty-game)
│ └── layout-server/ # Deno/Oak server — serves built app, compiles to standalone exe
├── resources-source/ # Original sprite sources and design assets
└── package.json # Workspace root
Getting Started
npm install
npm start # runs all package watchers + Vite dev server
Then add as an OBS browser source (1920x1080):
http://localhost:5173/— main layout (left side)http://localhost:5173/?right— right side layouthttp://localhost:5173/?style=halloween— halloween theme (orange background and chat bubbles, pumpkins behind chat); combine with right as?right&style=halloweenhttp://localhost:5173/?style=christmas— christmas theme (green background with slowly twinkling lights on the border, red/green chat bubbles, santa-hat kitties behind chat); combine with right as?right&style=christmashttp://localhost:5173/boxed.html— boxed outline layout (no interaction)
Commands
| Command | Description |
|---|---|
npm start |
Dev mode — watches all packages + runs Vite |
npm run dev |
Vite dev server only (libs must be pre-built) |
npm run build |
Clean + build libs + build app |
npm run build:production |
Production build (minified, NODE_ENV=production) |
npm run build:server |
Production build + compile standalone Deno server exe |
npm test |
Run tests across all workspaces |
npm run lint |
Lint all workspaces |
Packages
@diamonddrake/ecs-core
Framework-agnostic Entity Component System library using sparse sets for O(1) component lookups.
ECSRegistry— entity/component storage with sparse set indexingScene— container for entities and systems, drives the update loopComponent/System— base classes for data and logic- Built-in:
TransformComponent,BehaviorComponent,HierarchyComponent,EventDispatcher
@diamonddrake/ecs-pixi
PixiJS rendering layer for the ECS. Extends Scene into ScenePixi with a Pixi Container.
SpriteComponent/AnimatedSpriteComponent— static and animated spritesTextComponent— text renderingPixiRenderSystem— syncs ECS transforms to Pixi display objects
@interakitty/kitty-game
Kitty-specific game logic built on the ECS packages.
MainScene— 1460x129px kitten bar with 7 cat sprite variants- Movement physics, animation state machine, nametags
- "Supreme Kitty" click interaction with crown sprite
- Kitty entity factory — creates fully-configured entities from subscriber data
layout-server
Deno/Oak web server that serves the built app. Can be compiled into a standalone executable with npm run build:server (outputs packages/layout-server/layoutserver.exe).
API Integrations
- Twitch EventSub WebSocket — real-time chat, subscriptions, follows, raids, cheers
- Twitch Helix API — subscriber list, channel goals, emotes
- StreamElements API — session stats (followers, subs, cheers)
Tech Stack
- Frontend: React 19, Zustand, Tailwind CSS, Framer Motion
- Rendering: PixiJS 8
- Build: Vite, TypeScript, npm workspaces
- Testing: Vitest
- Server: Deno + Oak