How unknownskl/greenlight works
Greenlight is a cross-platform Electron client for Xbox home streaming and xCloud. The principal workflow is: a user authenticates, browses Xbox or Game Pass content, starts a home/cloud session, negotiates streaming, and controls the rendered game with gamepad or keyboard input. The legacy desktop runtime is best evidenced here; desktop-v3 and the platform/player packages provide a newer tRPC-oriented path. Some IPC and renderer wiring is inferred only from filenames and sampled call sites, so uncertain links are omitted.
Main entry points: application.ts Electron Application · ipc.ts IPC Channels · index.ts Platform Router · authentication.ts Authentication
Components 23
Desktop Runtime
- Electron Application
packages/desktop/main/application.ts - Desktop UI
packages/desktop/renderer/pages/home.tsx - IPC Channels
packages/desktop/main/ipc.ts - Web UI
packages/desktop/main/webui.ts
Identity And Data
- Authentication
packages/desktop/main/authentication.ts - Token Store
packages/desktop/main/helpers/tokenstore.ts - Settings Store
packages/desktop/main/application.ts - Friends Worker
packages/desktop/main/helpers/xboxWorker.ts - Title Manager
packages/desktop/main/helpers/titlemanager.ts
Streaming
- Stream Manager
packages/desktop/main/helpers/streammanager.ts - xCloud API
packages/desktop/main/helpers/xcloudapi.ts - Stream Player
packages/player/src/client/lib/player.ts - Input Channels
packages/player/src/client/lib/channel/channel.ts
Platform Services
- Platform Router
packages/platform/src/index.ts - Platform Auth
packages/platform/src/controller/auth.ts - Game Pass API
packages/platform/src/controller/gamepass.ts - Profile API
packages/platform/src/controller/profile.ts - Smartglass API
packages/platform/src/controller/smartglass.ts - Cloudflare Worker
packages/platform/src/worker.ts
Other components
- Player
- Xbox Services
- xCloud Services
- Game Pass Catalog
Connections 31
- Player → Desktop UI: uses
- Electron Application → Desktop UI: opens
- Electron Application → IPC Channels: starts
- Electron Application → Authentication: creates
- Electron Application → Web UI: initializes
- Electron Application → Settings Store: reads/writes
- Desktop UI → IPC Channels: invokes
- IPC Channels → Authentication: dispatches
- Authentication → Token Store: stores tokens
- Authentication → Xbox Services: authenticates
- Electron Application → Friends Worker: starts
- Friends Worker → Xbox Services: loads friends
- IPC Channels → Settings Store: updates
- IPC Channels → Title Manager: queries
- Title Manager → Game Pass Catalog: hydrates titles
- IPC Channels → Stream Manager: dispatches
- Stream Manager → xCloud API: starts streams
- Stream Manager → Authentication: gets tokens
- xCloud API → xCloud Services: controls session
- Desktop UI → Stream Player: renders stream
- Stream Player → Input Channels: sends input
- Input Channels → xCloud Services: controls game
- Cloudflare Worker → Platform Router: serves requests
- Platform Router → Platform Auth: routes auth
- Platform Router → Game Pass API: routes catalog
- Platform Router → Profile API: routes profile
- Platform Router → Smartglass API: routes streaming
- Platform Auth → Xbox Services: requests tokens
- Game Pass API → Game Pass Catalog: loads titles
- Profile API → Xbox Services: loads profile
- Smartglass API → xCloud Services: starts streams