diff --git a/CLAUDE.md b/CLAUDE.md index 1c931fdf6..cda1a6aaa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,18 +4,26 @@ Guidance for Claude Code when working in this repo. ## Monorepo Overview -pnpm workspace monorepo. The main surface is the **unified web app** at `apps/mana/apps/web` — one SvelteKit build serving 27+ product modules under `mana.how`, sharing one IndexedDB, one auth session, one deployment. +pnpm workspace monorepo with two consolidated tops: + +- **`apps/mana/apps/web`** — unified SvelteKit frontend serving 27+ product modules under `mana.how`. One build, one IndexedDB, one auth session, one deployment. +- **`apps/api`** (`@mana/api`) — unified Hono/Bun backend API server. Consolidates per-module compute servers; routes registered under `/api/v1/{module}/*`. + +Per-product directories under `apps/{product}/` still exist for landing pages, mobile apps, and product-specific packages, but the active web frontend and API both live in the two consolidated apps above. - **Package Manager:** pnpm 9.15.0 - **Build System:** Turborepo - **Node:** 20+ -- **Primary doc:** [`apps/mana/CLAUDE.md`](apps/mana/CLAUDE.md) — read this for module structure, data layer, encryption, and routing details. +- **Primary doc:** [`apps/mana/CLAUDE.md`](apps/mana/CLAUDE.md) — module structure, data layer, encryption, routing. ### Repo layout ``` -apps/ # Product apps. Most are integrated as modules in apps/mana/apps/web. - # Standalone (own container, not unified): matrix, manavoxel +apps/ +├── mana/ # Unified frontend (SvelteKit web + Expo mobile + Astro landing) +├── api/ # Unified backend API (Hono/Bun) — @mana/api +├── {product}/ # Per-product landing pages, mobile apps, packages +│ # Standalone (own container, not unified): matrix, manavoxel games/ # arcade, voxelava, whopixels, worldream services/ # Backend services (Hono/Bun, Go, Python) — see list below packages/ # Shared workspace packages (@mana/*) diff --git a/apps/manacore/apps/web/src/lib/components/OfflineIndicator.svelte b/apps/manacore/apps/web/src/lib/components/OfflineIndicator.svelte deleted file mode 100644 index d4dadd945..000000000 --- a/apps/manacore/apps/web/src/lib/components/OfflineIndicator.svelte +++ /dev/null @@ -1,195 +0,0 @@ - - -{#if showBanner} -
-
- - - -
- {$_('pwa.offline', { default: 'Offline — Änderungen werden lokal gespeichert' })} - -
-{/if} - -{#if showSyncBadge} -
- - - {networkStore.pendingCount} - {$_('pwa.pendingChanges', { default: 'Änderungen warten auf Sync' })} - -
-{/if} - -{#if showSyncing} -
- - {$_('pwa.syncing', { default: 'Synchronisiere...' })} -
-{/if} - - diff --git a/apps/manacore/apps/web/src/lib/components/PwaUpdatePrompt.svelte b/apps/manacore/apps/web/src/lib/components/PwaUpdatePrompt.svelte deleted file mode 100644 index 76ef92e13..000000000 --- a/apps/manacore/apps/web/src/lib/components/PwaUpdatePrompt.svelte +++ /dev/null @@ -1,183 +0,0 @@ - - -{#if showPrompt} - -{/if} - - diff --git a/apps/manacore/apps/web/src/lib/stores/network.svelte.ts b/apps/manacore/apps/web/src/lib/stores/network.svelte.ts deleted file mode 100644 index 5ed4f191d..000000000 --- a/apps/manacore/apps/web/src/lib/stores/network.svelte.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Network status store — tracks online/offline state and pending sync changes. - * - * Integrates with the unified sync manager to show sync status - * and pending change counts in the UI. - */ - -import type { SyncStatus } from '$lib/data/sync'; - -let isOnline = $state(typeof navigator !== 'undefined' ? navigator.onLine : true); -let syncStatus = $state('idle'); -let pendingCount = $state(0); - -let cleanup: (() => void) | null = null; - -function initialize() { - if (typeof window === 'undefined') return; - if (cleanup) return; // Guard against double-init - - const handleOnline = () => (isOnline = true); - const handleOffline = () => (isOnline = false); - - window.addEventListener('online', handleOnline); - window.addEventListener('offline', handleOffline); - - cleanup = () => { - window.removeEventListener('online', handleOnline); - window.removeEventListener('offline', handleOffline); - }; -} - -function destroy() { - cleanup?.(); - cleanup = null; -} - -function setSyncStatus(status: SyncStatus) { - syncStatus = status; -} - -function setPendingCount(count: number) { - pendingCount = count; -} - -export const networkStore = { - get isOnline() { - return isOnline; - }, - get syncStatus() { - return syncStatus; - }, - get pendingCount() { - return pendingCount; - }, - initialize, - destroy, - setSyncStatus, - setPendingCount, -}; diff --git a/scripts/mac-mini/status.sh b/scripts/mac-mini/status.sh index 4b11ee5c1..32eb62dd9 100755 --- a/scripts/mac-mini/status.sh +++ b/scripts/mac-mini/status.sh @@ -78,7 +78,7 @@ if docker info >/dev/null 2>&1; then # every running container, and report any compose service whose # container_name is not currently up. if [ -f "$COMPOSE_FILE" ]; then - DEFINED=$(docker compose -p "${COMPOSE_PROJECT_NAME:-manacore-monorepo}" \ + DEFINED=$(docker compose -p "${COMPOSE_PROJECT_NAME:-mana-monorepo}" \ -f "$COMPOSE_FILE" config --format json 2>/dev/null \ | python3 -c ' import sys, json