Behind the scenes
How the site works (plain English)
A quick tour of the architecture so families and collaborators know what keeps Games inc. Jr running smoothly.
- Built with Next.js so most screens render on the server for instant loads.
- Game metadata lives in a tiny JSON file and a helper reads it across the app.
- Playable demos are static HTML/JS bundles inside /public, embedded with sandboxed iframes.
- Community posts go through a simple API backed by Upstash Redis (with an in-memory fallback for local dev).
- Magic AI Friends: per‑user sessions via a simple username cookie; chat logs saved to Vercel Blob (filesystem fallback in dev).
- Magic AI Friends: streaming NDJSON responses from the API; the client displays tokens live and prepends the last 20 Q&A pairs as context.
- Magic AI Friends: centralised character prompts; short replies by default with optional longer Story:/Fact: sections.
- Security headers and iframe sandboxing keep previews contained.
- Italian and English copy live side by side so localisation is easy to expand.
- Deployments run on Vercel—push to main and the site updates automatically.
