2.4 KiB
2.4 KiB
ytLive — AI Guide
Run
dotnet build # Windows only — WPF requires Windows target
dotnet run
Note: EnableWindowsTargeting=true is set in ytLive.csproj, so the project can be restored/built from WSL, but running requires Windows.
Tests
No test framework set up yet. When added: dotnet test.
Architecture
C# / WPF (.NET 8) following MVVM:
| Path | Role |
|---|---|
Models/ |
Plain data types — Scene, Source, StreamConfig, StreamHealth, YouTubeChannel, ChatMessage |
ViewModels/ |
MainViewModel — exposes collections + commands for the UI |
Services/ |
YouTube OAuth2, stream/broadcast management, live chat polling |
Helpers/ |
ViewModelBase (INotifyPropertyChanged), RelayCommand |
MainWindow.xaml |
Dark theme; layout: top bar (controls), center (preview), left (scenes/sources), right (chat), bottom (health) |
Key patterns
ViewModelBase.SetProperty<T>()for property change notificationsRelayCommandfor all button actions; commands gate on state (e.g. Start only when Offline)- ViewModels are constructed in XAML (
<vm:MainViewModel/>as DataContext) - Services are currently instantiated in MainViewModel's constructor — no DI container yet
Current limitations / TODOs
YouTubeAuthServiceconstructor takes empty client ID/secret strings — needs Google Cloud credentialsStartStreamis a stub (Task.Delay simulation)ConnectYouTubeis a stub- Preview panel is placeholder text
- No capture/encoding/RTMP yet
- No persistence layer (tokens, scenes, stream config all in-memory)
Design Principle
This software is so intuitive that even the most right-brained person can easily intuit and use it.
Apply this to every UI decision:
- One-click go-live with working defaults
- Prefilled YouTube defaults (RTMP URL, bitrate, resolution, latency)
- Visual/drag-and-drop scene building over property panels
- Every action produces a visible outcome — no dead ends
Auth gates Go Live, but not exploration
The app is fully usable without authentication: users can build scenes, add sources, compose previews, and audition the software with zero commitment. But going live requires authentication — it's the one capability gated behind YouTube sign-in. The sign-in button should never pressure the user ("sign in (optional)", not a modal wall), but "Go Live" only appears once connected.