Skip to content

The admin interface

The admin interface lets you create and manage sessions, monitor participant progress, and intervene during experiments.

Accessing the admin

The admin is available at /admin/ on your server. During development:

http://127.0.0.1:8000/admin/

Authentication

On localhost with the default config (upd.ADMINS["admin"] = ...), uproot prints an auto-login URL when the server starts:

Auto login:
     http://127.0.0.1:8000/admin/login/#aBcDeFgHiJkL...

For production, set a password in main.py:

upd.ADMINS["admin"] = "your-secure-password"

You can define multiple admin accounts:

upd.ADMINS["admin"] = "password1"
upd.ADMINS["researcher"] = "password2"

Warning

Auto-login with ... (Ellipsis) should only be used during local development. Always set a real password for production deployments.

Dashboard

The dashboard (/admin/dashboard/) shows an overview of active sessions and rooms. From here you can navigate to any session or room.

Creating sessions

Navigate to SessionsNew session to create a session:

  1. Config — Select which experiment config to run
  2. Number of players — How many player slots to create
  3. Settings (JSON) — Optional JSON object for session settings (accessible via session.settings)
  4. Custom session name — Optional (auto-generated if omitted)
  5. Custom player names — Optional (auto-generated if omitted)
  6. Simulate responses — If enabled, the app's simulate.js file runs on every player page load (see App testing below)

After creation, each player gets a unique URL:

https://your-server.com/p/{session_name}/{player_name}/

Session management

The session detail page (/admin/session/{sname}/) is your control center during an experiment.

Player monitor

The session page shows all players with their current status:

  • Current page — Which page each player is on
  • Online status — Whether the player is currently connected
  • Progress — How far through the experiment each player is

Player actions

Select one or more players and use these actions:

Action What it does
Advance Move selected players forward one page
Revert Move selected players back one page
Move to end Skip selected players to the end of the experiment
Reload Force a page reload in selected players' browsers
Send message Display a message on selected players' screens
Mark as dropout Flag selected players as dropouts
Redirect Send selected players to an external URL
Set fields Set arbitrary field values on selected players
Group/ungroup Manually create or dissolve groups
Run new_player Re-run the new_player callback for selected players

Session controls

Control What it does
Toggle active Pause/resume the session (inactive sessions reject new page loads)
Toggle testing Mark the session as a test run (useful for filtering data later)
Update description Add a note about the session
Update settings Modify session settings (JSON)
Run new_session Re-run the new_session callback

Data browser

Click Data on the session page to browse all stored data in a table view. Each player's fields are shown with their current values, timestamps, and the code location that set each value.

Page times

Download a CSV of page visit times showing when each player entered and left each page. Useful for measuring response times.

Digest

If your app defines a digest(session) function, the digest view shows its output. Use this for experiment-specific summaries.

See the prisoners_dilemma_repeated example for a digest implementation

Managing rooms

Navigate to Rooms to see all rooms, separated into open and closed sections. See Rooms for details on room configuration.

From a room's admin page you can:

  • See which participants are waiting in the room (with live label tracking)
  • Create a session with pre-assigned player slots
  • Edit room settings (config, labels, capacity) when no session is associated

When a session is associated, the room's admin page shows:

  • Room status — open/closed, capacity, and join mode (free join or restricted)
  • Close room / Reopen room — stop or resume accepting new participants without affecting the running session (see Closing and reopening a room)
  • Disassociate — unlink the session so the room can be reused

Admin chat

The admin chat lets experimenters communicate directly with individual participants during a running session. Open it from the session detail page by clicking the chat icon next to a player.

Features:

  • Per-player channels — Each participant gets a private conversation with the experimenter
  • Enable/disable replies — Control whether the participant can write back or only receive messages
  • Participant-side widget — A floating chat button appears on the participant's screen when the admin sends a message
  • Real-time updates — Messages appear instantly on both sides via WebSocket

Participants see a small button in the bottom-right corner. Messages from the experimenter appear in a pop-up chat window. Whether the participant can reply is controlled by the toggle in the admin view.

Note

Admin chat channels are created automatically the first time the admin sends a message to a participant. No setup is required in your app code.

App testing

uproot supports automated page interactions via a simulate.js file in each app. When a session is created with the Simulate responses option enabled, simulate.js runs on every player page load.

This lets you verify that your experiment works end-to-end without manually clicking through as a participant.

Writing simulate.js

When you create a new project with uproot setup, a template simulate.js is generated automatically. The file uses uproot.currentPage to determine which page is loaded and can fill in form fields and submit:

if (uproot.currentPage == "my_app/Decision") {
    // Fill in a radio field randomly
    if (Math.random() < 0.5) {
        I("choice-0").checked = true;
    } else {
        I("choice-1").checked = true;
    }

    uproot.submit();
}

uproot.currentPage is a string in the format "app_name/PageClassName". Use I(id) as shorthand for document.getElementById(id).

Warning

Simulation is session-level and permanent—once a session is created with simulation enabled, it cannot be disabled for that session. Create a new session without the option to run without simulation.

See simulate.js in the prisoners_dilemma example

Server status

The status page (/admin/status/) shows:

  • Database size
  • Installed package versions
  • Environment variables
  • Active authentication sessions

Database dump

Download a complete database dump from /admin/dump/. This is equivalent to running uproot dump from the CLI.

Summary

Page URL Purpose
Dashboard /admin/dashboard/ Overview of sessions and rooms
Sessions /admin/sessions/ List all sessions
New session /admin/sessions/new/ Create a session
Session detail /admin/session/{sname}/ Monitor and control a session
Admin chat /admin/session/{sname}/chat/ Chat with individual participants
Data browser /admin/session/{sname}/data/ Browse session data
Rooms /admin/rooms/ List all rooms
Status /admin/status/ Server information