# rokudev/scenegraph-master-sample architecture

> Architecture diagram of the GitHub repository rokudev/scenegraph-master-sample, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rokudev/scenegraph-master-sample
- Repository: https://github.com/rokudev/scenegraph-master-sample

## Overview

This repository is a set of Roku SceneGraph channel samples, with DeepLinking showing the broadest feature set and sibling directories presenting narrower or incremental examples. The likely user journey is browsing a content grid, opening details or episodes, and playing a selected video; the tree also identifies deep linking, bookmarks, subscriptions, and video ads as distinct capabilities. No source excerpts were provided, so runtime relationships below are tentative and marked dashed without evidence paths; the README describes the sample’s purpose but not its internal call flow.

Main entry points: [`DeepLinking/components/MainScene.brs`](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/MainScene.brs) (Main scene), [`DeepLinking/components/UILogic/VideoPlayerLogic.brs`](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/VideoPlayerLogic.brs) (Player logic), [`DeepLinking/components/UILogic/GridScreenLogic.brs`](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/GridScreenLogic.brs) (Content grid), [`DeepLinking/components/UILogic/DetailsScreenLogic.brs`](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/DetailsScreenLogic.brs) (Details view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Channel entry"]
  node_scene["Main scene<br/>[MainScene.brs]"]
  node_entry["Channel entry<br/>[main.brs]"]
  node_loader["Content loader<br/>[MainLoaderTask.brs]"]
end

subgraph group_browsing["Browse and navigate"]
  node_grid["Content grid"]
  node_gridview["Grid view<br/>[GridScreen.brs]"]
  node_details["Details view"]
  node_episodes["Episodes view"]
  node_stack["Screen stack"]
end

subgraph group_playback["Playback"]
  node_playerlogic["Player logic"]
  node_playerscreen["Video screen<br/>[VideoScreen.brs]"]
  node_playertask["Player task<br/>[PlayerTask.brs]"]
end

subgraph group_capabilities["Channel capabilities"]
  node_deeplink["Deep linking"]
  node_bookmarks["Bookmarks<br/>[BookmarksLogic.brs]"]
  node_smartbookmarks["Smart bookmarks"]
  node_subscriptions["Subscriptions"]
  node_ads["Video ads"]
end

node_viewer(("Viewer"))

node_viewer -.->|"opens channel"| node_scene
node_scene -.->|"loads content"| node_loader
node_scene -.->|"shows catalog"| node_grid
node_grid -.->|"renders grid"| node_gridview
node_grid -.->|"opens details"| node_details
node_details -.->|"opens episodes"| node_episodes
node_scene -.->|"tracks screens"| node_stack
node_details -.->|"starts playback"| node_playerlogic
node_episodes -.->|"starts playback"| node_playerlogic
node_playerlogic -.->|"controls screen"| node_playerscreen
node_playerlogic -.->|"starts task"| node_playertask
node_scene -.->|"handles links"| node_deeplink
node_scene -.->|"uses bookmarks"| node_bookmarks
node_scene -.->|"uses bookmarks"| node_smartbookmarks
node_playerlogic -.->|"checks access"| node_subscriptions
node_playerlogic -.->|"supports ads"| node_ads

click node_scene "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/MainScene.brs"
click node_entry "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/source/main.brs"
click node_loader "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/tasks/MainLoaderTask.brs"
click node_grid "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/GridScreenLogic.brs"
click node_gridview "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/GridScreen/GridScreen.brs"
click node_details "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/DetailsScreenLogic.brs"
click node_episodes "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/EpisodesScreenLogic.brs"
click node_stack "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/ScreenStackLogic.brs"
click node_playerlogic "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/VideoPlayerLogic.brs"
click node_playerscreen "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/VideoScreen/VideoScreen.brs"
click node_playertask "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/tasks/PlayerTask.brs"
click node_deeplink "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/DeepLinkingLogic.brs"
click node_bookmarks "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/BookmarksLogic.brs"
click node_smartbookmarks "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/SmartBookmarksLogic.brs"
click node_subscriptions "https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/SubscriptionLogic.brs"
click node_ads "https://github.com/rokudev/scenegraph-master-sample/blob/master/VideoAds/components/UILogic/VideoPlayerLogic.brs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_scene,node_entry,node_loader,node_viewer toneBlue
class node_grid,node_gridview,node_details,node_episodes,node_stack toneAmber
class node_playerlogic,node_playerscreen,node_playertask toneMint
class node_deeplink,node_bookmarks,node_smartbookmarks,node_subscriptions,node_ads toneRose
```

## Components

### Channel entry

- [Main scene](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/MainScene.brs): `DeepLinking/components/MainScene.brs`
- [Channel entry](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/source/main.brs): `DeepLinking/source/main.brs`
- [Content loader](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/tasks/MainLoaderTask.brs): `DeepLinking/components/tasks/MainLoaderTask.brs`

### Browse and navigate

- [Content grid](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/GridScreenLogic.brs): `DeepLinking/components/UILogic/GridScreenLogic.brs`
- [Grid view](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/GridScreen/GridScreen.brs): `DeepLinking/components/GridScreen/GridScreen.brs`
- [Details view](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/DetailsScreenLogic.brs): `DeepLinking/components/UILogic/DetailsScreenLogic.brs`
- [Episodes view](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/EpisodesScreenLogic.brs): `DeepLinking/components/UILogic/EpisodesScreenLogic.brs`
- [Screen stack](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/ScreenStackLogic.brs): `DeepLinking/components/UILogic/ScreenStackLogic.brs`

### Playback

- [Player logic](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/VideoPlayerLogic.brs): `DeepLinking/components/UILogic/VideoPlayerLogic.brs`
- [Video screen](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/VideoScreen/VideoScreen.brs): `DeepLinking/components/VideoScreen/VideoScreen.brs`
- [Player task](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/tasks/PlayerTask.brs): `DeepLinking/components/tasks/PlayerTask.brs`

### Channel capabilities

- [Deep linking](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/DeepLinkingLogic.brs): `DeepLinking/components/UILogic/DeepLinkingLogic.brs`
- [Bookmarks](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/BookmarksLogic.brs): `DeepLinking/components/UILogic/BookmarksLogic.brs`
- [Smart bookmarks](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/SmartBookmarksLogic.brs): `DeepLinking/components/UILogic/SmartBookmarksLogic.brs`
- [Subscriptions](https://github.com/rokudev/scenegraph-master-sample/blob/master/DeepLinking/components/UILogic/SubscriptionLogic.brs): `DeepLinking/components/UILogic/SubscriptionLogic.brs`
- [Video ads](https://github.com/rokudev/scenegraph-master-sample/blob/master/VideoAds/components/UILogic/VideoPlayerLogic.brs): `VideoAds/components/UILogic/VideoPlayerLogic.brs`

### Other components

- **Viewer**

## Connections

- Viewer → Main scene: opens channel
- Main scene → Content loader: loads content
- Main scene → Content grid: shows catalog
- Content grid → Grid view: renders grid
- Content grid → Details view: opens details
- Details view → Episodes view: opens episodes
- Main scene → Screen stack: tracks screens
- Details view → Player logic: starts playback
- Episodes view → Player logic: starts playback
- Player logic → Video screen: controls screen
- Player logic → Player task: starts task
- Main scene → Deep linking: handles links
- Main scene → Bookmarks: uses bookmarks
- Main scene → Smart bookmarks: uses bookmarks
- Player logic → Subscriptions: checks access
- Player logic → Video ads: supports ads
