How We Built a Gaming Portal with 8,000+ Games Using Next.js and 38-Language Translation
We recently relaunched Sonsaur.com, a free browser gaming portal with over 8,000 games. Here's the tech stack and interesting challenges we solved. The Stack Framework: Next.js 16 with App Router D...

Source: DEV Community
We recently relaunched Sonsaur.com, a free browser gaming portal with over 8,000 games. Here's the tech stack and interesting challenges we solved. The Stack Framework: Next.js 16 with App Router Database: Neon PostgreSQL with Prisma 7 ORM Hosting: DigitalOcean VPS + Cloudflare CDN Image CDN: Custom nginx-based CDN (img.sonsaur.com) serving pre-resized AVIF thumbnails Search: PostgreSQL trigram indexes (pg_trgm) for fuzzy game search AI Translation: Gemini API with 60-key rotation for rate limit management Process Manager: PM2 with auto-restart and memory limits The Image CDN Challenge With 8,000+ games, each needing thumbnails, image optimization was critical. We built a custom image pipeline: Original images stored as AVIF at 512px Pre-resized to 128px (~6KB) and 256px (~13KB) variants Served via dedicated nginx subdomain (img.sonsaur.com) Zero-JavaScript image components (plain `` tags for zero hydration cost) Result: 84% reduction in image payload for game cards. Translating 8,000