LobsterBoard

repository·main·Indexed 21 days ago

https://github.com/curbob/lobsterboard

A self-hosted, drag-and-drop dashboard builder for monitoring homelabs, system stats, and personal data feeds. Version 0.8.6 features over 60 widgets, a template gallery, and support for remote server monitoring via the lobsterboard-agent. It allows for the creation of custom pages with metadata in page.json, HTML frontends, and server-side API routes using api.cjs. It can work standalone or with OpenClaw.

Tokens
12.6K
Snippets
43
Records
58
Agent score
75%

What's inside lobsterboard

  1. Understand the LobsterBoard file structure

    main

    LobsterBoard is organized into a Node.js server environment with a web-based dashboard builder. Key directories include:

    • server.cjs: The Node.js server entry point.
    • app.html: The main dashboard builder interface.
    • config.json: Stores your saved dashboard layouts.
    • js/: Contains the core logic, including builder.js (editor logic), widgets.js (widget definitions), and templates.js (template management).
    • templates/: Holds the template gallery and individual template folders.
    • pages/: A directory for auto-discovered custom pages.
  2. Create custom pages in LobsterBoard

    main

    LobsterBoard allows you to extend the dashboard with custom pages. Pages are auto-discovered by the server if they follow a specific directory structure within the pages/ folder. Each page requires a page.json for metadata and an index.html for the UI. You can optionally include an api.cjs for server-side logic.

    Directory Structure:

    pages/
    └── my-page/
        ├── page.json       # Metadata (title, icon, order)
        ├── index.html      # Page UI
        └── api.cjs         # Optional: server-side API routes

    After adding a new page folder, restart the server to see it in the navigation menu.

    pages/
    └── my-page/
        ├── page.json
        ├── index.html
        └── api.cjs
  3. Important: Use absolute paths for assets

    main

    When referencing scripts, stylesheets, or images in your index.html, always use absolute paths (starting with /). Using relative paths may cause assets to fail to load depending on how the URL is accessed.

    <!-- ✅ Correct: absolute paths -->
    <script src="/pages/my-page/script.js"></script>
    <link rel="stylesheet" href="/pages/my-page/style.css">
    
    <!-- ❌ Wrong: relative paths may break -->
    <script src="script.js"></script>
  4. Contribute community widgets

    main
    You can extend LobsterBoard by building and sharing your own widgets. To get started, refer to the CONTRIBUTING.md guide for submission instructions and check the community-widgets/ directory to browse existing contributions and find the widget starter template.
  5. Use the shared navigation bar

    main

    To include the standard LobsterBoard navigation bar in your custom page, add a <nav> element with the ID page-nav and include the shared navigation script in your index.html.

    The script /pages/_shared/nav.js fetches /api/pages to render links for all enabled pages and automatically highlights the current page.

    <nav id="page-nav"></nav>
    <!-- ... your page content ... -->
    <script src="/pages/_shared/nav.js"></script>
  6. Identify LobsterBoard widget requirements and capabilities

    main

    LobsterBoard widgets are categorized by their data requirements and setup complexity. Use this guide to determine if a widget can be used immediately or if additional backend infrastructure is required.

    Widget Categories

    • Works Out of Box: No API or backend required. These run entirely in the browser. Examples include weather, clock, pomodoro, quick-links, and release (via GitHub public API).
    • User Provides API Key: Requires the user to input their own credentials (e.g., news-ticker for NewsAPI, stock-ticker for Finnhub, or github-stats for GitHub tokens).
    • OpenClaw Widgets: These require a custom backend bridge to translate OpenClaw's WebSocket/CLI data into REST JSON endpoints. They cannot be used with the standard server.js proxy alone. Examples include auth-status, activity-list, and system-log.
    • Needs Backend (Custom Setup Required): Requires specific custom API endpoints to be built or proxied. Examples include cpu-memory (requires /api/system), docker-containers (requires Docker API proxy), and ai-usage-claude (requires a server proxy with ANTHROPIC_ADMIN_KEY).
  7. Manual setup: Page file structure

    main

    To manually create a page, set up a folder within pages/ containing the following files:

    • page.json (Required): Contains page metadata.
    • index.html (Required): The HTML structure of your page.
    • api.cjs (Optional): Server-side API routes. Note: You must use the .cjs extension because the LobsterBoard package is configured as an ES module ("type": "module").
    • style.css (Optional): Custom styles for the page.
    pages/
    └── my-page/
        ├── page.json       # Required: metadata
        ├── index.html      # Required: page HTML
        ├── api.cjs         # Optional: server-side API routes (use .cjs extension)
        └── style.css       # Optional: additional styles
  8. Quick Start: Install and run LobsterBoard

    main

    You can install LobsterBoard via npm or by cloning the repository directly. Once installed, run the server using node server.cjs.

    To use the dashboard:

    1. Open http://localhost:8080 in your browser.
    2. Press Ctrl+E to enter edit mode.
    3. Drag widgets from the sidebar onto the canvas.
    4. Click 💾 Save to persist your layout.
    # Option 1: Install via npm
    npm install lobsterboard
    cd node_modules/lobsterboard
    node server.cjs
    
    # Option 2: Clone the repository
    git clone https://github.com/Curbob/LobsterBoard.git
    cd LobsterBoard
    npm install
    node server.cjs
  9. Import LobsterBoard templates

    main

    When importing a template into your LobsterBoard instance, you have two options:

    • Replace: This will overwrite your entire current dashboard with the template's configuration.
    • Merge: This adds the template's widgets below your existing widgets. LobsterBoard will automatically offset the positions to prevent overlap.
  10. Manually create a LobsterBoard template

    main

    To create a template manually, create a new directory inside the templates/ folder. Each template must contain a meta.json file and a config.json file. An optional preview.png is recommended for the template registry.

    Directory Structure:

    templates/
    └── my-template/
        ├── meta.json       # Template metadata
        ├── config.json     # Dashboard configuration
        └── preview.png     # Preview screenshot (optional)
  11. Setup remote server monitoring with lobsterboard-agent

    main

    To monitor remote servers (VPS, etc.) from your main LobsterBoard dashboard, install and run lobsterboard-agent on the remote machine.

    1. On the remote server:

      • Install the agent globally: npm install -g lobsterboard-agent.
      • Initialize to generate an API key: lobsterboard-agent init (save this key).
      • Start the agent: lobsterboard-agent serve (runs on port 9090 by default).
    2. In the LobsterBoard Dashboard:

      • Click 🖥️ Servers in the header.
      • Enter the server name, URL (http://your-server-ip:9090), and the API key generated in step 1.
      • Click Test Connection.
      • Add widgets (like CPU/Memory or Docker) and select your remote server from the Server dropdown in the widget's property panel.
    # On your VPS/remote server:
    npm install -g lobsterboard-agent
    lobsterboard-agent init     # Generates API key - save it!
    lobsterboard-agent serve    # Starts on port 9090