Files
whattoplay/docs/IOS-WEB-STRATEGY.md
2026-03-01 12:03:42 +01:00

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):

  1. Öffne https://www.gog.com (eingeloggt)
  2. Browser DevTools → Network → Kopiere Bearer Token
  3. Trage in config.local.json ein

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:

  1. Legendary CLI → Funktioniert nicht auf iOS
  2. ⚠️ Backend mit Epic GraphQL → Reverse-Engineered, gegen ToS
  3. 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)