A lightweight, responsive web application for aggregating live chat messages from Twitch, YouTube, and Kick in real-time. Built with Vue.js and Vite, it features a full-width chat display, custom color palette, and low memory usage (~200-300 MB). Ideal for streamers, with configuration via URL query parameters and automatic startup.
- Multi-Platform Chat Integration:
- Twitch: Real-time messages via
tmi.js(IRC WebSockets). - YouTube: Polling-based messages via YouTube Data API v3.
- Kick: Real-time messages via Pusher WebSockets.
- Twitch: Real-time messages via
- URL Query Parameter Configuration:
- Auto-load channel settings with
?twitch=channel&kick=channel&youtube_vid=videoid. - Set theme with
?theme=darkor?theme=light.
- Auto-load channel settings with
- Automatic Startup: Services start automatically when valid query parameters are provided.
- Hidden Settings UI: Configuration is done via URL; no visible settings form.
- Responsive Design: Full-width chat display, mobile-friendly.
- Custom Theme: Elegant color palette (
#123a49,#2da592,#8bcbb7,#f5faf6) with light/dark mode support. - Remixicon Icons: Platform-specific icons (Twitch, YouTube, Kick).
- Optimized Performance:
- Memory capped at ~200-300 MB by limiting messages (100 stored, 50 displayed).
- Cleaned-up event listeners for Pusher and
tmi.jsto prevent memory leaks. - YouTube polling set to 2 seconds to balance speed and API quota.
- Secure Configuration: YouTube API key stored in
.env.
- Node.js: Version 18 or higher.
- npm: Version 8 or higher.
- YouTube API Key: Obtain from Google Cloud Console with YouTube Data API v3 enabled.
- Live Channels: Access to live Twitch, YouTube, and Kick channels for testing.
-
Clone the Repository:
git clone https://github.com/yourusername/chat-aggregator.git cd chat-aggregator -
Install Dependencies:
npm install
-
Set Up Environment Variables:
- Create a
.envfile in the project root:VITE_YOUTUBE_API_KEY=your_youtube_api_key_here
- Replace
your_youtube_api_key_herewith your YouTube Data API key.
- Create a
-
Run the Development Server:
npm run dev
- Open the app at
http://localhost:5173?twitch=yourchannel&kick=yourchannel&youtube_vid=yourvideoid&theme=dark.
- Open the app at
-
Configure via URL:
- Use query parameters to set channels and theme, e.g.:
http://localhost:5173?twitch=bertugfahriozer&kick=bertugfahriozer&youtube_vid=QWsdserc&theme=dark - Parameters:
twitch: Twitch channel name (e.g.,bertugfahriozer).youtube_vid: YouTube live video ID (e.g.,QWsdserc).kick: Kick channel slug (e.g.,bertugfahriozer).theme:darkorlight(defaults to systemprefers-color-scheme).
- The app auto-starts with the specified channels and theme.
- Use query parameters to set channels and theme, e.g.:
-
View Chats:
- Messages from Twitch, YouTube, and Kick appear in real-time with platform-specific icons and colors (Twitch: purple, YouTube: red, Kick: green).
-
Toggle Theme:
- Use the theme toggle button in the header to switch between light and dark modes manually.
chat-aggregator/
├── public/
│ ├── vite.svg
├── src/
│ ├── assets/
│ │ ├── vue.svg
│ ├── components/
│ │ ├── ChatDisplay.vue # Chat message display with icons
│ │ ├── HelloWorld.vue # Default Vite component (unused)
│ │ ├── Settings.vue # Hidden settings logic
│ ├── services/
│ │ ├── kickService.js # Kick chat via Pusher
│ │ ├── twitchService.js # Twitch chat via tmi.js
│ │ ├── youtubeService.js # YouTube chat via API polling
│ ├── store/
│ │ ├── index.js # Vuex store for state management
│ ├── App.vue # Main app with chat layout
│ ├── main.js # Entry point
│ ├── style.css # Global styles with color palette
├── .env # Environment variables (not committed)
├── .gitignore # Git ignore file
├── index.html # HTML entry with Inter font and Remixicon
├── package.json # Dependencies and scripts
├── README.md # This file
├── vite.config.js # Vite configuration
vue: ^3.5.18vuex: ^4.1.0axios: ^1.11.0pusher-js: ^8.4.0tmi.js: ^1.8.5uuid: ^10.0.0remixicon: ^4.4.0 (also loaded via CDN)- Dev:
@vitejs/plugin-vue,vite
- Memory Usage: Capped at ~200-300 MB with 100 stored messages and 50 displayed.
- YouTube Polling: 2-second interval to balance performance and API quota (43,200 requests/day).
- Security:
.envfile secures the YouTube API key. Never commit.envto Git.
- YouTube Messages Not Appearing:
- Check
.envfor a validVITE_YOUTUBE_API_KEY. - Ensure
youtube_vidis for a live stream. - Look for
YouTube Polling Errorin the console.
- Check
- High RAM Usage:
- Use Chrome DevTools > Memory to take heap snapshots.
- Reduce
maxMessagesinstore/index.jsto 50 if needed.
- Kick Icon Missing:
- If
ri-kick-fillis unavailable, replace withri-chat-3-fillinChatDisplay.vue.
- If
- No Messages Without Query Parameters:
- The app requires valid
twitch,youtube_vid, orkickparameters to start.
- The app requires valid
Contributions are welcome! Please:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-feature). - Commit changes (
git commit -m 'Add your feature'). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
This project is licensed under the MIT License.
- Built with Vue.js and Vite.
- Icons by Remixicon.
- Fonts by Google Fonts (Inter).
- Inspired by the need for a unified live chat experience for streamers.