3.9 KiB
3.9 KiB
WhatToPlay - iOS/Web Strategie
✅ Was funktioniert JETZT
Steam Integration (Voll funktionsfähig)
// ✅ Öffentliche Web API - funktioniert im Browser/iOS
const response = await fetch(
"http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/",
{
params: {
key: "YOUR_STEAM_API_KEY",
steamid: "YOUR_STEAM_ID",
format: "json",
},
},
);
Status: 1103 Games erfolgreich importiert ✅
⚠️ Was BACKEND braucht
GOG Integration
Problem: OAuth Token Exchange geht nicht im Browser (CORS + Secrets)
Development-Lösung (jetzt):
- Öffne https://www.gog.com (eingeloggt)
- Browser DevTools → Network → Kopiere Bearer Token
- Trage in
config.local.jsonein
Production-Lösung (später):
Frontend → Backend (Vercel Function) → GOG OAuth
→ GOG Galaxy Library API
Siehe: docs/GOG-SETUP.md
Epic Games Integration
Problem: Keine öffentliche API, nur CLI-Tool (Legendary)
Optionen:
- ❌ Legendary CLI → Funktioniert nicht auf iOS
- ⚠️ Backend mit Epic GraphQL → Reverse-Engineered, gegen ToS
- ✅ Manuelle Import-Funktion → User uploaded JSON
Empfehlung: Manuelle Import-Funktion für MVP
Amazon Games Integration
Problem: Keine öffentliche API, nur CLI-Tool (Nile)
Status: Gleiche Situation wie Epic Empfehlung: Später, wenn Epic funktioniert
🎯 MVP Strategie (iOS/Web Ready)
Phase 1: Steam Only (✅ Fertig)
React/Ionic App
↓
Steam Web API (direkt vom Browser)
↓
1103 Games imported
Phase 2: GOG mit Backend (🔜 Next)
React/Ionic App
↓
Vercel Function (OAuth Proxy)
↓
GOG Galaxy Library API
Phase 3: Epic/Amazon Import (📝 TODO)
React/Ionic App
↓
User uploaded JSON
↓
Parse & Display
🚀 Deployment Plan
Frontend (iOS/Web)
- Hosting: Vercel / Netlify (Static React App)
- PWA: Service Worker für Offline-Support
- iOS: Add to Home Screen (keine App Store App)
Backend (nur für GOG/Epic OAuth)
- Option 1: Vercel Serverless Functions
- Option 2: Cloudflare Workers
- Option 3: Supabase Edge Functions
Datenbank (optional)
- Option 1: localStorage (nur Client-Side)
- Option 2: Supabase (für Cloud-Sync)
- Option 3: Firebase Firestore
❓ FAQ
Warum kein Python/CLI auf iOS?
iOS erlaubt keine nativen Binaries in Web-Apps. Nur JavaScript im Browser oder Swift in nativer App.
Warum brauchen wir ein Backend?
OAuth Secrets können nicht sicher im Browser gespeichert werden (jeder kann den Source-Code sehen). CORS blockiert direkte API-Calls.
Kann ich die App ohne Backend nutzen?
Ja! Steam funktioniert ohne Backend. GOG/Epic brauchen aber Backend oder manuelle Imports.
Wie sicher sind die Tokens?
- Development: Tokens in
config.local.json(nicht in Git!) - Production: Tokens im Backend, verschlüsselt in DB
- iOS: Tokens im Keychain (nativer secure storage)
📋 Checklist
- Steam API Integration
- React/Ionic UI Setup
- Tab Navigation (Home, Library, Playlists, Discover, Settings)
- Game Consolidation (Duplicates merging)
- Blizzard API Integration
- Settings-Tab mit Tutorials
- ConfigService (localStorage + IndexedDB)
- GOG OAuth Backend (Cloudflare Worker)
- Epic Import-Funktion (JSON Upload)
- PWA Setup (Service Worker)
- iOS Testing (Add to Home Screen)
- Cloud-Sync (optional)
🔗 Nützliche Links
- Steam Web API Docs
- GOG Galaxy API
- Heroic Launcher (Referenz-Implementation)
- Ionic React Docs
- PWA Guide