add pwa setup, deploy script, fix build configuration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
29
deploy.sh
Executable file
29
deploy.sh
Executable file
@@ -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"
|
||||
@@ -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",
|
||||
|
||||
4
public/icon.svg
Normal file
4
public/icon.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
|
||||
<rect width="512" height="512" rx="96" fill="#0f172a"/>
|
||||
<text x="256" y="320" text-anchor="middle" font-family="system-ui" font-size="240" font-weight="bold" fill="#f8fafc">W</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 266 B |
21
public/manifest.webmanifest
Normal file
21
public/manifest.webmanifest
Normal file
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -9,7 +9,9 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true
|
||||
"noEmit": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"types": ["bun-types"]
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"allowImportingTsExtensions": true,
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src"]
|
||||
"include": ["src"],
|
||||
"exclude": ["server"]
|
||||
}
|
||||
|
||||
1
tsconfig.tsbuildinfo
Normal file
1
tsconfig.tsbuildinfo
Normal file
@@ -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"}
|
||||
@@ -13,6 +13,7 @@ export default defineConfig({
|
||||
registerType: "autoUpdate",
|
||||
workbox: {
|
||||
globPatterns: ["**/*.{js,css,html,ico,png,svg,wasm,data}"],
|
||||
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user