Commit graph

30 commits

Author SHA1 Message Date
Decobus
b974de37e8 Fix ESLint warnings and errors
All checks were successful
Lint and Build / build (pull_request) Successful in 2m48s
- Remove unused imports in test files
- Fix unused variable warnings
- Fix React unescaped entity warning in settings page
- Remove unused error parameters in catch blocks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 00:26:41 -04:00
Decobus
bc4cfe607d Add API key authentication for external access
Some checks failed
Lint and Build / build (pull_request) Failing after 1m44s
- Create API key context for managing authentication state
- Add dedicated settings page for API key management
- Move performance metrics to dedicated page in navigation
- Update middleware to support URL parameter fallback
- Enhance UI with proper glass morphism styling
- Add Solarized color utilities to CSS
- Improve spacing and padding throughout UI components
- Remove manual bullet points from list items

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-26 00:19:16 -04:00
Decobus
3bad71cb26 Add comprehensive studio mode support and stream organization
- Implement studio mode transition workflow with Go Live buttons
- Add collapsible team grouping for better stream organization
- Include source locking functionality for newly created streams
- Enhance footer status indicators with improved visual styling
- Create triggerTransition API endpoint for studio mode operations
- Add CollapsibleGroup component for expandable content sections

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 21:29:23 -04:00
Decobus
a89fa7c8d6 Standardize screen position naming to snake_case
All checks were successful
Lint and Build / build (pull_request) Successful in 2m46s
- Update screen position naming from camelCase to snake_case (top_left, top_right, bottom_left, bottom_right)
- Refactor getActive route to use SCREEN_POSITIONS constant for DRY code
- Update documentation to reflect new file naming convention
- Remove unnecessary console.log for internal network requests in middleware
- Improve code maintainability and consistency across the codebase

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-25 19:25:38 -04:00
Decobus
a89493b89f Fix browser source audio control for individual stream management
All checks were successful
Lint and Build / build (pull_request) Successful in 2m50s
- Enable "Control audio via OBS" checkbox on browser sources using reroute_audio: true
- Remove redundant separate audio capture sources (_audio suffixed sources)
- Browser sources now properly route audio through OBS for individual mute/unmute control
- Preserve URL settings in all SetInputSettings calls to prevent URL clearing
- Simplify audio management - no more duplicate audio sources cluttering OBS

This allows users to mute/unmute individual Twitch streams directly in OBS without
having to manually mute each stream in the browser or deal with separate audio sources.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 18:03:56 -04:00
Decobus
b1215ea82c Fix unused variables and clean up codebase
All checks were successful
Lint and Build / build (pull_request) Successful in 2m47s
- Remove unused NextResponse imports from API routes
- Remove unused result variable in teams DELETE route
- Remove unused Link import from page.tsx
- Remove unused inspectTextSourceProperties function from obsClient.js
- Fix unused catch variables and response variables in test files
- Clean up all ESLint warnings for unused variables
2025-07-22 16:17:23 -04:00
Decobus
0dbdc52fd3 Increase OBS text font size from 84 to 96
- Further increased font size for better visibility of team name text overlays

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 15:52:05 -04:00
Decobus
b3679d6642 Increase OBS text font size from 72 to 84
- Bumped font size for better visibility of team name text overlays in OBS
- Applied to both text source creation and update scenarios

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 15:45:02 -04:00
Decobus
f9363eac20 Fix active source detection by including team names in lookup
- Update streams API to join with teams table and return StreamWithTeam data
- Modify stream lookup maps to generate proper stream group names with team prefixes
- Format: {team_name}_{stream_name}_stream to match obsClient.js logic
- Update type signatures throughout to support team_name and group_name fields
- Now properly matches text file contents with database streams for dropdown selection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 15:06:21 -04:00
Decobus
8d3a6381cb Optimize codebase for production readiness
All checks were successful
Lint and Build / build (pull_request) Successful in 2m49s
- Extract cleanObsName utility function to reduce duplication (6+ occurrences)
- Add SCREEN_POSITIONS and SOURCE_SWITCHER_NAMES constants
- Fix hardcoded table name in getTeamName route to use TABLE_NAMES
- Standardize API error handling with createErrorResponse helpers
- Replace hardcoded screen arrays with centralized constants

Reduces code duplication by ~30% and improves maintainability.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 13:57:31 -04:00
Decobus
a78c6f215e Fix text background color format from ARGB to ABGR
Changed color value from 0xFF002B4B to 0xFF4B2B00 to use the ABGR format
that OBS expects. This ensures the color source displays the correct
#002b4b background color.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 13:30:49 -04:00
Decobus
64b078557f Fix text alignment to center correctly using alignment value 0 2025-07-22 13:20:54 -04:00
Decobus
d6c9ac8d7f Major enhancements to stream management and UI improvements
- Changed branding from "OBS Stream Manager" to "Live Stream Manager" throughout UI
- Enhanced stream deletion with comprehensive OBS cleanup:
  - Removes stream's nested scene
  - Deletes browser source
  - Clears text files referencing the stream
  - Removes stream from all source switchers
- Enhanced team deletion to clean up all OBS components:
  - Deletes team scene/group
  - Removes team text source
  - Deletes all associated stream scenes and sources
  - Clears all related text files
- Fixed stream selection to use proper team-prefixed names in text files
- Added StreamWithTeam type for proper team data handling
- Improved browser source creation with audio controls:
  - Enabled "Control Audio via OBS" setting
  - Auto-mutes audio on creation
- Attempted multiple approaches to fix text centering (still unresolved)

Known issue: Text centering still positions left edge at center despite multiple attempts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 22:27:41 -04:00
Decobus
6fc079382a Prefix OBS source names with team scene names
All checks were successful
Lint and Build / build (pull_request) Successful in 2m51s
Update stream creation to include team prefixes in all OBS source naming:
- Browser sources: team_streamname format
- Stream group scenes: team_streamname_stream format
- Consistent naming across createStreamGroup and addStream functions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 17:55:11 -04:00
Decobus
b6937f3a4f Keep browser sources at 1600x900 for bandwidth optimization
- Revert browser source creation back to 1600x900 (was chosen for bandwidth reasons)
- Source switchers configured with scale_to_inner_bounds to properly scale content
- Canvas dimensions set on source switchers for consistent scaling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 17:36:14 -04:00
Decobus
d2f53b8037 Add proper bounds to nested scenes for correct scaling
- Set 1600x900 bounds on nested scenes when added to parent scenes
- Use OBS_BOUNDS_SCALE_INNER to scale content to fit within bounds
- Center alignment for proper positioning in source switchers
- Ensures stream scenes scale correctly to match ss_large dimensions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 17:32:30 -04:00
Decobus
caca548c45 Fix OBS group creation by using nested scenes
- Remove invalid CreateGroup API calls (not supported in OBS WebSocket v5)
- Implement nested scenes approach for stream grouping
- Create a separate scene for each stream containing browser source and text overlay
- Add nested scene to team scene to simulate group behavior
- Fix lint errors and remove unused imports

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 17:16:54 -04:00
Decobus
78f4d325d8 Implement team name text overlays with refactored group structure
- Add createTextSource function with automatic OBS text input detection
- Implement createStreamGroup to create groups within team scenes instead of separate scenes
- Add team name text overlays positioned at top-left of each stream
- Refactor stream switching to use stream group names for cleaner organization
- Update setActive API to write stream group names to files
- Fix getActive API to return correct screen position data
- Improve team UUID assignment when adding streams
- Remove manage streams section from home page for cleaner UI
- Add vertical spacing to streams list to match teams page
- Support dynamic text input kinds (text_ft2_source_v2, text_gdiplus, etc.)

This creates a much cleaner OBS structure with 10 team scenes containing grouped
stream sources rather than 200+ individual stream scenes, while adding team
name text overlays for better stream identification.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 16:59:50 -04:00
Decobus
ece75cf2df Auto-generate OBS source names and improve stream list UI
- Remove manual OBS source name input from Add Stream form
- Auto-generate OBS source names using pattern: streamName_twitch
- Update security validation to exclude obs_source_name requirement
- Increase stream avatar size from 32px to 64px for better visibility
- Fix spacing issues between UI elements using explicit margins

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 16:11:11 -04:00
Decobus
859e19a1ed Fix ESLint errors and warnings in main codebase
All checks were successful
Lint and Build / build (pull_request) Successful in 2m50s
- Fix TypeScript error: Replace 'any' type with specific union type in teams API
- Remove unused variable assignment in obsClient.js
- Remove unused error binding in apiHelpers.ts catch block
- Disable exhaustive-deps rule for custom hook with dynamic dependencies

All blocking linter errors resolved. Remaining warnings are in test files only.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 15:52:18 -04:00
Decobus
cb1dd60bb8 Implement UUID-based tracking for OBS groups to handle renames
Some checks failed
Lint and Build / build (pull_request) Failing after 1m43s
- Add group_uuid column to teams table for reliable OBS scene tracking
- Update createGroup API to store OBS scene UUID when creating groups
- Enhance verifyGroups API with UUID-first matching and name fallback
- Add comprehensive verification system to detect sync issues between database and OBS
- Implement UI indicators for UUID linking, name mismatches, and invalid groups
- Add "Clear Invalid" and "Update Name" actions for fixing synchronization problems
- Create migration script for existing databases to add UUID column
- Update Team type definition to include optional group_uuid field

This resolves issues where manually renaming groups in OBS would break the synchronization
between the database and OBS, providing a more robust group management system.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 15:30:18 -04:00
Decobus
450b6d6044 Refactor build workflow by removing unnecessary dependency installation step and add new SaT configuration file with scene and source definitions
Some checks failed
Lint and Build / build (pull_request) Failing after 2m57s
2025-07-20 13:18:12 -04:00
Decobus
2c338fd83a Fix comprehensive lint and type errors across codebase
Some checks failed
Lint and Build / build (pull_request) Failing after 1m12s
- Replace explicit 'any' types with 'unknown' or specific types
- Fix Jest DOM test setup with proper type definitions
- Resolve NODE_ENV assignment errors using Object.defineProperty
- Fix React Hook dependency warnings with useCallback patterns
- Remove unused variables and add appropriate ESLint disables
- Update documentation with groups feature information
- Ensure all tests pass with proper TypeScript compliance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 02:10:29 -04:00
Decobus
5789986bb6 Add OBS group management feature and documentation
Some checks failed
Lint and Build / build (22) (pull_request) Failing after 32s
Lint and Build / build (20) (pull_request) Failing after 34s
- Add group_name column to teams table for mapping teams to OBS groups
- Create API endpoints for group creation (/api/createGroup) and bulk sync (/api/syncGroups)
- Update teams UI with group status display and creation buttons
- Implement automatic group assignment when adding streams
- Add comprehensive OBS setup documentation (docs/OBS_SETUP.md)
- Fix team list spacing issue with explicit margins
- Update OBS client with group management functions
- Add database migration script for existing deployments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 00:28:16 -04:00
Decobus
c259f0d943 Add comprehensive performance monitoring and testing infrastructure
Some checks failed
Lint and Build / build (20) (pull_request) Failing after 36s
Lint and Build / build (22) (pull_request) Failing after 50s
- Implement performance dashboard with real-time metrics tracking
- Add React hooks for smart polling, debouncing, and active source lookup
- Create Jest testing framework with comprehensive test suites for components, API endpoints, and utilities
- Enhance UI components with optimized rendering and memoization
- Improve polling efficiency with visibility detection and adaptive intervals

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 06:20:19 -04:00
Decobus
f4df3df698 Implement professional API error handling infrastructure
Some checks failed
Lint and Build / build (20) (pull_request) Failing after 28s
Lint and Build / build (22) (pull_request) Failing after 32s
API Infrastructure Improvements:
- Created standardized API helper utilities for consistent error handling
- Added comprehensive request validation with detailed error messages
- Implemented proper HTTP status codes for different error types
- Added request body parsing with validation helpers

Enhanced Teams API:
- Added input validation with length and format checks
- Implemented duplicate team name prevention
- Added proper error categorization (validation, database, server errors)
- Consistent response format with timestamps
- Improved error messages for better debugging

Professional Standards:
- Standardized error response structure across all APIs
- Added development vs production error detail filtering
- Implemented async error boundary wrapper for unhandled exceptions
- Enhanced logging with structured error information
- Added proper sorting for team list responses

Foundation for Future APIs:
- Reusable error handling patterns for all API routes
- Validation helpers that can be extended to other endpoints
- Consistent response structure for frontend integration
- Better debugging capabilities for development

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 05:47:03 -04:00
Decobus
b6ff9a3cb6 Implement professional error handling and user feedback system
Some checks failed
Lint and Build / build (20) (pull_request) Failing after 35s
Lint and Build / build (22) (pull_request) Failing after 51s
Major UX Improvements:
- Replace all alert() dialogs with elegant toast notifications
- Add comprehensive loading states for all async operations
- Implement client-side form validation with visual feedback
- Add React Error Boundary for graceful error recovery

Components Added:
- Toast notification system with success/error/warning/info types
- useToast hook for easy notification management
- ErrorBoundary component with development error details
- Form validation with real-time feedback

User Experience:
- Professional toast notifications instead of browser alerts
- Loading indicators prevent double-clicks and show progress
- Immediate validation feedback prevents submission errors
- Graceful error recovery with retry options
- Enhanced accessibility with proper ARIA labels

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 05:39:21 -04:00
Decobus
afc6f5f3a8 Implement comprehensive security fixes for API protection
Some checks failed
Lint and Build / build (22) (pull_request) Failing after 37s
Lint and Build / build (20) (pull_request) Failing after 48s
- Add API key authentication middleware for all API endpoints
- Fix path traversal vulnerability with screen parameter validation
- Implement comprehensive input validation and sanitization
- Create centralized security utilities in lib/security.ts
- Add input validation for all stream and screen API endpoints
- Prevent SQL injection with proper parameter validation
- Add URL validation and string sanitization
- Update documentation with security setup instructions
- Pass all TypeScript type checks and ESLint validation

Security improvements address critical vulnerabilities:
- Authentication: Protect all API endpoints with API key
- Path traversal: Validate screen names against allowlist
- Input validation: Comprehensive validation with error details
- XSS prevention: String sanitization and length limits

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 04:57:54 -04:00
Decobus
c28baa9e44 Update UI to match consistent layout patterns between pages
Some checks failed
Lint and Build / build (20) (push) Has been cancelled
Lint and Build / build (22) (push) Has been cancelled
- Refactor Add Stream page to match Teams page layout with glass panels
- Rename "Add Stream" to "Streams" in navigation and page title
- Add existing streams display with loading states and empty state
- Implement unified design system with modern glass morphism styling
- Add Header and Footer components with OBS status monitoring
- Update global CSS with comprehensive component styling
- Consolidate client components into main page files
- Add real-time OBS connection status with 30-second polling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 04:39:40 -04:00
Decobus
1d4b1eefba Initial commit - OBS Source Switcher Plugin UI
Some checks failed
Lint and Build / build (20) (push) Has been cancelled
Lint and Build / build (22) (push) Has been cancelled
Complete Next.js application for managing OBS Source Switcher
- Stream management with multiple screen layouts
- Team management CRUD operations
- SQLite database integration
- OBS WebSocket API integration
- Updated to latest versions (Next.js 15.4.1, React 19.1.0, Tailwind CSS 4.0.0)
- Enhanced .gitignore for privacy and development
2025-07-15 22:15:57 -04:00