Operator Preferences¶
Each operator can customize their Stentor experience through per-user preferences. Settings include UI theme selection, accent color, console font and colors, graph font, VNC port range, default report format, and a custom logo upload. Preferences are stored server-side as JSONB and persist across sessions and devices.
Overview¶
Preferences are scoped to the authenticated operator -- each user has their own independent settings. When no preferences have been saved, the system returns sensible defaults (14px font, PDF reports, system theme).
graph LR
A[Operator UI] -->|PUT /preferences| B[Backend API]
B --> C[operator_preferences<br/>JSONB column]
A -->|GET /preferences| B
A -->|POST /preferences/logo| B
B --> D[custom_logo<br/>BYTEA column] Available Settings¶
Theme¶
Stentor ships with 25+ built-in themes organized into categories. Themes are applied instantly on selection and saved to the server for cross-device persistence.
| Category | Themes |
|---|---|
| Default | Valorant, Matrix, Cobalt Strike, Arctic, Amber, Midnight |
| Editor | Dracula, Nord, One Dark, Tokyo Night, Gruvbox Dark, Catppuccin |
| Light | Paper, Solarized Light, GitHub Light, Rose Pine Dawn, Gruvbox Light |
| Creative | Cyberpunk, Synthwave, Ocean, Sunset, Forest, Cherry, Aurora |
| Accessibility | High Contrast Dark, High Contrast Light, Terminal Green |
Instant preview
Themes apply immediately when clicked -- no need to save first. The selected theme is persisted to the server in the background.
Accent Color¶
Set the primary accent color using an oklch value (e.g., oklch(0.7 0.15 250)). The preferences page provides preset buttons for common colors:
| Preset | Value |
|---|---|
| Blue | oklch(0.7 0.15 250) |
| Green | oklch(0.7 0.18 155) |
| Red | oklch(0.65 0.2 25) |
| Purple | oklch(0.65 0.18 300) |
| Orange | oklch(0.7 0.16 55) |
Leave the accent color empty to use the theme default.
Console Appearance¶
Customize the terminal and console output appearance:
| Setting | Field | Constraints | Default |
|---|---|---|---|
| Font size | console_font_size | 8 -- 32 px | 14 |
| Font family | console_font_family | Max 100 characters | System default |
| Foreground color | console_fg_color | Max 20 characters | Theme default |
| Background color | console_bg_color | Max 20 characters | Theme default |
| Highlight color | console_highlight_color | Max 20 characters | Theme default |
Available console font presets: JetBrains Mono, Fira Code, Source Code Pro, Cascadia Code, IBM Plex Mono, Consolas, monospace.
The preferences page includes a live preview showing sample terminal output at the selected font size and family.
Graph Font¶
Choose the font used in pivot graph and network visualizations.
Available presets: Inter, JetBrains Mono, monospace, serif, sans-serif, or system default.
| Field | Constraints | Default |
|---|---|---|
graph_font | Max 100 characters | System default |
VNC Port Range¶
Configure the port range used for VNC desktop connections to target machines.
| Field | Constraints | Default |
|---|---|---|
vnc_port_min | 1024 -- 65535, or 0 (system default) | 0 |
vnc_port_max | 1024 -- 65535, or 0 (system default) | 0 |
Port range validation
vnc_port_max must be greater than or equal to vnc_port_min. Both values must be either 0 (system default) or in the 1024-65535 range. Ports below 1024 are reserved and not accepted.
Report Format¶
Set the default export format for engagement reports.
| Format | Value |
|---|---|
pdf | |
| JSON | json |
| CSV | csv |
Custom Logo¶
Operators can upload a custom logo that appears in reports and the sidebar. The logo is stored as a binary blob in the database.
Constraints:
- Maximum file size: 500 KB
- Accepted formats: any image type (PNG, JPG, SVG recommended)
- Content-Type must start with
image/
API Reference¶
Get Preferences¶
Retrieve the current operator's preferences. Returns defaults if no preferences have been saved.
{
"accent_color": "oklch(0.7 0.15 250)",
"console_font_size": 14,
"console_font_family": "JetBrains Mono",
"console_fg_color": "",
"console_bg_color": "",
"console_highlight_color": "",
"graph_font": "",
"vnc_port_min": 0,
"vnc_port_max": 0,
"report_format": "pdf",
"theme": "valorant",
"has_custom_logo": true,
"updated_at": "2026-02-21T12:00:00Z"
}
Derived fields
The has_custom_logo field is computed from the database (checks whether the custom_logo column is non-null) and is not part of the stored JSONB preferences.
Update Preferences¶
Save operator preferences. All fields are required in the request body.
curl -s -X PUT https://stentor.app/api/v1/preferences \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"accent_color": "oklch(0.65 0.2 25)",
"console_font_size": 16,
"console_font_family": "Fira Code",
"console_fg_color": "#c9d1d9",
"console_bg_color": "#0d1117",
"console_highlight_color": "#264f78",
"graph_font": "Inter",
"vnc_port_min": 5900,
"vnc_port_max": 5999,
"report_format": "pdf",
"theme": "dracula"
}' | jq
{
"accent_color": "oklch(0.65 0.2 25)",
"console_font_size": 16,
"console_font_family": "Fira Code",
"console_fg_color": "#c9d1d9",
"console_bg_color": "#0d1117",
"console_highlight_color": "#264f78",
"graph_font": "Inter",
"vnc_port_min": 5900,
"vnc_port_max": 5999,
"report_format": "pdf",
"theme": "dracula",
"has_custom_logo": false,
"updated_at": "2026-02-21T12:05:00Z"
}
Validation rules:
| Field | Rule |
|---|---|
console_font_size | Must be between 8 and 32 |
console_font_family | Max 100 characters |
console_fg_color | Max 20 characters |
console_bg_color | Max 20 characters |
console_highlight_color | Max 20 characters |
graph_font | Max 100 characters |
vnc_port_min | 0 or 1024-65535 |
vnc_port_max | 0 or 1024-65535, must be >= vnc_port_min |
report_format | One of: pdf, json, csv |
theme | Must be a recognized theme name or empty |
Upload Logo¶
Upload a custom logo image via multipart form data.
curl -s -X POST https://stentor.app/api/v1/preferences/logo \
-H "Authorization: Bearer $TOKEN" \
-F "[email protected]" | jq
Get Logo¶
Retrieve the current operator's custom logo as a binary image (returns image/png content type).
curl -s https://stentor.app/api/v1/preferences/logo \
-H "Authorization: Bearer $TOKEN" \
-o logo.png
Returns 404 if no custom logo has been uploaded.
Delete Logo¶
Remove the custom logo for the current operator.
API Summary¶
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/preferences | Get operator preferences |
PUT | /api/v1/preferences | Update operator preferences |
POST | /api/v1/preferences/logo | Upload custom logo (multipart) |
GET | /api/v1/preferences/logo | Download custom logo (binary) |
DELETE | /api/v1/preferences/logo | Delete custom logo |