diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..4ac1783 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Configuration +UBERSPACE_HOST="${UBERSPACE_HOST:?Set UBERSPACE_HOST (e.g. user@asteroid.uberspace.de)}" +REMOTE_HTML_DIR="~/html/whattoplay" +REMOTE_SERVICE_DIR="~/services/whattoplay" + +echo "==> building frontend..." +bun run build + +echo "==> syncing frontend to $REMOTE_HTML_DIR/" +ssh "$UBERSPACE_HOST" "mkdir -p $REMOTE_HTML_DIR" +rsync -avz --delete dist/ "$UBERSPACE_HOST:$REMOTE_HTML_DIR/" + +echo "==> syncing server to $REMOTE_SERVICE_DIR/" +ssh "$UBERSPACE_HOST" "mkdir -p $REMOTE_SERVICE_DIR/src" +rsync -avz --delete \ + server/src/ "$UBERSPACE_HOST:$REMOTE_SERVICE_DIR/src/" +rsync -avz \ + server/package.json "$UBERSPACE_HOST:$REMOTE_SERVICE_DIR/" + +echo "==> installing server dependencies..." +ssh "$UBERSPACE_HOST" "cd $REMOTE_SERVICE_DIR && npm install --production" + +echo "==> restarting service..." +ssh "$UBERSPACE_HOST" "supervisorctl restart whattoplay || supervisorctl start whattoplay" 2>/dev/null || true + +echo "==> deploy complete" diff --git a/package.json b/package.json index 302c6d2..e33bcb9 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dev": "vite", "dev:server": "cd server && bun run dev", "dev:all": "bun run dev & bun run dev:server", - "build": "tsc -b && vite build", + "build": "tsc --noEmit && vite build", "preview": "vite preview", "lint": "biome check .", "lint:fix": "biome check --write .", @@ -34,6 +34,7 @@ "@tailwindcss/vite": "^4.0.0", "@tanstack/router-plugin": "^1.114.0", "@testing-library/react": "^16.0.0", + "@types/node": "^25.3.3", "@types/react": "^19.0.0", "@types/react-dom": "^19.0.0", "@vitejs/plugin-react": "^4.4.0", diff --git a/public/icon.svg b/public/icon.svg new file mode 100644 index 0000000..0808b80 --- /dev/null +++ b/public/icon.svg @@ -0,0 +1,4 @@ + + + W + diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest new file mode 100644 index 0000000..1e22fe3 --- /dev/null +++ b/public/manifest.webmanifest @@ -0,0 +1,21 @@ +{ + "name": "WhatToPlay", + "short_name": "WhatToPlay", + "description": "Manage your game library across platforms", + "start_url": "/", + "display": "standalone", + "theme_color": "#0f172a", + "background_color": "#0f172a", + "icons": [ + { + "src": "/icons/icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/icons/icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/server/tsconfig.json b/server/tsconfig.json index 7db3bef..d049ba0 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -9,7 +9,9 @@ "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "isolatedModules": true, - "noEmit": true + "noEmit": true, + "allowImportingTsExtensions": true, + "types": ["bun-types"] }, "include": ["src"] } diff --git a/tsconfig.json b/tsconfig.json index b6929c7..dcce4b9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,9 +12,11 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, + "allowImportingTsExtensions": true, "paths": { "@/*": ["./src/*"] } }, - "include": ["src"] + "include": ["src"], + "exclude": ["server"] } diff --git a/tsconfig.tsbuildinfo b/tsconfig.tsbuildinfo new file mode 100644 index 0000000..9678e90 --- /dev/null +++ b/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"root":["./src/main.tsx","./src/routeTree.gen.ts","./src/vite-env.d.ts","./src/features/discover/store.ts","./src/features/discover/components/card-stack.tsx","./src/features/discover/components/discover-done.tsx","./src/features/discover/components/discover-progress.tsx","./src/features/discover/components/game-discover-card.tsx","./src/features/discover/components/swipe-buttons.tsx","./src/features/discover/hooks/use-discover.ts","./src/features/games/schema.ts","./src/features/games/components/favorite-button.tsx","./src/features/games/components/game-card.tsx","./src/features/games/components/game-state-select.tsx","./src/features/games/components/star-rating.tsx","./src/features/library/components/library-header.tsx","./src/features/library/components/library-list.tsx","./src/features/library/components/library-search.tsx","./src/features/library/hooks/use-library.ts","./src/features/playlists/components/playlist-detail.tsx","./src/features/playlists/components/playlists-list.tsx","./src/features/playlists/hooks/use-playlist-detail.ts","./src/features/playlists/hooks/use-playlists.ts","./src/features/settings/schema.ts","./src/features/settings/components/data-settings.tsx","./src/features/settings/components/gog-settings.tsx","./src/features/settings/components/settings-list.tsx","./src/features/settings/components/steam-settings.tsx","./src/features/settings/hooks/use-data-management.ts","./src/features/settings/hooks/use-gog-sync.ts","./src/features/settings/hooks/use-steam-sync.ts","./src/routes/__root.tsx","./src/routes/index.tsx","./src/routes/discover/index.tsx","./src/routes/library/index.tsx","./src/routes/playlists/$playlistId.tsx","./src/routes/playlists/index.tsx","./src/routes/settings/$provider.tsx","./src/routes/settings/index.tsx","./src/shared/components/ui/badge.tsx","./src/shared/components/ui/button.tsx","./src/shared/components/ui/card.tsx","./src/shared/components/ui/dialog.tsx","./src/shared/components/ui/dropdown-menu.tsx","./src/shared/components/ui/input.tsx","./src/shared/components/ui/select.tsx","./src/shared/components/ui/separator.tsx","./src/shared/components/ui/sheet.tsx","./src/shared/components/ui/tabs.tsx","./src/shared/db/client.ts","./src/shared/db/hooks.ts","./src/shared/db/schema.ts","./src/shared/i18n/index.ts","./src/shared/i18n/locales/de.ts","./src/shared/i18n/locales/en.ts","./src/shared/i18n/locales/es.ts","./src/shared/i18n/locales/fr.ts","./src/shared/lib/api.ts","./src/shared/lib/utils.ts","./src/shared/stores/ui-store.ts"],"errors":true,"version":"5.9.3"} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index af79c87..0183c37 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -13,6 +13,7 @@ export default defineConfig({ registerType: "autoUpdate", workbox: { globPatterns: ["**/*.{js,css,html,ico,png,svg,wasm,data}"], + maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, }, }), ],