-
Notifications
You must be signed in to change notification settings - Fork 4
Architecture Overview
LeGeRyChEeSe edited this page Aug 9, 2025
·
3 revisions
Technical overview of Sunshine-AIO's system design and component architecture.
Sunshine-AIO is a Python-based automation tool that orchestrates the installation and configuration of multiple streaming components:
graph TB
User[User] --> Script[PowerShell Installer]
Script --> Python[Python Environment]
Python --> Core[Sunshine-AIO Core]
Core --> Sunshine[Sunshine Server]
Core --> VDD[Virtual Display Driver]
Core --> SVM[Sunshine Virtual Monitor]
Core --> Playnite[Playnite + Watcher]
Sunshine --> Client[Moonlight Clients]
VDD --> Display[Virtual Displays]
SVM --> Scripts[PowerShell Scripts]
Playnite --> Games[Game Libraries]
sequenceDiagram
participant U as User
participant PS as PowerShell Script
participant P as Python
participant C as Components
U->>PS: Execute installation command
PS->>PS: Install Python/Git if needed
PS->>P: Create virtual environment
P->>P: Download Sunshine-AIO
P->>U: Present component menu
U->>P: Select components
P->>C: Install selected components
C->>U: Configuration complete
- PowerShell Web Script: Entry point from sunshine-aio.com
- Python Environment: Isolated virtual environment for dependencies
- Component Installers: Automated downloaders and installers
- Configuration Managers: Setup and configuration automation
- Official Sunshine: Main streaming server application
- Windows Service: Background service for continuous operation
- Web Interface: Configuration UI at https://localhost:47990
- Application Management: Game and app launching system
- IDD Sample Driver: Microsoft's virtual display driver
- VDD Control: Tool for driver management
- Display Profiles: Custom resolution and HDR configurations
- Multi-monitor Support: Multiple virtual displays
- Playnite: Universal game library manager
- Platform Support: Steam, Epic, GOG, Xbox Game Pass, etc.
- Fullscreen Mode: Controller-optimized interface
- Playnite Watcher: Streaming integration enhancements
Sunshine-AIO/
โโโ src/ # Python source code
โ โโโ main.py # Main entry point
โ โโโ misc/ # Core modules
โ โ โโโ Config.py # Download and installation
โ โ โโโ SystemRequests.py # System operations
โ โ โโโ MenuHandler.py # User interface
โ โ โโโ variables/ # Configuration data
โ โโโ tools/ # Downloaded components
โโโ requirements.txt # Python dependencies
โโโ install.ps1 # Local PowerShell installer
โโโ README.md # Documentation
Sunshine-AIO maintains detailed records of all installed components:
- Installation paths and metadata
- Registry entries and services created
- Files and directories added
- Rollback information for clean uninstall
- Sunshine: Automatic service configuration and firewall setup
- VDD: Driver installation and virtual display creation
- Playnite: Fullscreen mode optimization for streaming
- Integration: Cross-component configuration coordination
Host PC (Sunshine-AIO) Client Device (Moonlight)
โโโ Sunshine Service โโโ Moonlight Client
โโโ Port 47989 (Stream) โโโโโโโโ Stream Reception
โโโ Port 47990 (Web UI) โโโ Input Capture
โโโ Virtual Display โโโ Audio/Video Output
- Port Forwarding: Router configuration for external access
- Dynamic DNS: Domain mapping for remote connections
- Authentication: Secure access with certificates and passwords
- Encryption: HTTPS/TLS for all communications
- Verified Downloads: Official sources with integrity checking
- Administrator Privileges: Required only for system components
- Isolated Environment: Python virtual environment isolation
- Clean Uninstall: Complete removal tracking
- Service Security: Sunshine runs as Windows service
- Network Security: Encrypted communications by default
- Access Control: Authentication for remote connections
- Certificate Management: Automatic SSL certificate generation
- Hardware Encoding: Automatic GPU encoder detection (NVENC/AMF)
- Network Adaptation: Bitrate adjustment based on connection
- Low Latency: Optimized capture and encoding pipeline
- Multi-client Support: Virtual display separation
- Minimal Footprint: Python virtual environment isolation
- Background Operation: Windows service for always-on streaming
- Resource Management: Automatic cleanup and optimization
- Update System: Incremental updates without full reinstall
- Python 3.8+: Main automation language
- PowerShell: Windows integration and scripting
- Sunshine: C++ streaming server (NVIDIA GameStream protocol)
- Moonlight: Client applications (various platforms)
- IDD Sample Driver: Microsoft virtual display driver
- Playnite: C# game library manager
- Multi Monitor Tool: Display management utility
- Various PowerShell Scripts: Display automation
- Web Script Download: PowerShell downloads from sunshine-aio.com
- Environment Setup: Python and Git installation if needed
- Repository Clone: Latest Sunshine-AIO from GitHub
- Component Selection: User chooses installation components
- Automated Installation: Each component installer runs
- Configuration: Automatic setup and optimization
- Verification: Test installations and create shortcuts
- Service Start: Sunshine service begins on Windows boot
- Client Connection: Moonlight discovers and connects to host
- Authentication: Certificate and password verification
- Display Capture: Virtual or physical display streaming
- Encoding: Hardware-accelerated video compression
- Network Transmission: Encrypted stream to client
- Input Relay: Client input sent back to host
The architecture supports easy addition of new streaming components:
- Component Class: Implement standard installer interface
- Menu Integration: Add to component selection menu
- Configuration: Define setup and optimization parameters
- Testing: Verify integration with existing components
- Cloud Integration: Remote configuration and monitoring
- Plugin System: Community-contributed components
- Advanced Analytics: Performance monitoring and optimization
For implementation details, see the source code at GitHub