Summary
GameHacking.org is a rich source of cheat codes covering many retro gaming systems, but has no public API. The current implementation (GameHackingOrgLookup.swift) uses an HTML scraper that works but is fragile — it will break if GameHacking.org changes its page structure.
A thin middleware/proxy server would provide:
- Stability: Scraping logic lives server-side; no app update needed when site changes
- Caching: Server-side cache reduces load on GameHacking.org
- Normalization: Consistent JSON response regardless of source site changes
- Future extensibility: Add more cheat sources (NoCash, other sites) without app updates
- Rate limiting: Centralized rate limiting prevents the app from being blocked
Proposed Architecture
The app calls a thin proxy: GET /cheats?title=<title>&system=<slug>
The proxy scrapes GameHacking.org (with 24h server-side cache) and returns a JSON array of cheat entries.
Implementation Notes
- Language: Node.js/Bun, Go, Python, or Cloudflare Workers (recommended)
- Hosting: Cloudflare Workers (free tier ~100k req/day), Fly.io, or JoeMatt's VPS
- Endpoint:
GET /cheats?title=<title>&system=<slug> returns JSON cheat array
- Cache: KV store with 24h TTL per (title, system) pair
- App integration: Replace
GameHackingOrgLookup with a simple JSON REST call
In-App Fallback
The current in-app HTML scraper (GameHackingOrgLookup.swift, added in #3069) serves as a working fallback until this middleware is deployed. When the middleware is available, the app can prefer it via a PVSettings toggle or remote config flag.
References
Part of #2505
Summary
GameHacking.org is a rich source of cheat codes covering many retro gaming systems, but has no public API. The current implementation (
GameHackingOrgLookup.swift) uses an HTML scraper that works but is fragile — it will break if GameHacking.org changes its page structure.A thin middleware/proxy server would provide:
Proposed Architecture
The app calls a thin proxy:
GET /cheats?title=<title>&system=<slug>The proxy scrapes GameHacking.org (with 24h server-side cache) and returns a JSON array of cheat entries.
Implementation Notes
GET /cheats?title=<title>&system=<slug>returns JSON cheat arrayGameHackingOrgLookupwith a simple JSON REST callIn-App Fallback
The current in-app HTML scraper (
GameHackingOrgLookup.swift, added in #3069) serves as a working fallback until this middleware is deployed. When the middleware is available, the app can prefer it via aPVSettingstoggle or remote config flag.References
PVLibrary/Sources/PVLibrary/Cheat/GameHackingOrgLookup.swiftPart of #2505