Games as plugins, not pages

A walk through the module contract: index.ts, meta.ts, scoped styles, and the one-line registration.

Every game lives in /games/<slug>/ with four fixed pieces: index.ts (the entry), Game.tsx (the play view), styles/ (CSS Modules) and meta.ts (multilingual metadata). The entry never imports Game.tsx eagerly — the play page pulls it through a dynamic import, so game code never bloats the initial bundle. The only central file is lib/gameRegistry.ts. Adding a game means adding one folder and one line. Sitemap, hreflang tags, listing pages and detail pages are all derived at build time from that single registration.

Back to the dev log