Overview
The UI is built with Bubble Tea and follows The Elm Architecture. The mainModel manages four page models and handles navigation.
Main Model
Model Struct
ui/model.go:27-39
cfg- Portfolio data loaded from config.yamlrenderer- Lipgloss renderer (session-specific)width,height- Current terminal dimensionsactivePage- Currently displayed page (enum)home,skills,projects,contact- Page model instances
Page Type
ui/model.go:11-21
Initialization
ui/model.go:41-53
Navigation System
Keyboard Controls
Global shortcuts handled inModel.Update:
| Key | Action | Code Location |
|---|---|---|
q, Ctrl+C | Quit application | ui/model.go:68-69 |
←, h | Previous page | ui/model.go:70-74 |
→, l | Next page | ui/model.go:75-79 |
| Key | Action | Pages |
|---|---|---|
↑, k | Move cursor up | Skills, Projects |
↓, j | Move cursor down | Skills, Projects |
Update Method
ui/model.go:59-97
- Handle window resizes
- Process global keyboard shortcuts
- Delegate remaining messages to active page
Layout Components
Tab Bar
Rendered at the top with 3 lines height:ui/model.go:141-178
- Active tab: Blue background, bold text
- Inactive tabs: Gray background, dimmed text
- Bottom border with horizontal line
Status Bar
Rendered at bottom with contextual keyboard hints:ui/model.go:180-196
- Shows navigation hints on all pages
- Adds ”↑ ↓ select” hint on Skills and Projects pages
- Always shows quit shortcut
Content Area
Dynamically sized based on terminal dimensions:ui/model.go:129-139
tabBarHeight = 3, statusBarHeight = 1
Page Components
HomeModel
Displays ASCII art, title, and intro text centered on screen. Structure:ui/home.go:9-15
ui/home.go:17-19
ui/home.go:21-47
- ASCII art in purple/mauve
- Title in blue with top/bottom padding
- Intro text in gray
- All content centered vertically and horizontally
SkillsModel
Two-column layout: category list on left, selected category skills on right. Structure:ui/skills.go:12-18
ui/skills.go:20-35
ui/skills.go:37-116
ui/skills.go:72-95
- Left 30%: Category list with cursor indicator
- Vertical divider
- Right 70%: Skills with optional progress bars (1-5 filled blocks)
ProjectsModel
Similar two-column layout for projects. Structure:ui/projects.go:11-17
ui/projects.go:19-34
ui/projects.go:58-90
- Left 30%: Project name list with cursor
- Right 70%: Name, description, tech stack, URL
ContactModel
Centered card with contact information. Structure:ui/contact.go:11-17
ui/contact.go:19-21
ui/contact.go:23-76
- Rounded border card
- Header: “Get In Touch”
- Rows: Icon + label (right-aligned) + value
- Only shows non-empty contact fields
- Centered on screen
Color Theme
All components use Catppuccin Mocha palette defined inui/theme.go:3-30:
Common Patterns
Page Interface
All page models follow this pattern:Two-Column Layout
Skills and Projects use identical layout logic:Centered Content
Home and Contact use Lipgloss’sPlace for centering: