Skip to content

Repository files navigation

Game Dashboard Improved

A modern system monitoring dashboard with a clean web interface and system tray integration. Monitor your CPU, GPU, memory, and network usage in real-time.

Features

  • Real-time System Monitoring: Track CPU, GPU, memory, and network metrics
  • Web-based Dashboard: Accessible via browser at http://127.0.0.1:8000
  • System Tray Integration: Runs in the background with easy access from the system tray
  • Cross-platform Support: Works on Windows with Python 3.x

Prerequisites

  • Python 3.10 or higher
  • pip (Python package installer)
  • Node.js (for running client-side tests, optional)

Installation

  1. Clone the repository:

    git clone https://github.com/yohai109/Game-Dashboard-Improved.git
    cd Game-Dashboard-Improved
  2. Install the required dependencies:

    pip install -r requirements.txt

Running the Application

Run from Source

To run the application directly from Python:

python main.py

This will:

  • Start the FastAPI dashboard server on http://127.0.0.1:8000
  • Create a system tray icon
  • Automatically open the dashboard in your default browser

Access the Dashboard

Once running, you can:

  • Click the system tray icon and select "Open Dashboard" to open the web interface
  • Navigate to http://127.0.0.1:8000 in your browser
  • Click "Exit" in the system tray menu to close the application

Building the Executable

To build a standalone Windows executable:

Using PowerShell (Recommended)

.\build_exe.ps1

Using Batch File

build_exe.bat

The build process will:

  • Use PyInstaller to create a standalone executable
  • Include all necessary dependencies and assets
  • Generate a SystemMonitorTray.exe file in the dist folder

Build Output

After successful build, you'll find:

  • dist/SystemMonitorTray.exe - The standalone executable

You can run the executable without needing Python installed on the target machine.

Project Structure

Game-Dashboard-Improved/
├── dashboard/                    # Dashboard web application
│   ├── collectors/              # Modular system information collectors
│   │   ├── __init__.py          # Exports all collector functions
│   │   ├── cpu.py               # CPU usage and temperature
│   │   ├── gpu.py               # GPU usage and temperature (NVIDIA)
│   │   ├── memory.py            # Memory usage statistics
│   │   ├── network.py           # Network I/O statistics
│   │   ├── system.py            # General system information
│   │   └── README.md            # Collector documentation
│   ├── main.py                  # FastAPI application
│   ├── static/                  # Static assets
│   │   ├── js/                  # JavaScript files
│   │   │   └── dashboard.js     # Dashboard client-side code
│   │   └── app.ico              # Application icon
│   ├── templates/               # HTML templates
│   │   └── dashboard.html       # Main dashboard template
│   └── LibreHardwareMonitorLib.dll  # Windows hardware monitoring library
├── tests/                       # Test suite
│   ├── client/                  # Client-side tests
│   │   ├── dashboard.test.js    # Dashboard JavaScript tests
│   │   └── README.md            # Client testing documentation
│   ├── conftest.py              # Pytest configuration and fixtures
│   ├── test_server_api.py       # Server API endpoint tests
│   ├── test_collectors.py       # Collector module tests
│   └── README.md                # Server testing documentation
├── main.py                      # Application entry point
├── requirements.txt             # Python dependencies
├── requirements-test.txt        # Test dependencies (pytest, etc.)
├── package.json                 # Node.js dependencies for client tests
├── jest.config.js               # Jest configuration
├── pytest.ini                   # Pytest configuration
├── run_tests.sh / .bat          # Server test runner scripts
├── run_client_tests.sh / .bat   # Client test runner scripts
├── build_exe.ps1 / .bat         # Build scripts for executable
└── README.md                    # This file

Testing

The project includes comprehensive test suites for both server-side and client-side functionality.

Server-Side Tests

Test the FastAPI server, API endpoints, and system information collectors.

Prerequisites:

pip install -r requirements-test.txt

Running Server Tests:

Using the test script (Recommended):

# Linux/macOS
./run_tests.sh

# Windows
run_tests.bat

Using pytest directly:

pytest -m server

What's tested:

  • API endpoint responses and data structure
  • System information collectors (CPU, GPU, memory, network, system)
  • Error handling and graceful degradation
  • Static file serving

For more details, see tests/README.md.

Client-Side Tests

Test the dashboard JavaScript functionality using Jest and JSDOM.

Prerequisites:

npm install

Running Client Tests:

Using the test script (single command):

# Linux/macOS
./run_client_tests.sh

# Windows
run_client_tests.bat

Using npm directly:

npm run test:client

Additional test commands:

  • Watch mode (re-runs on changes): npm run test:client:watch
  • Coverage report: npm run test:client:coverage

What's tested:

  • Real-time clock updates
  • Progress bar initialization
  • Collapsible sections
  • Dashboard data updates with mocked API
  • Chart data management

For more details, see tests/client/README.md.

Dependencies

  • FastAPI - Modern web framework for the dashboard API
  • uvicorn - ASGI server for FastAPI
  • pystray - System tray icon support
  • Pillow - Image processing for tray icon
  • psutil - System and process monitoring
  • pynvml - NVIDIA GPU monitoring
  • pythonnet - .NET integration for Windows hardware monitoring

See requirements.txt for specific versions.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Feel free to submit issues and pull requests.

About

A live system info dashboard built in python and html so you can see you temps while you game

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages