HoloSnap Image Proxy
A small Rails service that caches Pokémon TCG card images so the HoloSnap app can serve them quickly, cheaply, and without hammering upstream CDNs.
Image requests arrive at predictable URLs, are looked up in Cloudflare R2, and either streamed back from cache or lazily filled from the original upstream source. The result is stable, cache-friendly URLs for clients and near-zero upstream load after warmup.
What this service does
- Serves
/p/:tcgPlayerId/:size.jpgand/sx/:scrydexId/:size.jpgbehind a Cloudflare CDN. - Caches each unique card image once, then serves it forever from R2.
- Falls back to a 302 redirect to the upstream CDN if the lazy fill fails.
- Exposes an admin dashboard with cache stats and bulk-seed controls.