refactor: move llm-playground from services/ to apps/playground/

The LLM playground is a SvelteKit web app (frontend), not a backend
microservice. Moving it to apps/ follows the monorepo convention where
all user-facing apps live under apps/.

- Moved services/llm-playground/ → apps/playground/apps/web/
- Renamed package from @mana-llm/playground to @playground/web
- Updated Dockerfile paths for new location
- Updated docker-compose.macmini.yml build context
- Removed unused concurrently dependency
- Added parent package.json

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-23 11:25:54 +01:00
parent 40718a7554
commit 71b9339310
41 changed files with 527 additions and 530 deletions

View file

@ -28,7 +28,7 @@ COPY packages/shared-i18n ./packages/shared-i18n
COPY packages/shared-icons ./packages/shared-icons
# Copy llm-playground service
COPY services/llm-playground ./services/llm-playground
COPY apps/playground/apps/web ./apps/playground/apps/web
# Install dependencies
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
@ -38,7 +38,7 @@ WORKDIR /app/packages/shared-auth
RUN pnpm build || true
# Build the web app
WORKDIR /app/services/llm-playground
WORKDIR /app/apps/playground/apps/web
RUN pnpm exec svelte-kit sync
RUN pnpm build
@ -46,17 +46,17 @@ RUN pnpm build
FROM node:20-alpine AS production
# Keep same directory structure as builder so pnpm symlinks resolve correctly
WORKDIR /app/services/llm-playground
WORKDIR /app/apps/playground/apps/web
# Copy the pnpm store that symlinks point to (at /app/node_modules/.pnpm)
COPY --from=builder /app/node_modules/.pnpm /app/node_modules/.pnpm
# Copy the app's node_modules (contains symlinks to the pnpm store)
COPY --from=builder /app/services/llm-playground/node_modules ./node_modules
COPY --from=builder /app/apps/playground/apps/web/node_modules ./node_modules
# Copy built application
COPY --from=builder /app/services/llm-playground/build ./build
COPY --from=builder /app/services/llm-playground/package.json ./
COPY --from=builder /app/apps/playground/apps/web/build ./build
COPY --from=builder /app/apps/playground/apps/web/package.json ./
# Expose port
EXPOSE 5190

View file

@ -1,19 +1,17 @@
{
"name": "@mana-llm/playground",
"name": "@playground/web",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite dev --port 5190",
"dev:full": "concurrently -n llm,playground -c blue,green \"npm run start:mana-llm\" \"npm run dev\"",
"start:mana-llm": "cd ../mana-llm && ./start.sh",
"dev:full": "vite dev --port 5190",
"build": "vite build",
"preview": "vite preview",
"type-check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/adapter-node": "^5.4.0",
"concurrently": "^9.1.2",
"@sveltejs/kit": "^2.47.1",
"@sveltejs/vite-plugin-svelte": "^6.2.0",
"@tailwindcss/vite": "^4.1.7",

View file

@ -50,7 +50,9 @@
<div
class="mt-2 flex items-center gap-2 text-xs"
style="color: {message.role === 'user' ? 'rgba(255,255,255,0.7)' : 'var(--color-text-muted)'};"
style="color: {message.role === 'user'
? 'rgba(255,255,255,0.7)'
: 'var(--color-text-muted)'};"
>
<span>{formatTime(message.timestamp)}</span>
{#if message.model}

View file

@ -22,10 +22,7 @@
2) *
100}%, var(--color-bg) {(settingsStore.temperature / 2) * 100}%, var(--color-bg) 100%);"
/>
<div
class="mt-1 flex justify-between text-xs"
style="color: var(--color-text-muted);"
>
<div class="mt-1 flex justify-between text-xs" style="color: var(--color-text-muted);">
<span>Precise</span>
<span>Creative</span>
</div>
@ -47,12 +44,10 @@
style="background: linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) {((settingsStore.maxTokens -
256) /
(8192 - 256)) *
100}%, var(--color-bg) {((settingsStore.maxTokens - 256) / (8192 - 256)) * 100}%, var(--color-bg) 100%);"
100}%, var(--color-bg) {((settingsStore.maxTokens - 256) / (8192 - 256)) *
100}%, var(--color-bg) 100%);"
/>
<div
class="mt-1 flex justify-between text-xs"
style="color: var(--color-text-muted);"
>
<div class="mt-1 flex justify-between text-xs" style="color: var(--color-text-muted);">
<span>256</span>
<span>8192</span>
</div>
@ -76,10 +71,7 @@
style="background: linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) {settingsStore.topP *
100}%, var(--color-bg) {settingsStore.topP * 100}%, var(--color-bg) 100%);"
/>
<div
class="mt-1 flex justify-between text-xs"
style="color: var(--color-text-muted);"
>
<div class="mt-1 flex justify-between text-xs" style="color: var(--color-text-muted);">
<span>Focused</span>
<span>Diverse</span>
</div>

View file

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 512 B

Before After
Before After

View file

@ -0,0 +1,7 @@
{
"name": "playground",
"private": true,
"scripts": {
"dev": "turbo run dev"
}
}

View file

@ -1767,7 +1767,7 @@ services:
llm-playground:
build:
context: .
dockerfile: services/llm-playground/Dockerfile
dockerfile: apps/playground/apps/web/Dockerfile
container_name: mana-app-llm-playground
restart: unless-stopped
depends_on:

1008
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff