Add self-info endpoint for ProjectConfigurator discovery, sync shared updates
Lint / Lint (push) Successful in 1m5s
Tests / Go backend (push) Successful in 46s
Docker / Docker Build & Push (push) Failing after 2m1s
Tests / Dashboard checks (push) Successful in 49s

GET /api/info reports name/tabs/mount types (empty - state lives in Postgres,
no shared file mounts) so ProjectConfigurator's Projects workspace can
register this instance from just a URL.

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

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
import fs from 'node:fs'
import { writeFile } from 'node:fs/promises'
import path from 'node:path'
import tailwindcss from '@tailwindcss/vite'
import { sveltekit } from '@sveltejs/kit/vite'
import { defineConfig, type ResolvedConfig } from 'vite'
import { renderProjectFavicon } from './scripts/project-favicon.mjs'
const packages = [
['Svelte', 'svelte'],
['SvelteKit', '@sveltejs/kit'],
['TanStack Query', '@tanstack/svelte-query'],
['Tailwind CSS', 'tailwindcss'],
['bits-ui', 'bits-ui'],
['Vite', 'vite'],
]
const frontendTechStack = packages.flatMap(([label, pkg]) => {
try {
const file = path.resolve(import.meta.dirname, 'node_modules', pkg, 'package.json')
const version = JSON.parse(fs.readFileSync(file, 'utf8')).version
return version ? [{ name: label, version }] : []
} catch {
return []
}
})
function projectFavicon() {
const appId = process.env.VITE_MEDIA_APP || 'viewer'
let outputDir = ''
return {
name: 'shared-webui-project-favicon',
configResolved(config: ResolvedConfig) {
outputDir = path.resolve(config.root, config.build.outDir)
},
async writeBundle() {
await writeFile(path.join(outputDir, 'favicon.svg'), renderProjectFavicon(appId), 'utf8')
},
}
}
export default defineConfig({
plugins: [tailwindcss(), sveltekit(), projectFavicon()],
define: {
__MEDIA_APP__: JSON.stringify(process.env.VITE_MEDIA_APP || 'viewer'),
__FRONTEND_TECH_STACK__: JSON.stringify(frontendTechStack),
},
server: {
port: 5173,
proxy: {
'/api': 'http://localhost:3000',
'/auth': 'http://localhost:3000',
'/health': 'http://localhost:3000',
'/ws': { target: 'ws://localhost:3000', ws: true },
},
},
})