How the site works (plain English)

  1. Pages: The site runs on Next.js. Most pages are simple server-rendered React components.
  2. Games data: A small JSON file in the repo lists games. We read it using a tiny TypeScript helper.
  3. Playable demos: Each demo is a normal HTML/JS file in the public folder, embedded with an iframe. No downloads.
  4. Community feed: A small API lets visitors post and read messages. We store them in Upstash (a hosted Redis). If not configured, it stores in memory for dev.
  5. Login & tiers: A minimal demo login sets a cookie for your selected tier. Later we’ll switch to email magic-links and Stripe.
  6. Security: We set basic headers and run demos in a sandboxed iframe.
  7. Internationalisation: English and Italian pages live under different paths. Copy can be translated per page or per game.
  8. Deploy: Pushing to GitHub triggers Vercel to deploy. Some pages bypass caching so new data shows immediately.
How the site works • Games Inc Jr