# gbyo/tilecast architecture

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

- Interactive diagram: https://gitdiagram.com/gbyo/tilecast
- Repository: https://github.com/gbyo/tilecast

## Overview

Tilecast is a self-hosted digital-signage product: teams author and schedule content in Studio, the server resolves what should play, and paired players render it on screens while reporting activity and health. The graph also includes reusable data sources, widgets, plugin installation, and operational interfaces. README statements establish the overall product flow and capabilities; sampled source confirms selected preview, scheduling, player-runtime, extension, and activity relationships. Many listed subsystems were not sampled, so their internal connections are omitted rather than inferred.

Main entry points: [`apps/dashboard/src/App.tsx`](https://github.com/gbyo/tilecast/blob/main/apps/dashboard/src/App.tsx) (Tilecast Studio), [`apps/server/internal/httpapi/routes.go`](https://github.com/gbyo/tilecast/blob/main/apps/server/internal/httpapi/routes.go) (HTTP API), [`apps/player-android/app/src/main/java/org/tilecast/player/MainActivity.kt`](https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/MainActivity.kt) (Android player host), [`apps/dashboard/src/components/content`](https://github.com/gbyo/tilecast/tree/main/apps/dashboard/src/components/content) (Content and widgets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_studio["Studio authoring"]
  node_studio["Tilecast Studio<br/>[App.tsx]"]
  node_content["Content and widgets"]
  node_layouts["Layouts and playlists"]
  node_scheduling["Schedule authoring"]
  node_fleet["Screen fleet<br/>[fleet.ts]"]
  node_api["Dashboard API client<br/>[client.ts]"]
end

subgraph group_server["Server services"]
  node_server["HTTP API<br/>[routes.go]"]
  node_scheduler["Schedule resolver<br/>[engine.go]"]
  node_media[("Media storage<br/>[storage.go]")]
  node_extensions["Extension pipeline<br/>[pipeline.go]"]
end

subgraph group_player["Player runtime"]
  node_runtime["Playback controller<br/>[controller.ts]"]
  node_presentation["Presentation machine"]
  node_android["Android player host<br/>[MainActivity.kt]"]
  node_androidviewmodel["Android player state<br/>[PlayerViewModel.kt]"]
  node_androidrenderer["Android renderer"]
  node_reliability["Player reliability"]
  node_webactivity["Web player activity<br/>[engine.ts]"]
  node_outbox[("Durable activity outbox<br/>[outbox.ts]")]
end

subgraph group_ecosystem["Extensions and tools"]
  node_widgetsdk["Widget SDK<br/>[manifest.ts]"]
  node_plugins["Optional plugins"]
  node_cli["Command-line client<br/>[main.go]"]
  node_browser["Browser companion<br/>[background.ts]"]
end

node_team(("Team operator"))
node_screens(("Signage screens"))
node_database[("Server database")]

node_team -->|"authors content"| node_studio
node_studio -->|"edits content"| node_content
node_studio -->|"builds layouts"| node_layouts
node_studio -->|"schedules playback"| node_scheduling
node_studio -->|"manages screens"| node_fleet
node_studio -.->|"uses API"| node_api
node_api -.->|"sends requests"| node_server
node_server -.->|"resolves schedules"| node_scheduler
node_server -.->|"stores media"| node_media
node_server -.->|"activates packages"| node_extensions
node_server -.->|"persists state"| node_database
node_server -->|"serves players"| node_screens
node_scheduler -.->|"selects playback"| node_screens
node_screens -->|"runs player"| node_android
node_android -->|"uses state"| node_androidviewmodel
node_android -->|"uses renderer"| node_androidrenderer
node_android -->|"uses reliability"| node_reliability
node_runtime -->|"dispatches playback"| node_presentation
node_screens -.->|"records activity"| node_webactivity
node_webactivity -->|"queues events"| node_outbox
node_content -->|"previews widgets"| node_widgetsdk
node_team -.->|"operates system"| node_cli
node_team -.->|"uses companion"| node_browser
node_extensions -->|"installs plugins"| node_plugins

click node_studio "https://github.com/gbyo/tilecast/blob/main/apps/dashboard/src/App.tsx"
click node_content "https://github.com/gbyo/tilecast/tree/main/apps/dashboard/src/components/content"
click node_layouts "https://github.com/gbyo/tilecast/tree/main/apps/dashboard/src/components/layout-editor"
click node_scheduling "https://github.com/gbyo/tilecast/tree/main/apps/dashboard/src/components/schedules"
click node_fleet "https://github.com/gbyo/tilecast/blob/main/apps/dashboard/src/api/domains/fleet.ts"
click node_api "https://github.com/gbyo/tilecast/blob/main/apps/dashboard/src/api/client.ts"
click node_server "https://github.com/gbyo/tilecast/blob/main/apps/server/internal/httpapi/routes.go"
click node_scheduler "https://github.com/gbyo/tilecast/blob/main/apps/server/internal/scheduling/engine.go"
click node_media "https://github.com/gbyo/tilecast/blob/main/apps/server/internal/media/storage.go"
click node_extensions "https://github.com/gbyo/tilecast/blob/main/apps/server/internal/extensions/pipeline/pipeline.go"
click node_runtime "https://github.com/gbyo/tilecast/blob/main/packages/player-runtime/src/engine/controller.ts"
click node_presentation "https://github.com/gbyo/tilecast/blob/main/packages/player-runtime/src/engine/presentation-machine.ts"
click node_android "https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/MainActivity.kt"
click node_androidviewmodel "https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/PlayerViewModel.kt"
click node_androidrenderer "https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/core/WebViewCoreRenderer.kt"
click node_reliability "https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/reliability/ReliabilityController.kt"
click node_webactivity "https://github.com/gbyo/tilecast/blob/main/apps/player-web/src/activity/engine.ts"
click node_outbox "https://github.com/gbyo/tilecast/blob/main/apps/player-web/src/activity/outbox.ts"
click node_widgetsdk "https://github.com/gbyo/tilecast/blob/main/packages/widget-sdk/src/manifest.ts"
click node_plugins "https://github.com/gbyo/tilecast/tree/main/plugins"
click node_cli "https://github.com/gbyo/tilecast/blob/main/apps/cli/cmd/tilecast/main.go"
click node_browser "https://github.com/gbyo/tilecast/blob/main/apps/browser-companion/src/background.ts"

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_studio,node_content,node_layouts,node_scheduling,node_fleet,node_api,node_screens toneBlue
class node_server,node_scheduler,node_media,node_extensions,node_database toneAmber
class node_runtime,node_presentation,node_android,node_androidviewmodel,node_androidrenderer,node_reliability,node_webactivity,node_outbox toneMint
class node_widgetsdk,node_plugins,node_cli,node_browser toneRose
class node_team toneIndigo
```

## Components

### Studio authoring

- [Tilecast Studio](https://github.com/gbyo/tilecast/blob/main/apps/dashboard/src/App.tsx): `apps/dashboard/src/App.tsx`
- [Content and widgets](https://github.com/gbyo/tilecast/tree/main/apps/dashboard/src/components/content): `apps/dashboard/src/components/content`
- [Layouts and playlists](https://github.com/gbyo/tilecast/tree/main/apps/dashboard/src/components/layout-editor): `apps/dashboard/src/components/layout-editor`
- [Schedule authoring](https://github.com/gbyo/tilecast/tree/main/apps/dashboard/src/components/schedules): `apps/dashboard/src/components/schedules`
- [Screen fleet](https://github.com/gbyo/tilecast/blob/main/apps/dashboard/src/api/domains/fleet.ts): `apps/dashboard/src/api/domains/fleet.ts`
- [Dashboard API client](https://github.com/gbyo/tilecast/blob/main/apps/dashboard/src/api/client.ts): `apps/dashboard/src/api/client.ts`

### Server services

- [HTTP API](https://github.com/gbyo/tilecast/blob/main/apps/server/internal/httpapi/routes.go): `apps/server/internal/httpapi/routes.go`
- [Schedule resolver](https://github.com/gbyo/tilecast/blob/main/apps/server/internal/scheduling/engine.go): `apps/server/internal/scheduling/engine.go`
- [Media storage](https://github.com/gbyo/tilecast/blob/main/apps/server/internal/media/storage.go): `apps/server/internal/media/storage.go`
- [Extension pipeline](https://github.com/gbyo/tilecast/blob/main/apps/server/internal/extensions/pipeline/pipeline.go): `apps/server/internal/extensions/pipeline/pipeline.go`

### Player runtime

- [Playback controller](https://github.com/gbyo/tilecast/blob/main/packages/player-runtime/src/engine/controller.ts): `packages/player-runtime/src/engine/controller.ts`
- [Presentation machine](https://github.com/gbyo/tilecast/blob/main/packages/player-runtime/src/engine/presentation-machine.ts): `packages/player-runtime/src/engine/presentation-machine.ts`
- [Android player host](https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/MainActivity.kt): `apps/player-android/app/src/main/java/org/tilecast/player/MainActivity.kt`
- [Android player state](https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/PlayerViewModel.kt): `apps/player-android/app/src/main/java/org/tilecast/player/PlayerViewModel.kt`
- [Android renderer](https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/core/WebViewCoreRenderer.kt): `apps/player-android/app/src/main/java/org/tilecast/player/core/WebViewCoreRenderer.kt`
- [Player reliability](https://github.com/gbyo/tilecast/blob/main/apps/player-android/app/src/main/java/org/tilecast/player/reliability/ReliabilityController.kt): `apps/player-android/app/src/main/java/org/tilecast/player/reliability/ReliabilityController.kt`
- [Web player activity](https://github.com/gbyo/tilecast/blob/main/apps/player-web/src/activity/engine.ts): `apps/player-web/src/activity/engine.ts`
- [Durable activity outbox](https://github.com/gbyo/tilecast/blob/main/apps/player-web/src/activity/outbox.ts): `apps/player-web/src/activity/outbox.ts`

### Extensions and tools

- [Widget SDK](https://github.com/gbyo/tilecast/blob/main/packages/widget-sdk/src/manifest.ts): `packages/widget-sdk/src/manifest.ts`
- [Optional plugins](https://github.com/gbyo/tilecast/tree/main/plugins): `plugins`
- [Command-line client](https://github.com/gbyo/tilecast/blob/main/apps/cli/cmd/tilecast/main.go): `apps/cli/cmd/tilecast/main.go`
- [Browser companion](https://github.com/gbyo/tilecast/blob/main/apps/browser-companion/src/background.ts): `apps/browser-companion/src/background.ts`

### Other components

- **Team operator**
- **Signage screens**
- **Server database**

## Connections

- Team operator → Tilecast Studio: authors content (evidence: `README.md`)
- Tilecast Studio → Content and widgets: edits content (evidence: `README.md`)
- Tilecast Studio → Layouts and playlists: builds layouts (evidence: `README.md`)
- Tilecast Studio → Schedule authoring: schedules playback (evidence: `README.md`)
- Tilecast Studio → Screen fleet: manages screens (evidence: `README.md`)
- Tilecast Studio → Dashboard API client: uses API
- Dashboard API client → HTTP API: sends requests
- HTTP API → Schedule resolver: resolves schedules
- HTTP API → Media storage: stores media
- HTTP API → Extension pipeline: activates packages
- HTTP API → Server database: persists state
- HTTP API → Signage screens: serves players (evidence: `README.md`)
- Schedule resolver → Signage screens: selects playback
- Signage screens → Android player host: runs player (evidence: `README.md`)
- Android player host → Android player state: uses state (evidence: `apps/player-android/app/src/main/java/org/tilecast/player/MainActivity.kt`)
- Android player host → Android renderer: uses renderer (evidence: `apps/player-android/app/src/main/java/org/tilecast/player/MainActivity.kt`)
- Android player host → Player reliability: uses reliability (evidence: `apps/player-android/app/src/main/java/org/tilecast/player/MainActivity.kt`)
- Playback controller → Presentation machine: dispatches playback (evidence: `packages/player-runtime/src/engine/controller.ts`)
- Signage screens → Web player activity: records activity
- Web player activity → Durable activity outbox: queues events (evidence: `apps/player-web/src/activity/engine.ts`)
- Content and widgets → Widget SDK: previews widgets (evidence: `apps/dashboard/src/components/content/widget-editor/preview/useComponentPreview.ts`)
- Team operator → Command-line client: operates system
- Team operator → Browser companion: uses companion
- Extension pipeline → Optional plugins: installs plugins (evidence: `apps/server/internal/extensions/pipeline/pipeline.go`)
