refactor: consolidate codebase — remove archived code, deduplicate packages, standardize middleware

- Delete 17 server-archived/ directories (consolidated into apps/api/)
- Delete apps-archived/ (clock, wisekeep) and services-archived/ (it-landing, ollama-metrics-proxy)
- Fix type safety: replace all `any` casts in cross-app-queries.ts with proper Local* types
- Remove duplicate shared-auth-stores package (identical copy of shared-auth-ui/stores/)
- Remove duplicate theme store from shared-stores (canonical version in shared-theme)
- Migrate memoro-server rate-limiter to shared-hono/rateLimitMiddleware
- Migrate uload-server JWT auth + error handler to shared-hono (authMiddleware, errorHandler)
- Migrate arcade-server error handling to shared-hono
- Merge shared-profile-ui and shared-app-onboarding into shared-ui
- Unify /clock route into /times/clock, remove redirect stubs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-03 12:55:58 +02:00
parent 7ee57b7afd
commit d8ce4eaf34
309 changed files with 172 additions and 21667 deletions

View file

@ -10,6 +10,7 @@
"dependencies": {
"@anthropic-ai/sdk": "^0.65.0",
"@google/genai": "^1.14.0",
"@manacore/shared-hono": "workspace:*",
"hono": "^4.7.5",
"openai": "^4.76.0"
},

View file

@ -1,5 +1,6 @@
import { Hono } from 'hono';
import { cors } from 'hono/cors';
import { errorHandler, notFoundHandler } from '@manacore/shared-hono';
import { gamesRoutes } from './routes/games';
const PORT = parseInt(process.env.PORT || '3011', 10);
@ -7,12 +8,8 @@ const CORS_ORIGINS = (process.env.CORS_ORIGINS || 'http://localhost:5173').split
const app = new Hono();
app.onError((err, c) => {
console.error('Unhandled error:', err);
return c.json({ error: 'Internal server error' }, 500);
});
app.notFound((c) => c.json({ error: 'Not found' }, 404));
app.onError(errorHandler);
app.notFound(notFoundHandler);
app.use('*', cors({ origin: CORS_ORIGINS, credentials: false }));

View file

@ -33,7 +33,6 @@
},
"dependencies": {
"@manacore/local-store": "workspace:*",
"@manacore/shared-app-onboarding": "workspace:*",
"@manacore/shared-auth": "workspace:*",
"@manacore/shared-auth-ui": "workspace:*",
"@manacore/shared-branding": "workspace:*",
@ -42,7 +41,6 @@
"@manacore/shared-i18n": "workspace:*",
"@manacore/help": "workspace:*",
"@manacore/shared-icons": "workspace:*",
"@manacore/shared-profile-ui": "workspace:*",
"@manacore/shared-stores": "workspace:*",
"@manacore/shared-tags": "workspace:*",
"@manacore/subscriptions": "workspace:*",

View file

@ -1,4 +1,4 @@
import { createAppOnboardingStore, type AppOnboardingStep } from '@manacore/shared-app-onboarding';
import { createAppOnboardingStore, type AppOnboardingStep } from '@manacore/shared-ui';
import { userSettings } from './user-settings.svelte';
const onboardingSteps: AppOnboardingStep[] = [

View file

@ -28,7 +28,7 @@
import { SessionExpiredBanner, AuthGate, GuestWelcomeModal } from '@manacore/shared-auth-ui';
import { shouldShowGuestWelcome } from '@manacore/shared-auth-ui';
import { gamesOnboarding } from '$lib/stores/app-onboarding.svelte';
import { MiniOnboardingModal } from '@manacore/shared-app-onboarding';
import { MiniOnboardingModal } from '@manacore/shared-ui';
import { gamesStore } from '$lib/data/local-store';
import {
tagLocalStore,

View file

@ -1,5 +1,5 @@
<script lang="ts">
import { ProfilePage } from '@manacore/shared-profile-ui';
import { ProfilePage } from '@manacore/shared-ui';
import { authStore } from '$lib/stores/auth.svelte';
import { goto } from '$app/navigation';
</script>