Rename ProjectConfigurator, restructure Projects workspace, retire MediaCollection naming

- Rename MediaConfig -> ProjectConfigurator throughout; drop the Parameters
  tab/page; rename the Mounts tab to Projects and restructure it into three
  sections: Central services, Main services, Third-party services
- Add a self-describe contract (GET /api/info returning name/tabs/mountTypes)
  and a server-side discovery proxy (POST /api/discover-service) so adding a
  main service only requires a URL
- Add ProjectConfigurator HA: multiple instances now sync their settings with
  each other (GET /api/settings/export, POST /api/settings/sync, a periodic
  background puller), last-write-wins per key by updated_at
- Add a generic, project-agnostic file-storage API on CarrierNode
  (GET/POST/DELETE /api/mount/{project}/{type}[/*]) driven by the same
  configured_mounts data the Projects workspace already writes, usable by any
  registered project, not just the media family
- Add last_login_at tracking to the shared auth Store/User (schema, queries,
  UpdateLastLogin) and surface it through the shared web-ui ManagedUser type
  and UserManagement component
- Retire the "MediaCollection" name: Go module -> repos.gfranz.ch/Gabriel20xx/shared/media-backend,
  binary -> mediabackend, session cookie default -> "session", media-webui
  merged into webui, media-shared-assets renamed to legacy-assets and pruned
  to the one file MediaDesktop still uses

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Gabriel20xxandClaude Sonnet 5 committed 2026-09-04 15:02:16 +02:00
1 parent 07cf3308da
commit ee59571552
126 files changed
+2880 -8542

No files matched your search

+256
View File
@@ -0,0 +1,256 @@
import projectIcons from '../../project-icons.json'
import type { AppConfig, AppId } from './types'
import type { ProjectIconName } from './types'
function projectIcon(id: AppId): ProjectIconName {
return projectIcons[id].icon as ProjectIconName
}
const configs: Record<AppId, AppConfig> = {
viewer: {
id: 'viewer',
name: 'MediaViewer',
icon: projectIcon('viewer'),
eyebrow: 'Immersive media library',
description: 'Browse, search, and play your media collection from one calm workspace.',
nav: [
{
label: 'Library',
panel: 'library',
path: '/',
icon: 'gallery-horizontal-end',
description: 'Browse, search, and play your media collection.',
},
{
label: 'Feed',
panel: 'view',
path: '/feed',
icon: 'monitor-play',
description: 'View a focused stream of media from your collection.',
},
{
label: 'Tags',
panel: 'tags',
path: '/tags',
icon: 'tags',
description: 'Explore media by tags and related items.',
},
{
label: 'Playlists',
panel: 'playlists',
path: '/playlists',
icon: 'list-video',
description: 'Organize media into playlists for convenient playback.',
},
],
},
tools: {
id: 'tools',
name: 'MediaTools',
icon: projectIcon('tools'),
eyebrow: 'Media workflow studio',
description: 'Generate, download, convert, and schedule media jobs in one place.',
nav: [
{
label: 'Generator',
panel: 'generator',
path: '/',
icon: 'wand-sparkles',
description: 'Generate new media and monitor generation jobs.',
},
{
label: 'Downloader',
panel: 'downloader',
path: '/downloader',
icon: 'cloud-download',
description: 'Download media from configured sources.',
},
{
label: 'Converter',
panel: 'converter',
path: '/converter',
icon: 'refresh-cw',
description: 'Convert media between supported formats.',
},
{
label: 'Schedules',
panel: 'schedules',
path: '/schedules',
icon: 'activity',
description: 'Schedule recurring media tools and maintenance jobs.',
},
{
label: 'Library',
panel: 'library',
path: '/library',
icon: 'image',
description: 'Inspect media produced by the tools workspace.',
},
],
},
analyzer: {
id: 'analyzer',
name: 'MediaAnalyzer',
icon: projectIcon('analyzer'),
eyebrow: 'Processing operations',
description: 'Monitor discovery and define per-type processing pipelines and automation queues.',
nav: [
{
label: 'Dashboard',
panel: 'dashboard',
path: '/',
icon: 'layout-dashboard',
description: 'Monitor processing queues, progress, and recent history.',
},
{
label: 'Discover',
panel: 'discover',
path: '/discover',
icon: 'folder-open',
description: 'Discover and register media from configured locations.',
},
{
label: 'Images',
panel: 'images',
path: '/images',
icon: 'image',
description: 'Define the image pipeline: thumbnails, metadata extraction, and AI analysis.',
},
{
label: 'Videos',
panel: 'videos',
path: '/videos',
icon: 'monitor-play',
description: 'Define the video pipeline: thumbnails, metadata extraction, and AI analysis.',
},
{
label: 'Audios',
panel: 'audios',
path: '/audios',
icon: 'audio-lines',
description: 'Define the audio pipeline: thumbnails, metadata extraction, and AI analysis.',
},
{
label: 'Funscripts',
panel: 'funscripts',
path: '/funscripts',
icon: 'scroll-text',
description: 'Define the funscript pipeline: thumbnails, metadata extraction, and AI analysis.',
},
{
label: 'Schedules',
panel: 'schedules',
path: '/schedules',
icon: 'activity',
description: 'Configure recurring analyzer operations.',
},
],
},
config: {
id: 'config',
name: 'ProjectConfigurator',
icon: projectIcon('config'),
eyebrow: 'Platform configuration',
description: 'Connect central, main, and third-party services and configure their mounts.',
nav: [
{
label: 'Projects',
panel: 'projects',
path: '/',
icon: 'hard-drive',
description: 'Connect central, main, and third-party services and configure their mounts.',
},
],
},
moderator: {
id: 'moderator',
name: 'MediaModerator',
icon: projectIcon('moderator'),
eyebrow: 'Administration and safety',
description: 'Review users, media, tags, visibility, and platform health.',
nav: [
{
label: 'Dashboard',
panel: 'dashboard',
path: '/',
icon: 'bar-chart-3',
description: 'Review moderation activity and platform health.',
},
{
label: 'Users',
panel: 'users',
path: '/users',
icon: 'users',
description: 'Manage accounts, roles, and access.',
},
{
label: 'Media',
panel: 'media',
path: '/media',
icon: 'shield-check',
description: 'Review media visibility and moderation status.',
},
],
},
kiosk: {
id: 'kiosk',
name: 'MediaKiosk',
icon: projectIcon('kiosk'),
eyebrow: 'Ambient display',
description: 'Show the latest collection output in a focused, full-screen canvas.',
nav: [
{
label: 'Kiosk',
panel: 'kiosk',
path: '/',
icon: 'monitor-play',
description: 'Show the latest collection output in a focused display.',
},
],
},
carriernode: {
id: 'carriernode',
name: 'CarrierNode',
icon: projectIcon('carriernode'),
eyebrow: 'Storage and delivery',
description: 'Inspect mounts, file activity, bandwidth, and media delivery health.',
nav: [
{
label: 'Overview',
panel: 'overview',
path: '/',
icon: 'server',
description: 'Inspect storage, delivery, and service health.',
},
{
label: 'Files',
panel: 'files',
path: '/files',
icon: 'folder-open',
description: 'Review recent files and media activity.',
},
],
},
}
export function getAppConfig(id: string): AppConfig {
return configs[(id as AppId) in configs ? (id as AppId) : 'viewer']
}
function normalizePathname(pathname: string): string {
const normalized = String(pathname || '/').replace(/\/+$/, '')
return normalized || '/'
}
export function getPanelForPath(app: AppConfig, pathname: string): string {
const normalizedPath = normalizePathname(pathname)
const matchingItem = app.nav.find((item) => {
if (item.path === '/') return normalizedPath === '/'
return normalizedPath === item.path || normalizedPath.startsWith(`${item.path}/`)
})
return matchingItem?.panel || app.nav[0]?.panel || ''
}
export function getPathForPanel(app: AppConfig, panel: string): string {
return app.nav.find((item) => item.panel === panel)?.path || app.nav[0]?.path || '/'
}