A professional, real-time Twitch chat overlay application designed for streamers and content creators. Built with Node.js and Socket.IO for seamless integration with OBS Studio and other broadcasting software.
- Real-time Chat Display: Live Twitch chat messages with zero delay
- Transparent Overlay Mode: Perfect for OBS browser sources with customizable transparency
- Full Emote Support: Native Twitch emotes, BetterTTV (BTTV), and FrankerFaceZ (FFZ) integration
- Moderation Events: Real-time display of message deletions and moderation actions
- Custom Styling: Comprehensive customization options for colors, fonts, and layout
- WebSocket Communication: Real-time bidirectional communication using Socket.IO
- Twitch API Integration: Official Twitch API support via TMI.js
- Responsive Design: Works across different screen sizes and resolutions
- Docker Support: Containerized deployment for easy hosting
- Environment Configuration: Secure credential management with environment variables
- Backend: Node.js, Express.js
- Real-time Communication: Socket.IO
- Twitch Integration: TMI.js (Twitch Messaging Interface)
- Template Engine: Mustache.js
- Frontend: Vanilla JavaScript, HTML5, CSS3
- Containerization: Docker & Docker Compose
- Package Management: Yarn
- Node.js 18+ (Alpine Linux compatible)
- Yarn package manager
- Twitch Developer Application (for API credentials)
- Docker (optional, for containerized deployment)
git clone https://github.com/christopherldo/twitch-chat-visualizer.git
cd twitch-chat-visualizer
yarn install
cp .env.example .env
Edit the .env
file with your Twitch application credentials:
PORT=3000
CLIENT_ID=your_twitch_client_id
CLIENT_SECRET=your_twitch_client_secret
Getting Twitch Credentials:
- Visit the Twitch Developer Console
- Create a new application
- Set OAuth Redirect URL to
http://localhost:3000
- Copy the Client ID and Client Secret to your
.env
file
yarn start
The application will be available at http://localhost:3000
docker-compose up -d
docker build -t twitch-chat-visualizer .
docker run -p 3000:3000 --env-file .env twitch-chat-visualizer
- Access the Application: Navigate to your hosted instance or
http://localhost:3000
- Enter Channel Name: Input your Twitch channel name and click "OK"
- Customize Appearance: Use the settings gear (βοΈ) to configure:
- Username colors and backgrounds
- Message colors and backgrounds
- Font sizes
- Transparency settings
- Generate Overlay URL: Enable "Transparent" mode to get the overlay URL
- Add to OBS:
- Create a new "Browser Source" in OBS Studio
- Paste the transparent overlay URL
- Set width to 400px (recommended)
- Adjust height as needed
src/
βββ app/
β βββ controllers/ # Application controllers
β β βββ ChatController.js # Chat rendering logic
β β βββ MessageController.js # Message processing
β β βββ SocketController.js # WebSocket handling
β β βββ RequestsController.js # API requests
β βββ middlewares/ # Express middlewares
βββ helpers/ # Utility functions
βββ views/ # Mustache templates
β βββ chat.mustache # Main chat view
β βββ transparent.mustache # Transparent overlay
β βββ partials/ # Reusable components
βββ server.js # Application entry point
βββ routes.js # Route definitions
βββ sockets.js # Socket.IO configuration
βββ viewEngine.js # Template engine setup
- ChatController: Handles chat visualization and routing
- SocketController: Manages WebSocket connections and real-time communication
- MessageController: Processes and formats chat messages with emote support
- RequestsController: Handles Twitch API requests for badges and emotes
GET /
- Main application interfacePOST /
- Channel selection handlerGET /:channel
- Chat visualization pageGET /:channel/transparent
- Transparent overlay mode
username
- Channel connection initializationtransparent
- Transparent link generationdisconnect
- Connection cleanup
- Username Styling: Background colors, text colors
- Message Styling: Background colors, text colors, font sizes
- Transparency: Full transparency support for overlay usage
- Emote Integration: Automatic emote replacement and sizing
- Badge Display: Subscriber and moderator badges
Variable | Description | Required |
---|---|---|
PORT |
Server port (default: 3000) | No |
CLIENT_ID |
Twitch application client ID | Yes |
CLIENT_SECRET |
Twitch application client secret | Yes |
Package | Purpose |
---|---|
express |
Web framework |
socket.io |
Real-time communication |
tmi.js |
Twitch chat integration |
mustache-express |
Template rendering |
axios |
HTTP requests |
dotenv |
Environment configuration |
cors |
Cross-origin resource sharing |
moment |
Date/time formatting |
uuid |
Unique identifier generation |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project helpful, please consider:
- β Starring this repository
- π Reporting bugs and issues
- π‘ Suggesting new features
- πΈ Supporting via PayPal
- GitHub: @christopherldo
- Project Link: https://github.com/christopherldo/twitch-chat-visualizer
Made with β€οΈ for the streaming community