Terminal Dashboard
A powerful, interactive Python terminal dashboard for system monitoring, task management, and productivity tracking with real-time stats, Pomodoro timer, and RSS news feeds
Tech Stack
Context
The Problem
Developers constantly switch between multiple applications to monitor system resources, track tasks, check weather, read news, and manage focus sessions. This context-switching disrupts workflow and reduces productivity.
Constraints
- Must work in any terminal without GUI dependencies
- Real-time system monitoring without performance overhead
- Plugin architecture for extensibility and modularity
- Support for interactive keyboard controls and navigation
- Work offline for core features (system stats, todos, timer)
- Clean, readable interface in 256-color terminals
Stakes
Personal project demonstrating Python expertise, TUI development, system programming, plugin architecture, and building developer tools that solve real workflow problems
My Role
Title
Python Developer & Systems Programmer
Team
Personal Project
Ownership
Complete development: architecture design, widget system, async API client, configuration management, testing infrastructure, and documentation
Approach & Key Decisions
Built an interactive terminal dashboard using Textual and Rich libraries for TUI rendering, psutil for system metrics, Pydantic for type-safe configuration, and httpx for async API calls. Implemented modular widget architecture with real-time updates and keyboard-driven interface.
Textual + Rich for terminal UI framework
Textual provides React-like component model for building complex TUIs with keyboard navigation. Rich offers beautiful terminal formatting with colors, panels, and progress bars without requiring GUI libraries.
Plugin-based widget architecture
Each widget (system, network, weather, todo) is an independent module with its own logic and rendering. This makes the dashboard extensible, testable, and allows widgets to be added/removed without modifying core code.
Pydantic models for configuration validation
Pydantic enforces type safety on JSON config files, provides automatic validation with helpful error messages, and generates type hints for better IDE support and fewer runtime errors.
psutil for cross-platform system monitoring
psutil abstracts OS differences for CPU, memory, disk, network, and battery stats, providing consistent API across Windows, macOS, and Linux without platform-specific code.
Async httpx client with caching for API calls
Non-blocking async requests prevent dashboard freezing during weather/RSS fetches. Built-in caching reduces API calls and improves responsiveness when re-rendering widgets.
JSON-based configuration with in-app settings editor
JSON files are human-readable for power users who want to edit directly, while in-app settings screen (press 's') provides user-friendly interface for common configurations without leaving the dashboard.
Pomodoro timer with persistent session tracking
Pomodoro technique improves focus and productivity. Persisting timer state to JSON ensures work sessions aren't lost if dashboard restarts, and session counter tracks daily productivity.
Alternatives Considered
Considered building a web-based dashboard but chose terminal for lower resource usage, faster startup, accessibility on remote servers via SSH, and avoiding browser/Electron overhead
Challenges & Solutions
⚠Challenge
Real-time UI updates without blocking terminal or consuming excessive CPU
✓Solution
Implemented async event loop with configurable refresh interval (default 1 second). Widgets only re-render when data changes, and expensive operations (API calls, disk I/O) run in background threads to keep UI responsive.
⚠Challenge
Managing state across multiple interactive widgets (todos, Pomodoro, settings)
✓Solution
Created singleton ConfigManager that loads/saves JSON files, provides thread-safe access to shared state, and persists changes immediately. Each widget reads from config on render and writes updates atomically to prevent data corruption.
⚠Challenge
Handling keyboard input for todo navigation, timer controls, and settings
✓Solution
Built key binding system with intuitive shortcuts (↑/↓/j/k for navigation, Space to toggle, 'a' to add, 'd' to delete, 'p' for Pomodoro, 's' for settings, 'q' to quit) with visual indicators showing available actions.
⚠Challenge
Fetching weather and RSS data without slowing down dashboard startup
✓Solution
Implemented async httpx client that fetches API data in background while dashboard loads. Added request caching with TTL to avoid redundant API calls, and graceful fallbacks if network is unavailable or APIs are down.
⚠Challenge
Testing terminal UI components and ensuring cross-platform compatibility
✓Solution
Built 36 unit tests using pytest covering models, config management, and API client. Used Pydantic's validation testing, mocked external dependencies (psutil, httpx), and tested on macOS, Linux, and Windows Terminal.
Outcomes & Impact
Widget Coverage
10 fully functional widgets: System, Network, Processes, Battery, Git, Weather, Calendar, News, Todo, Pomodoro
Code Architecture
Modular plugin system with core framework (models, config, API) separated from widgets for extensibility
Test Coverage
36 passing unit tests covering configuration, models, API client, and data validation with pytest
Type Safety
Full type hints throughout codebase with Pydantic models for runtime validation and mypy compatibility
Performance
1-second refresh interval with async API calls, minimal CPU overhead (~2-3% idle), and instant keyboard response
User Experience
Keyboard-driven interface with intuitive shortcuts, in-app settings editor, and color-coded stats for quick scanning
Documentation
Comprehensive README with setup instructions, keyboard shortcuts, configuration guide, and troubleshooting section