The Dashboard

The Dashboard is the primary user interface for Swarm Nexus. It's a Python-based web application built with the Flask framework and served by Gunicorn in production. Its main purpose is to provide a human-readable window into the data stored in the Swarm Memory.

Core Responsibilities

  • Data Visualization: Presents the collected data in an intuitive UI, including leaderboards, content feeds, and evaluation metrics.

  • User Interaction: Allows users to log in, manage their profiles, and view their SWARM Points and leaderboard ranking.

  • Read-Only Database Access: The Dashboard connects to the central SQLite database in read-only mode. This is a critical security and stability feature, ensuring that the UI can never corrupt or interfere with the data being written by The Collector.

  • Internal API: Provides a set of JSON-based API endpoints (prefixed with /api/) used by the frontend to dynamically load data.

Technical Stack

  • Framework: Flask

  • WSGI Server: Gunicorn

  • Service Management: systemd (swarm-dashboard.service)

How It Works

  1. Request Handling: Nginx receives a request for the root domain (https://swarm-nexus.xyz) and reverse-proxies it to the Gunicorn server listening on 127.0.0.1:3010.

  2. Application Logic: The Flask application handles the request, queries the swarm.db database for the necessary information, and renders the appropriate HTML template.

  3. Frontend Rendering: The user's browser renders the page. For dynamic components like leaderboards, the frontend makes subsequent calls to the Dashboard's internal API (/api/evals/leaderboard, etc.) to fetch and display the data.

Last updated