Understanding the Bubble Tea TUI Framework Architecture for Building Terminal Apps in Go/Golang



Understanding the Bubble Tea TUI Framework Architecture for Building Terminal Apps in Go/Golang

Understanding the Bubble Tea TUI Framework Architecture for Building Terminal Apps in Go/Golang

Let’s take a deeper dive into the architecture of Charm’s Bubble Tea framework, providing a primer to help you understand the underlying structure and components, so that we can build interactive TUIs for our apps.

We’ll talk about the key concepts that Bubble Tea borrows from the Elm architecture (Model, View, Update, Cmd, Msg) and go over examples of the unidirectional flow of data through a Bubble Tea app.

This video will serve as the foundation for the next video – “How to Build a Terminal App in Go/Golang with the Bubble Tea TUI Framework and Urban Dictionary API”
https://youtu.be/DEeFnVj3cv8

Resources:
Architecture Notes and Diagrams: https://glenngonda.dev/blog/bubble-tea-architecture-notes/
Bubble Tea: https://github.com/charmbracelet/bubbletea
Charm: https://charm.sh/

Chapters:
0:00 Bubble Tea Intro
1:18 NewProgram with optional Model and options
2:05 Run
2:20 Notable Bubble Tea terms
2:38 Init
2:45 Cmd and side effects
3:42 Msg
5:20 Update
6:18 Unidirectional data flow example in MVU
7:22 Bubble Tea Model interface