DEV Community

Subha S. Das
Subha S. Das

Posted on

Not every UI needs a browser.


Building a Dashboard-Style Terminal UI (TUI) in Go πŸš€

As developers, we often default to web applications and desktop GUIs. But sometimes, a Terminal User Interface (TUI) can be a powerful alternativeβ€”especially for internal tools, dashboards, DevOps utilities, and ERP systems.

Over the last few days, I've been experimenting with building a dashboard-style TUI in Go using the tview library. The goal wasn't just to display text in a terminal, but to create an experience similar to a modern admin dashboard:

βœ… Sidebar navigation with nested menus
βœ… Dashboard KPI cards (Users, Revenue, Orders, Products)
βœ… ERP-style data tables with proper alignment and financial columns
βœ… Dynamic page switching and screen management
βœ… Keyboard-driven navigation and focus handling
βœ… Modular architecture with reusable components

Why a TUI?

A terminal application offers some interesting advantages:

Lightweight: No browser or heavy runtime required.
Fast: Minimal resource consumption and quick startup.
Cross-platform: Build once and run almost anywhere.
Keyboard-first workflow: Extremely productive for power users.
Ideal for internal systems: Monitoring tools, administration panels, DevOps dashboards, and enterprise applications.
Architecture Approach

Instead of placing all UI logic in one file, I designed the application with a modular structure:

Application
β”œβ”€β”€ Bootstrap
β”œβ”€β”€ Screen Manager
β”œβ”€β”€ Layout Manager
β”‚ β”œβ”€β”€ Header
β”‚ β”œβ”€β”€ Sidebar
β”‚ β”œβ”€β”€ Content Pages
β”‚ └── Footer
β”œβ”€β”€ Screens
β”‚ β”œβ”€β”€ Home
β”‚ β”œβ”€β”€ Orders
β”‚ └── Settings
└── Shared Components

The Screen Manager handles page registration and navigation, while the Layout Manager keeps global components such as the sidebar and header persistent.

Challenges I Encountered

Building a dashboard in a terminal is surprisingly different from building one on the web:

  1. Focus Management

Managing keyboard focus between the sidebar and page content required careful handling. Determining which component should own focus at any given moment is crucial for a good user experience.

  1. Table Alignment

Unlike HTML tables, tview.Table doesn't provide CSS-like control. Proper alignment of financial data (Amount, Tax, Discount, Total) required manual configuration and thoughtful layout design.

  1. Dashboard Density

Creating information-dense dashboards in a terminal is challenging because terminal UIs have limited styling capabilities compared to modern web frameworks.

  1. Component Architecture

Separating screens, layouts, navigation, and shared widgets became essential to keep the application maintainable as it grew.

What I Learned

Terminal applications are not just nostalgic throwbacks. They can still be highly effective for:

ERP systems
Administrative dashboards
Monitoring tools
DevOps platforms
Internal business applications
Data management systems

Go's simplicity, performance, and excellent libraries such as tview and tcell make it an enjoyable ecosystem for building these kinds of applications.

What's Next?

I'm planning to explore:

Dynamic widgets and plugin architecture
Better table experiences (sorting, filtering, pagination)
Modal windows and drill-down screens
Event-driven screen communication
More condensed and information-rich layouts

Building this project reminded me that great software doesn't always require a browser. Sometimes, a well-designed terminal interface can be remarkably productive and elegant.

Have you built a Terminal UI application before? Which language or framework would you choose for it?

Top comments (0)