> For the complete documentation index, see [llms.txt](https://swarmnexus.gitbook.io/swarmnexus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swarmnexus.gitbook.io/swarmnexus/documentation/readme/technical-documentation/the-dashboard.md).

# 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://swarmnexus.gitbook.io/swarmnexus/documentation/readme/technical-documentation/the-dashboard.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
