Commit graph

78 commits

Author SHA1 Message Date
Decobus
6fadccef51 Merge pull request 'Fix browser source audio control for individual stream management' (#11) from browser-audio-control-fix into main
All checks were successful
Lint and Build / build (push) Successful in 2m44s
Reviewed-on: #11
2025-07-23 01:09:25 +03: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
612be2b227 Fix orphaned groups verification to include stream scenes
- Add stream scene detection based on naming pattern: {team}_{stream}_stream
- Query database for both teams and streams with proper joins
- Generate expected stream scene names using cleanObsName logic
- Filter orphaned scenes to exclude team scenes, stream scenes, and system scenes
- Add expected_stream_scenes to response for debugging visibility
- Improve orphaned detection accuracy for nested OBS scene structure
2025-07-22 16:46:45 -04:00
Decobus
ae171fd961 Fix status dot alignment in Footer component
- Restructure connection status layout for better hierarchy
- Move status dot to be inline with Connected/Disconnected text
- Use proper flex alignment (items-center) for dot and text
- Separate title from status indicator for cleaner UI
- Maintain consistent spacing with gap-2
2025-07-22 16:42:24 -04:00
Decobus
7302a38ceb Merge pull request 'text-background-color-source' (#10) from text-background-color-source into main
All checks were successful
Lint and Build / build (push) Successful in 2m49s
Reviewed-on: #10
2025-07-22 23:36:52 +03: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
d75f599711 Allow Twitch URL or username input in add stream form
All checks were successful
Lint and Build / build (pull_request) Successful in 2m46s
- Add extractTwitchUsername() function to parse various URL formats
- Support https://twitch.tv/username, www.twitch.tv/username, and plain usernames
- Real-time URL parsing - automatically extracts username as user types
- Updated UI labels and placeholder to indicate both input options
- Maintains existing validation and backend compatibility
- Seamless UX - users can paste full URLs or type usernames directly
2025-07-22 16:11:49 -04:00
Decobus
f80f496db5 Resolve merge conflicts in page.tsx and Footer.tsx
- Unified API response format handling to support both old and new formats
- Maintained enhanced UI layout from HEAD branch
- Preserved performance optimizations and smart polling features
- Ensured consistent error handling across components
2025-07-22 16:08:19 -04:00
Decobus
78410124a5 Merge pull request 'Footer enhancements and performance optimizations' (#9) from footer-enhancements into main
All checks were successful
Lint and Build / build (push) Successful in 2m48s
Reviewed-on: #9
2025-07-22 23:01:23 +03:00
Decobus
c1f1c17763 Update documentation to reflect recent enhancements
All checks were successful
Lint and Build / build (pull_request) Successful in 2m47s
- Updated CLAUDE.md with comprehensive recent changes:
  - Enhanced footer with team/stream counts and status indicators
  - Fixed active source detection and dropdown optimization
  - OBS text size improvements (96pt font)
  - API standardization and performance optimizations
  - System scene protection (Resources added to bypass list)
  - Improved error handling and user experience

- Updated README.md with key feature additions:
  - Enhanced footer functionality
  - Performance optimizations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 15:55:55 -04:00
Decobus
8687d19702 Add Resources scene to orphaned themes bypass check
- Added "Resources" to SYSTEM_SCENES array in verifyGroups API
- Resources scene will no longer be flagged as orphaned in OBS verification
- Prevents system scenes from showing up as cleanup candidates

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 15:54:02 -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
c8a7b83fc4 Fix dropdown optimistic updates to use correct stream group names
- Include team name prefix in optimistic update stream group generation
- Format: {team_name}_{stream_name}_stream to match backend file writes
- Prevents dropdown from reverting to wrong value after selection
- Now dropdown shows correct selection immediately without requiring page refresh

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 15:48:10 -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
5dd9707f13 Fix getActive API to use standardized response format
- Update /api/getActive to return { success: true, data: {...} } format
- Add proper error handling with standardized error responses
- Update main page to handle new response format for active sources
- Remove unused variables and clean up code
- Add trim() to file reads to handle whitespace properly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 15:04:08 -04:00
Decobus
8c2de2c66b Remove backwards compatibility for API responses
- Clean up all backward compatibility checks for old API format
- All endpoints now consistently return { success: true, data: [...] }
- Simplify response handling across all components and pages

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 14:53:57 -04:00
Decobus
423897d1bf Fix API response handling on main page
- Handle new standardized API response format for streams endpoint
- Extract data from { success: true, data: [...] } wrapper
- Maintain backward compatibility with old API format
- Fixes TypeError: streams.forEach is not a function

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 14:49:55 -04:00
Decobus
ec6ff1b570 Add team and stream counts to footer with improved layout
- Added team and stream counts displayed when OBS disconnected
- Added counts display alongside live status when OBS connected
- Moved OFFLINE/IDLE status indicators to left column for better balance
- Fixed green dot positioning to be properly next to "Connected" text
- Added custom CSS for status dots since Tailwind classes weren't applying
- Enhanced footer layout with better visual hierarchy

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 14:42:18 -04:00
Decobus
3a0c34e5a0 Reorganize footer layout by moving streaming status to left side
All checks were successful
Lint and Build / build (pull_request) Successful in 2m44s
- Moved OFFLINE/IDLE streaming status from right to left column
- Left side now shows: Connection + Host/Port + Streaming/Recording status
- Right side now shows: Scene info + Team/Stream counts (less crowded)
- Better balance of information between the two columns
- Improves readability and visual hierarchy

Footer layout now:
Left: OBS Studio (connected) + 127.0.0.1:4455 + OFFLINE/IDLE status
Right: Scene info + Teams/Streams counts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 14:37:48 -04:00
Decobus
52f3051c82 Fix status indicator dots visibility in footer
- Added custom CSS for status dots using Solarized theme colors
- Replaced Tailwind classes with custom .status-dot classes
- Fixed connection status dot (green when connected, red when disconnected)
- Fixed streaming/recording status dots (red when active, gray when idle)
- Used proper Solarized color palette for consistency

Status dots now properly display:
- Connection: Green dot for connected, red for disconnected
- Streaming: Red dot when live, gray when offline
- Recording: Red dot when recording, gray when idle

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 14:36:07 -04:00
Decobus
02cad6a319 Add team and stream counts to footer
- Created /api/counts endpoint for database statistics
- Updated footer to display team and stream counts
- Shows counts when OBS is connected (alongside OBS stats)
- Shows database stats when OBS is disconnected (fallback display)
- Polls counts every 60 seconds (less frequent than OBS status)
- Maintains backward compatibility with API response formats

Footer now shows:
- Teams: X
- Streams: Y

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 14:28:14 -04:00
Decobus
cbf8cd6516 Fix API response format compatibility on main page
The streams API now returns standardized format { success: true, data: [...] }
but the frontend was still expecting the old direct array format.

Added backward compatibility to handle both response formats:
- New format: { success: true, data: streams }
- Old format: streams (direct array)

Fixes TypeError: streams.forEach is not a function

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 14:25:46 -04:00
Decobus
7f475680ae Merge pull request 'text-background-color-source' (#8) from text-background-color-source into main
All checks were successful
Lint and Build / build (push) Successful in 2m46s
Reviewed-on: #8
2025-07-22 21:11:30 +03: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
4087a60ffa Update configuration and documentation
All checks were successful
Lint and Build / build (pull_request) Successful in 2m53s
2025-07-22 13:21:50 -04:00
Decobus
64b078557f Fix text alignment to center correctly using alignment value 0 2025-07-22 13:20:54 -04:00
Decobus
6a7ba3ae40 Merge pull request 'Add screenshot to README' (#7) from add-readme-screenshot into main
All checks were successful
Lint and Build / build (push) Successful in 4m12s
Reviewed-on: #7
2025-07-21 05:56:49 +03:00
Decobus
6f041388ca Add screenshot to README
All checks were successful
Lint and Build / build (pull_request) Successful in 4m1s
Added visual preview image to showcase the Live Stream Manager interface.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 22:55:30 -04:00
Decobus
9f7dbf6e7a Merge pull request 'Major enhancements to stream management and UI improvements' (#6) from stream-management-enhancements into main
All checks were successful
Lint and Build / build (push) Successful in 2m42s
Reviewed-on: #6
2025-07-21 05:49:01 +03:00
Decobus
3b392cd81e Update README with comprehensive API documentation and recent enhancements
All checks were successful
Lint and Build / build (pull_request) Successful in 2m46s
- Changed title to "Live Stream Manager" to match UI branding
- Updated features section with enhanced deletion, audio control, and UUID tracking
- Added detailed API endpoint documentation organized by category:
  - Stream Management (CRUD with comprehensive cleanup)
  - Source Control (with team-prefixed naming)
  - Team Management (with OBS scene synchronization)
  - OBS Group/Scene Management (UUID-based tracking)
  - System Status and Authentication
- Added Known Issues section documenting:
  - Text centering problem and workaround
  - System scene exclusion functionality
- Improved documentation accuracy to reflect current functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 22:44:38 -04:00
Decobus
43ce6534a5 Add system scene exclusion list to prevent infrastructure scenes from showing as orphaned
All checks were successful
Lint and Build / build (pull_request) Successful in 2m54s
- Added SYSTEM_SCENES array with hardcoded list of infrastructure scenes
- Updated orphaned groups detection to exclude these system scenes
- Prevents scenes containing source switchers from being flagged as orphaned
- Includes common infrastructure scenes: 1-Screen, 2-Screen, 4-Screen, Starting, Ending, Audio, Movies

This ensures that OBS infrastructure scenes are not managed by the app and won't show up as orphaned groups in the UI.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 22:40:47 -04:00
Decobus
b5933fc6bb Update CLAUDE.md with recent enhancements and known issues
All checks were successful
Lint and Build / build (pull_request) Successful in 3m4s
2025-07-20 22:30:49 -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
931813964f Merge pull request 'Auto-generate OBS source names and implement team-based stream organization' (#5) from auto-generate-obs-source-names into main
All checks were successful
Lint and Build / build (push) Successful in 2m48s
Reviewed-on: #5
2025-07-21 01:06:01 +03: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
319bada9b7 Merge pull request 'Implement UUID-based tracking for OBS groups' (#4) from obs-uuid-tracking into main
All checks were successful
Lint and Build / build (push) Successful in 2m52s
Reviewed-on: #4
2025-07-20 22:55:31 +03: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
a6e3962674 Update CLAUDE.md with comprehensive documentation of recent enhancements
Some checks failed
Lint and Build / build (pull_request) Failing after 1m39s
- Add UUID-based OBS group tracking documentation
- Document new API endpoints for stream deletion and team management
- Add toast notification system and UI improvements
- Include migration scripts and database schema updates
- Document security enhancements and validation systems
- Add comprehensive feature overview and developer guidance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 15:49:00 -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
92c05303bd Merge pull request 'Add OBS group management feature' (#3) from ui-improvements into main
All checks were successful
Lint and Build / build (push) Successful in 2m53s
Reviewed-on: #3
2025-07-20 21:46:25 +03:00
Decobus
2c92baa0a1 Fix GitHub Actions artifact upload for GHES compatibility
All checks were successful
Lint and Build / build (pull_request) Successful in 3m0s
- Downgrade upload-artifact from v4 to v3 for GHES compatibility
- Remove include-hidden-files parameter (not available in v3)

GHES doesn't support the newer v4 actions yet.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 13:21:45 -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
3c58ccc5af Add stream deletion functionality and improve UI
Some checks failed
Lint and Build / build (pull_request) Failing after 24s
- Add delete button to each stream with confirmation modal
- Implement DELETE endpoint that removes sources from OBS before database deletion
- Fix dropdown positioning issue when scrolling by removing scroll offsets
- Change add stream form to use Twitch username instead of full URL
- Automatically calculate Twitch URL from username (https://twitch.tv/{username})
- Add username validation (4-25 chars, alphanumeric and underscores only)
- Improve "View Stream" link visibility with button styling
- Ensure streams list refreshes immediately after deletion

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-20 13:16:06 -04:00