Skip to content
OpenEnvisionGameMap
GameMap
GameMap
LearnGuides & notes

Templates & project notes

Project overviewContributingDevelopment & deploymentContent model & coverage
中文/English

Website development and deployment

  • 6 sections

A guide can work at the development server root and still lose a screenshot or language link under the published subpath. Edit with the local server, then build with the Pages base and open the result in the static preview. The deployment target is GitHub Pages. It serves HTML, CSS, JavaScript, media, and a browser-side search index. An installation can also enable Supabase Direct for community features.

Local development

Use Node.js 22.22 or newer:

npm ci
npm run dev

npm run dev generates derived catalog files, prepares Markdown documents, watches source changes, and starts the local React Router development server.

Open the URL printed by React Router. The main routes are:

  • / — overview and featured game examples.
  • /resources/ — searchable, filterable resources and browser-local collections.
  • /examples/ — playable games with creator evidence and project source.
  • /testing/ — projects, environments, assets, and motion-data references.
  • /docs/ — the game AI research handbook and its source records.
  • /papers/ — publications indexed by research topic.
  • /research/ — repository records with source and review information.

The application lives in website/app/. Structured catalog data lives in data/segments/ and website/src/data/; public source assets remain in website/public/.

Documents and internal links

Markdown under docs/ (including docs/reference/catalog.md), plus README.md and CONTRIBUTING.md, is rendered at build time; the folder indexes docs/README.md and docs/zh/README.md are for repository readers only. Articles include navigation, a table of contents, highlighted code, heading links, and full-text search.

scripts/build/prepare-docs.mjs creates disposable copies in website/.content/. It derives titles, rewrites internal Markdown links to document routes, and stages local documentation images in the ignored website/public/docs-assets/ directory. Original research text is not rewritten. website/docs.config.json controls navigation groups and short labels; ungrouped articles remain available under More notes.

The document source uses Fumadocs MDX's Vite integration in Markdown-only mode; catalog prose cannot execute MDX expressions or imports. Article bodies are lazy-loaded on client navigation, but every document also ships as complete HTML, so direct links and reading without JavaScript work. Full-text search loads a static index into the browser; there is no /api/search server in production.

Build and validate

node scripts/build/generate.mjs
npm run check
npm run build
npm run check:build
  • generate.mjs synchronizes the resource catalog and downloadable editorial files. It does not overwrite the README.
  • npm run check validates source data, public source media, bilingual translations, and formatting without requiring build output.
  • npm run build prepares documents, checks TypeScript, pre-renders routes, and assembles the static dist/ directory.
  • npm run check:build validates deployed documents and media, every rendered article, internal links and assets, the static search index, and the real 404 page.

To reproduce the GitHub Pages subpath locally:

PAGES_BASE_PATH=/GameMap/ npm run build
npm run check:build
npm run preview

The preview command reads the base path from the built site and prints the correct URL. It serves static files only, with no SPA fallback, matching GitHub Pages more closely than a development server.

In that preview, open a changed article by URL, refresh it, switch languages, and follow a local asset or section link in the article. If it only fails in the preview, check whether the broken URL starts at the site root or repeats the /GameMap/ prefix. If direct refresh fails while a click from the home page works, look for the article's generated directory and index file in dist/.

Supabase Direct community mode

GameMap supports optional zero-server community interactions (email/GitHub sign-in, ratings, comments, reports, screenshot submissions, and browser moderation) using Supabase Cloud directly from the static site.

  • The checked-in supabase/direct-mode/enable-supabase-direct.sql extends an existing Supabase schema. It requires migrations 0001 through 0031, which are absent from this checkout. On an already migrated instance, npm run community:direct-sql -- --with-games --out .build/setup.sql generates the extension and a call to the existing game-sync function. For a fresh checkout without those migrations, use the default static build.
  • Set VITE_GAMEMAP_COMMUNITY=1, VITE_GAMEMAP_COMMUNITY_MODE=supabase-direct, VITE_SUPABASE_URL, and VITE_SUPABASE_PUBLISHABLE_KEY at build time, or configure GAMEMAP_SUPABASE_URL and GAMEMAP_SUPABASE_PUBLISHABLE_KEY as GitHub Actions repository variables.

GitHub Pages setup

A repository administrator, maintainer, or custom role with Pages management permission must:

  1. Open Settings → Pages and select GitHub Actions under Build and deployment → Source.
  2. Enable Actions and allow deployments from main in the github-pages environment.
  3. Push or merge to main, or choose Actions → Deploy GameMap to GitHub Pages → Run workflow on main.

The URL serves this site only after Pages is enabled and deployment succeeds. Never include credentials or private data in public assets.

Deployment workflow

  • .github/workflows/catalog.yml validates generated content, runs npm run check, builds with the /GameMap/ base, and runs npm run check:build on pull requests. It does not publish.
  • .github/workflows/deploy-pages.yml builds and validates on main with Supabase Direct community enabled, uploads only dist/, and publishes with official SHA-pinned Pages actions. Pages/OIDC write permissions are scoped to the deploy job.
  • The publishing build sets PAGES_BASE_PATH from Pages metadata. React Router uses the same basename; build finalization flattens pre-rendered routes so the published directory is not nested under a second GameMap/.
  • All application and document routes are pre-rendered. Initial route discovery is embedded, so client navigation never depends on a server-side route-manifest API. Unknown paths receive a real 404 page.

Source code, lockfiles, editorial files, and original media stay versioned. Build output, staged document copies and images, caches, and local secrets are ignored; see the versioning policy.

The site includes local Inter fonts. Upstream dependency and font license texts are collected in the built THIRD-PARTY-NOTICES.txt file. External creator demos, project pages, and source repositories still require internet access.

For repository settings and troubleshooting, see the official GitHub Pages workflow guide.

Sources & document information

Project overview, contribution standards, and site maintenance.

View Markdown source

Contributing

Previous Page

Content model & coverage

Next Page

GameMap

A little direction for your next playable world.

Games

  • Game examples

Tools

  • Resources
  • Agent toolkit
  • Testing library

Research

  • Papers
  • Repository research

Learn

  • Guides & notes
GitHub
GameMap

On this page

Local developmentDocuments and internal linksBuild and validateSupabase Direct community modeGitHub Pages setupDeployment workflow