Data model#
A streamer’s configuration is not free-form JSON. It is generated from a shared
model of YAML type definitions in model/, and both consumers are generated
from it: the site reads the TypeScript types, the GUI reads the Go ones. That
is why a config the GUI writes is always one the site can read.
The types below are that model. Each one shows the fields with their constraints, then the declaration it becomes in each language.
- struct LocaleName#
- Display:
Locale Name
One world’s display name in a single locale.
- field locale#
- Display:
Locale
- Type:
string- Required:
yes
- Primary key:
False
- Unique:
False
- Min length:
1
The locale code this name is written in (e.g. “en”, “de”).
- field name#
- Display:
Name
- Type:
string- Required:
yes
- Primary key:
False
- Unique:
False
- Min length:
1
The world’s display name in this locale.
- struct ScheduleEnd#
- Display:
Schedule End
A stream’s end window: the earliest and latest times of day it may end. Either may be unset. An end time at or before the stream’s start is read as landing the following day.
- field earliest#
- Display:
Earliest
- Type:
time- Required:
no
- Primary key:
False
- Unique:
False
- Window:
ClockWindow(start=’09:00’, end=’21:00’)
Earliest time of day the stream may end. Unset when not given.
- field latest#
- Display:
Latest
- Type:
time- Required:
no
- Primary key:
False
- Unique:
False
- Window:
ClockWindow(start=’09:00’, end=’21:00’)
Latest time of day the stream may end. Unset when not given.
- type ScheduleEnd struct#
- earliest mdl.Optional[mdl.TimeOfDay]#
Earliest time of day the stream may end. Unset when not given.
- latest mdl.Optional[mdl.TimeOfDay]#
Latest time of day the stream may end. Unset when not given.
- struct Site#
- Display:
Site
The site identity section of streamer-config.json.
- field stream_name#
- Display:
Stream Name
- Type:
string- Required:
yes
- Primary key:
False
- Unique:
False
The name the stream is referred to as. For example, DougDoug’s stream is called “The Academy”.
- field streamer#
- Display:
Streamer
- Type:
string- Required:
yes
- Primary key:
False
- Unique:
False
The screen name, stage name or name of the streamer.
- field logo#
- Display:
Logo
- Type:
string- Required:
no
- Primary key:
False
- Unique:
False
Image shown in the site header to the left of the stream name. Copied into the config’s assets/ directory and served as /assets/<name>.
- field title_font#
- Display:
Title Font
- Type:
string- Required:
no
- Primary key:
False
- Unique:
False
Font for the site name in the header and for headings. Copied into the config’s assets/ directory and served as /assets/<name>.
- field text_font#
- Display:
Text Font
- Type:
string- Required:
no
- Primary key:
False
- Unique:
False
Font for body text. Copied into the config’s assets/ directory and served as /assets/<name>.
- class Site#
- stream_name: str#
The name the stream is referred to as. For example, DougDoug’s stream is called “The Academy”.
- logo: str | None#
Image shown in the site header to the left of the stream name. Copied into the config’s assets/ directory and served as /assets/<name>.
- interface Site#
- Site.stream_name#
- Type:
The name the stream is referred to as. For example, DougDoug’s stream is called “The Academy”.
- Site.logo#
- Type:
string| null
Image shown in the site header to the left of the stream name. Copied into the config’s assets/ directory and served as /assets/<name>.
- type Site struct#
- stream_name string#
The name the stream is referred to as. For example, DougDoug’s stream is called “The Academy”.
- logo mdl.Optional[string]#
Image shown in the site header to the left of the stream name. Copied into the config’s assets/ directory and served as /assets/<name>.
- title_font mdl.Optional[string]#
Font for the site name in the header and for headings. Copied into the config’s assets/ directory and served as /assets/<name>.
- text_font mdl.Optional[string]#
Font for body text. Copied into the config’s assets/ directory and served as /assets/<name>.
- struct Theme#
- Display:
Theme
The per-mode color override layer. Tokens are app.css custom-property names without the leading “–” (e.g. “primary-bg”) mapped to their hex value.
- field light#
- Display:
Light
- Type:
map[string,string]- Required:
no
- Primary key:
False
- Unique:
False
Token-to-hex overrides applied in light mode.
- field dark#
- Display:
Dark
- Type:
map[string,string]- Required:
no
- Primary key:
False
- Unique:
False
Token-to-hex overrides applied in dark mode.
- enum Weekday#
- Display:
Weekday
- Tag type:
str
A day of the week a stream may be scheduled on. The member names are the keys used in the schedule, so a typo fails validation instead of silently producing an empty day.
- value monday#
- Display:
Monday
- Value:
monday
Monday.
- value tuesday#
- Display:
Tuesday
- Value:
tuesday
Tuesday.
- value wednesday#
- Display:
Wednesday
- Value:
wednesday
Wednesday.
- value thursday#
- Display:
Thursday
- Value:
thursday
Thursday.
- value friday#
- Display:
Friday
- Value:
friday
Friday.
- value saturday#
- Display:
Saturday
- Value:
saturday
Saturday.
- value sunday#
- Display:
Sunday
- Value:
sunday
Sunday.
- const Weekday#
- Weekday.monday#
- Value:
"monday"
Monday.
- Weekday.tuesday#
- Value:
"tuesday"
Tuesday.
- Weekday.wednesday#
- Value:
"wednesday"
Wednesday.
- Weekday.thursday#
- Value:
"thursday"
Thursday.
- Weekday.friday#
- Value:
"friday"
Friday.
- Weekday.saturday#
- Value:
"saturday"
Saturday.
- Weekday.sunday#
- Value:
"sunday"
Sunday.
- struct Stream#
- Display:
Stream
A single streaming session: when it starts, its end window, the game and platform played, and the world it takes place in.
- field start#
- Display:
Start
- Type:
time- Required:
yes
- Primary key:
False
- Unique:
False
- Window:
ClockWindow(start=’09:00’, end=’21:00’)
The time of day the stream starts. A bare hour is read inside the 9:00-21:00 window, so 7 means 7:00 PM.
- field end#
- Display:
End
- Type:
- Required:
yes
- Primary key:
False
- Unique:
False
The end window (earliest/latest) for this stream.
- field game#
- Display:
Game
- Type:
string- Required:
yes
- Primary key:
False
- Unique:
False
The game played during this stream.
- field platform#
- Display:
Platform
- Type:
string- Required:
no
- Primary key:
False
- Unique:
False
The platform the game is played on. Optional. Ex. Java, Bedrock, XBox, PC
- field world#
- Display:
World
- Type:
string- Required:
no
- Primary key:
False
- Unique:
False
The world this stream takes place in. When set it must be a defined world key or the website build fails schedule validation. Optional.
- class Stream#
- start: time#
The time of day the stream starts. A bare hour is read inside the 9:00-21:00 window, so 7 means 7:00 PM.
- end: ScheduleEnd#
The end window (earliest/latest) for this stream.
- interface Stream#
- Stream.start#
- Type:
The time of day the stream starts. A bare hour is read inside the 9:00-21:00 window, so 7 means 7:00 PM.
- Stream.end#
- Type:
The end window (earliest/latest) for this stream.
- type Stream struct#
- start mdl.TimeOfDay#
The time of day the stream starts. A bare hour is read inside the 9:00-21:00 window, so 7 means 7:00 PM.
- end ScheduleEnd#
The end window (earliest/latest) for this stream.
- platform mdl.Optional[string]#
The platform the game is played on. Optional. Ex. Java, Bedrock, XBox, PC
- world mdl.Optional[string]#
The world this stream takes place in. When set it must be a defined world key or the website build fails schedule validation. Optional.
- struct World#
- Display:
World
One world entry: its key (referenced by schedule entries and used to generate the world_<key> message) and its per-locale display names.
- field key#
- Display:
Key
- Type:
string- Required:
yes
- Primary key:
False
- Unique:
False
- Min length:
1
Stable identifier for the world, referenced by schedule entries. Must be non-blank and unique across all worlds.
- field names#
- Display:
Names
- Type:
list[LocaleName]- Required:
no
- Primary key:
False
- Unique:
False
Per-locale display names, kept in order so the base locale can lead and the on-disk order is stable across round-trips.
- struct ScheduleDay#
- Display:
Schedule Day
One weekday’s list of streams, in the order they occur that day. A weekday may hold zero, one, or several streams.
- field weekday#
- Display:
Weekday
- Type:
- Required:
yes
- Primary key:
False
- Unique:
False
The weekday this day’s streams occur on.
- field streams#
- Display:
Streams
- Type:
list[Stream]- Required:
no
- Primary key:
False
- Unique:
False
The streams scheduled on this weekday, in the order they occur.
- struct StreamerConfig#
- Display:
Streamer Config
The whole editable config surface for one streamer, stored as the config directory’s streamer-config.json: the worlds, the weekly schedule, the theme, and the site identity. Message overrides (streamer name, greeting) live in messages/<locale>.json and are handled by the i18n tab, not this model. Every section is optional; an absent section means “inherit the canonical site default”.
- field worlds#
- Display:
Worlds
- Type:
list[World]- Required:
no
- Primary key:
False
- Unique:
False
The defined worlds, in model order.
- field schedule#
- Display:
Schedule
- Type:
list[ScheduleDay]- Required:
no
- Primary key:
False
- Unique:
False
The weekly schedule, one entry per weekday in model order.
- field theme#
- Display:
Theme
- Type:
- Required:
yes
- Primary key:
False
- Unique:
False
The per-mode color override layer.
- field site#
- Display:
Site
- Type:
- Required:
yes
- Primary key:
False
- Unique:
False
The site identity section.