Fold MediaEngine (media-backend, media-webui) into this repo

Per owner decision: MediaEngine (the Media product family's Go backend
and SvelteKit frontend, previously its own repo referenced by 7 thin
service repos via git submodule) is folded directly into shared/ as
media-backend/ and media-webui/, rather than staying separate.

media-backend/go.mod's replace directive now points at ../backend (a
true sibling within this repo) instead of a vendored ../shared/backend
copy, since there's no more nested vendoring - it's the real thing.

Also moved MediaEngine's own CI (media-backend-lint.yml,
media-backend-tests.yml) and dev tooling scripts (scripts/media/*,
audit/lint/enforce scripts for the media-backend+media-webui content),
fixing their path assumptions for the new layout, and dropped
scripts/media/sync-shared.mjs (confirmed dead code, and now doubly
obsolete since there's no more vendored shared/ subfolder for it to
check). Added media:* script aliases to package.json for the moved
tooling, namespaced to avoid colliding with this repo's own scripts.

Also fixed sync-consumers.ps1's workspace-root resolution to walk up
until it finds a directory containing both Original/ and Forks/,
instead of assuming shared/ is always a direct child of the workspace
root - it broke when shared/ moved from Web/shared to Web/Central/shared
earlier in this same restructuring. Removed the now-obsolete
Original/MediaEngine entry from its consumer list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Gabriel20xxandClaude Sonnet 5 committed 2026-08-31 22:06:29 +02:00
1 parent 79d9461769
commit acde180086
99 files changed
+20488 -1

No files matched your search

+286
View File
@@ -0,0 +1,286 @@
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: 'Playhouse',
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: 'Forge',
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: 'Lookout',
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: 'MediaConfig',
icon: projectIcon('config'),
eyebrow: 'Platform configuration',
description: 'Connect services, configure mounts, and tune shared processing parameters.',
nav: [
{
label: 'Mounts',
panel: 'mounts',
path: '/',
icon: 'hard-drive',
description: 'Configure collection mounts and connected storage.',
},
{
label: 'Parameters',
panel: 'parameters',
path: '/parameters',
icon: 'sliders-horizontal',
description: 'Tune shared processing and service parameters.',
},
],
},
moderator: {
id: 'moderator',
name: 'Warden',
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: 'Marquee',
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.',
},
],
},
servant: {
id: 'servant',
name: 'Porter',
icon: projectIcon('servant'),
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.',
},
],
},
desktop: {
id: 'desktop',
name: 'Beacon',
icon: projectIcon('desktop'),
eyebrow: 'Connected player',
description: 'Control playback, funscripts, and connected devices from your desktop.',
nav: [
{
label: 'Player',
panel: 'player',
path: '/',
icon: 'monitor-play',
description: 'Control playback and connected desktop devices.',
},
{
label: 'Devices',
panel: 'devices',
path: '/devices',
icon: 'box',
description: 'Manage connected playback and funscript devices.',
},
],
},
}
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 || '/'
}