Guides

Overview

agdb studio: the web GUI of agdb_server for databases, queries, graphs, charts and dashboards

The agdb studio is the web GUI of the agdb_server. In a browser you can:

  • create, share, back up and manage databases,
  • build and run queries without writing code,
  • see the results as a 3D graph, a table, a chart or JSON, and edit the data in place,
  • collect queries into dashboards that you share with other users,
  • and, as the server admin, manage users and watch the server and the cluster.

Open the studio

The studio is built into the server binary when the server is built with the studio feature. It is not part of the default build. The official Docker image includes it. To build it yourself, build the server from a checkout of the agdb repository, which has the studio sources:

cargo build --release -p agdb_server --features "tls studio"

The build needs Node.js and pnpm. See How to run the server? for the details.

When the server runs, open the /studio/ path of its address in a browser, e.g. http://localhost:3000/studio/.

The studio sends its requests to the server's configured address and basepath (see the server configuration), not to the address in your browser. When you reach the server from another machine or through a reverse proxy, set address to the URL the browser uses, for example address: "https://example.com" with basepath: "/agdb" serves the studio at https://example.com/agdb/studio/. In a cluster, address also identifies the node to the other nodes, so each node keeps its own reachable address; connect the studio to a node directly or enter the node's URL as Server URL when logging in.

Every page of the studio has its own address, so you can bookmark it or send it to someone. Opening it when you are not logged in takes you to the login first and then back to the page.

Log in

The login page asks for:

  • Server URL: prefilled with the server that serves the studio. A cluster node's address also works.
  • Username and Password: the server admin is created when the server first starts (admin / admin by default, change the password after the first login). The admin creates other users on the admin pages.
  • Log in on all nodes in the cluster: logs you in on every node of a cluster at once, so you can switch between them later.

A login lasts for token_expiry_seconds of the server configuration (1 hour by default). When it ends, the studio shows Session ended and returns you to the page you were on after you log in again.

Your first graph

Add a database

On the Databases page type a Name, choose the Type Mapped and click Add. (A Memory database is lost when the server stops, unless it has a backup.)

Open it

Click the database's row. The query page opens.

Insert some data

Select the exec_mut tab, click into the empty query row and paste (Ctrl+V) these lines:

QueryBuilder::insert().nodes().aliases(["alice", "bob", "carol"]).query()
QueryBuilder::insert().edges().from("alice").to(["bob", "carol"]).query()

Each line becomes its own query row. Click Run mutation (or press Ctrl+Enter).

Look at it

Select the exec tab and add a query by typing the steps search, from (with the argument alice) and query, picking each one from the suggestions. Run it. The three nodes and two edges are shown as a graph. Click a node to see and edit its values.

Keep it

Click Add to dashboard at the top of the page, choose + New dashboard and give it a name. The query is now a widget on that dashboard under Dashboards.

Guides

PageWhat it covers
DatabasesAdding databases, the database actions, sharing databases with other users
QueriesThe query builder, running queries, copying them as code, query links
Results and chartsThe table, JSON, summary and chart views of query results
GraphThe graph view, editing elements, colours and sizes
DashboardsCreating, editing and sharing dashboards and their widgets
AdminServer status, users, and all databases and dashboards of the server
Account and clusterSessions, password, theme, notifications and switching between cluster nodes
Export and printCSV, JSON, Rust code, printing and PDF

The addresses of the pages, the keyboard shortcuts and the limits of the studio are listed in the studio reference.