A powerful VSCode extension that seamlessly integrates Twitch chat functionality directly into your development environment. Perfect for streamers who want to interact with their audience while coding, without switching between applications.
- ๐ Secure OAuth 2.0 Authentication - Safe and secure Twitch integration
- ๐ฌ Real-time Chat Integration - Connect to any Twitch channel's chat
- ๐ Smart Channel Switching - Easily switch between multiple channels
- ๐ฑ Webview Chat Panel - Dedicated chat interface within VSCode
- ๐ Connection Status Display - Real-time status in the status bar
- ๐ Auto-reconnection - Robust connection with exponential backoff
- โก Performance Optimized - Memory efficient with message batching
- ๐จ Theme Integration - Seamlessly adapts to your VSCode theme
- ๐ง Comprehensive Configuration - Extensive customization options
Install from the VSCode Marketplace or download the latest release from GitHub.
- Visit Twitch Developer Console
- Create a new application with these settings:
- Name: Your choice (e.g., "VSCode StreamPortal")
- OAuth Redirect URLs:
http://localhost:7777/auth/callback - Category: Developer Tools
- Save your Client ID and Client Secret
Open VSCode Settings (Ctrl+, or Cmd+,) and configure StreamPortal:
{
"streamPortal.username": "your_twitch_username",
"streamPortal.clientId": "your_client_id_here",
"streamPortal.clientSecret": "your_client_secret_here",
"streamPortal.redirectUri": "http://localhost:7777/auth/callback"
}- Open Chat Panel: View โ StreamPortal Chat
- Authenticate: Click "Authenticate with Twitch" in the chat panel
- Connect to Channel: Enter a channel name and click "Connect"
- Start Chatting: Send messages directly from VSCode! ๐
Access these commands via Command Palette (Ctrl+Shift+P or Cmd+Shift+P):
| Command | Description |
|---|---|
StreamPortal: Connect to Channel |
Connect to a specific Twitch channel |
StreamPortal: Disconnect |
Disconnect from current chat |
StreamPortal: Send Message |
Send a message to current channel |
StreamPortal: Logout |
Logout and clear authentication |
The StreamPortal Chat panel provides:
- Real-time Message Display: See chat messages as they arrive
- Channel Switcher: Quick dropdown to change channels
- Message Input: Send messages with Enter key
- Connection Controls: Authenticate, connect, and disconnect buttons
- Status Indicators: Visual feedback for connection state
- Responsive Design: Adapts to different panel sizes
- Authentication: Click "Authenticate with Twitch" for OAuth flow
- Channel Connection: Select channel from dropdown or type new one
- Message Sending: Type in input field and press Enter
- Settings: Configure preferences and view status
| Setting | Type | Default | Description |
|---|---|---|---|
streamPortal.username |
string | "" | Your Twitch username (required) |
streamPortal.clientId |
string | "" | Twitch Application Client ID (required) |
streamPortal.clientSecret |
string | "" | Twitch Application Client Secret (required) |
streamPortal.redirectUri |
string | "http://localhost:7777/auth/callback" | OAuth redirect URI |
streamPortal.autoConnect |
boolean | false | Auto-connect to last channel on startup |
streamPortal.recentChannels |
array | [] | List of recently connected channels |
StreamPortal follows a modular architecture with clean separation of concerns:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ StreamPortal Extension โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโค
โ Authentication โ IRC Connection โ UI Integration โ
โ โ โ โ
โ โข OAuth 2.0 โ โข WebSocket IRC โ โข Webview Panel โ
โ โข Token Mgmt โ โข Auto-reconnect โ โข Command Palette โ
โ โข Secure Store โ โข Channel Mgmt โ โข Status Bar โ
โ โข Validation โ โข Message Parse โ โข Theme Support โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโ
- TwitchChatManager: Central orchestrator for all chat functionality
- AuthManager: OAuth 2.0 authentication and token lifecycle management
- IRCConnectionManager: WebSocket connection with Twitch IRC servers
- IRCProtocolHandler: IRC message parsing with Twitch-specific features
- ChatPanelProvider: Webview UI management and user interactions
- ErrorHandler: Centralized error management and user feedback
- Secure Token Storage: All authentication tokens stored using VSCode SecretStorage
- OAuth 2.0 Compliance: Industry-standard authentication with CSRF protection
- Minimal Permissions: Only requests necessary scopes (
chat:read,chat:edit) - No Data Collection: Extension doesn't collect or transmit personal data
- Secure Connections: All network communication over HTTPS/WSS
StreamPortal includes comprehensive testing infrastructure:
- Unit Tests: Individual component testing with 96%+ coverage
- Integration Tests: End-to-end workflow validation
- Mock Systems: WebSocket and VSCode API simulation
- Performance Tests: Memory usage and connection stability
- Error Handling: Comprehensive error scenario coverage
Run tests with: npm test
- Node.js 18+ and npm
- VSCode 1.85.0+
- TypeScript 5.3+
# Clone repository
git clone https://github.com/offbeat-studio/stream-portal.git
cd stream-portal
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Run tests
npm test
# Launch Extension Development Host
npm run dev
# OR press F5 in VSCodesrc/
โโโ core/ # Core utilities and error handling
โโโ commands/ # VSCode command implementations
โโโ twitch/ # Twitch integration modules
โ โโโ auth/ # Authentication system
โ โโโ irc/ # IRC protocol implementation
โ โโโ types/ # TypeScript definitions
โโโ ui/ # User interface components
โโโ extension.ts # Main extension entry point
tests/ # Comprehensive test suite
โโโ unit/ # Unit tests
โโโ integration/ # Integration tests
โโโ helpers/ # Test utilities and mocks
media/ # Frontend assets
โโโ chatPanel.js # Webview frontend
โโโ styles.css # UI styling
npm run compile # Compile TypeScript
npm run lint # Run ESLint
npm run test # Run test suite
npm run package # Create .vsix package- Invalid Credentials: Verify Client ID and Secret in Twitch Developer Console
- Redirect URI Mismatch: Ensure redirect URI matches exactly:
http://localhost:7777/auth/callback - OAuth Timeout: Try logging out and re-authenticating
- Network Problems: Check internet connectivity and firewall settings
- Invalid Channel: Verify channel name exists and is accessible
- Rate Limiting: Wait a few minutes before attempting reconnection
- Memory Usage: Extension automatically manages memory with message limits
- Slow Response: Check VSCode Developer Tools Console for errors
- UI Problems: Try reloading the webview panel
- Check Extension Output: View โ Output โ StreamPortal
- Open Developer Tools: Help โ Toggle Developer Tools
- Verify Configuration: Check all required settings are configured
- Test Network: Ensure Twitch.tv is accessible
- Restart Extension: Reload VSCode window
- ๐ Documentation: Check CLAUDE.md for technical details
- ๐ Bug Reports: Open an issue on GitHub with detailed information
- ๐ก Feature Requests: Suggest improvements via GitHub issues
- ๐ง Configuration Help: Review the configuration examples above
- M1: VSCode extension infrastructure and basic functionality
- M2: Twitch IRC integration with OAuth authentication
- M3: Interactive webview chat UI and user experience
- M4: Performance optimization and comprehensive testing
- M5: VSCode Marketplace publication and documentation
- Future: Advanced features (moderation tools, chat commands, themes)
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with tests
- Ensure all tests pass (
npm test) - 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.
- Twitch: For providing the IRC interface and developer APIs
- VSCode Team: For the excellent extension development platform
- Community: For feedback, testing, and contributions
- Documentation: CLAUDE.md for comprehensive technical details
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Happy streaming and coding! ๐ฎ๐ปโจ
Made with โค๏ธ for the streaming developer community