Files
manage/frontend
Developer ec57eff59a Named dashboards + pinned service links (Slice 10)
Wire up named dashboards end-to-end. The /d/:slug route (already
referenced by useDashboards-driven nav entries from slice 4) now
renders NamedDashboardPage instead of 404ing.

Backend: GET /api/dashboards/slug/:slug resolves a dashboard by slug
(404 when not found). The store method existed from slice 3; only the
router endpoint was missing.

NamedDashboardPage: renders a named dashboard's payload -- an ordered
list of inline items with a type discriminator. This slice ships
'link' items (PinnedServiceLink -> navigates to /services/:type/:id).
Full widget composition on named dashboards is a follow-up; the main
Dashboard keeps the rich WidgetConfigDialog.

PinnedServiceLink: card component (lucide icon + label) navigating to
a service page or specific tab.

Dashboard management UI on the Services page (DashboardManagementCard):
list existing dashboards with reorder/delete, create via dialog
(label -> auto-slug), add pinned service links per dashboard (label +
enabled-service dropdown). Placed on Services (the admin hub) rather
than Settings to avoid an extra nav trip.

Dashboard payload model: inline items ({ items: [{ type: 'link', label,
target }] }) -- self-contained, no separate widget-instance fetch
needed. The type discriminator allows future widget items without
breaking existing payloads.

Tests: NamedDashboardPage (renders links, not-found state),
PinnedServiceLink (renders + navigates). 112 frontend tests pass (+6);
271 backend tests pass (no regression); lint/build green both sides.

Refs openspec/changes/services-as-hub-ia/ (spec R5, tasks slice 10).
2026-06-26 20:05:59 +00:00
..
2026-05-04 16:59:06 +02:00
2026-05-04 13:50:53 +02:00

Manage Frontend

React + TypeScript SPA for Manage, consuming the FastAPI backend.

Tech Stack

  • Vite — Build tool
  • React 18+ — UI framework
  • TypeScript — Type safety
  • @tanstack/react-query — Data fetching/caching
  • @tanstack/react-table — Data tables (media, file browser)
  • react-router-dom — Client-side routing
  • Tailwind CSS + shadcn/ui — Styling

Setup

cd frontend
npm install

Development

npm run dev

Runs on http://localhost:5173 with API requests proxied to http://localhost:8000.

Make sure the backend is running:

cd ../backend
uvicorn media_library_viewer_api.main:app --reload --port 8000

Build

npm run build

Output goes to frontend/dist/.

Pages

  • Dashboard (/) — Now playing, library stats, configurable widgets and shortcuts, frontend/backend version chips in the shell header
  • Observability (/observability) — Thin dashboard: Alertmanager alerts, Prometheus target health, machine status, and Grafana deep-links (no in-app charting)
  • Media (/media) — Full-library table with sort/filter/search
  • Users (/users) — Read-only Jellyfin user list with optional Jellyseerr enrichment
  • File Browser (/files) — Remote directory browsing, ffprobe preview, jobs
  • Settings (/settings) — Persistent monitoring machine definitions, SSH keys, and setup workflow
  • Actions (/actions) — Saved server tasks (shell/python) targeting ssh_tasks services

Environment Variables

Set VITE_API_URL and any OIDC variables directly in your shell or Compose build args if the API is not at http://localhost:8000. The frontend version defaults to the package.json version and can be overridden with VITE_APP_VERSION and VITE_APP_BUILD_INFO when you need explicit deployed labels.

VITE_API_URL=http://your-backend-host:8000

Configuration workflow examples

  • Local development: run docker compose -f docker-compose.dev.yml up --build, then open the app and add monitoring machines in the Settings tab.
  • Production: export the required Compose variables in your shell, run docker compose up --build, and manage local/remote machines from Settings.
  • Observability: Manage only deploys backend + frontend. It connects to existing Grafana/Prometheus/Alertmanager instances; see docker-compose.observability.yml for an optional standalone example stack. A machine can be local (the API host itself) or ssh (a remote host), and the UI treats both the same after configuration.

In development, the Vite proxy handles /api requests automatically. Observability services (Grafana, Prometheus, Alertmanager) are configured in the app on the Services page — there are no observability env vars.