Switch language한국어
Back to the list

How We Built a Gaming Portal with 8,000+ Games Using Next.js and 38-Language Translation

TL;DR AI

Key summary

2 min read
  1. Sonsaur.com is a free browser gaming portal with a catalog of over 8,000 games.

  2. Built on Next.js 16 (App Router) with Neon PostgreSQL and Prisma 7; hosted on a DigitalOcean VPS and served via Cloudflare.

  3. Custom nginx image CDN (img.sonsaur.com) serves pre-resized AVIF thumbnails (128px ~6KB, 256px ~13KB); originals stored as AVIF 512px.

  4. Search uses PostgreSQL trigram (pg_trgm) for fuzzy search; images use zero-JS plain img tags, reducing game-card image payloads by 84%.

  5. AI translation uses the Gemini API with 60 rotated keys to translate 8,000 games into 38 languages; cron runs every 2 minutes processing 60 games sequentially, yielding ~43,200 pages/day; PM2 manages processes; Lighthouse: P79 A93 BP100 SEO100; first load <3s; subsequent navigations near-instant.

Read the original