Spotland

A free geography guessing game. Click the country, pick the flag, or nail the capital — world map or regional rounds, plus a Wordle-style daily challenge. No accounts, no backend — everything runs client-side with localStorage for streaks and personal bests.

Built with VitePress in full custom-theme mode (not docs mode), Vue 3, Tailwind CSS, and @melenaos/vue-codyhouse for UI components.

Setup

@melenaos/vue-codyhouse is a private package on GitHub Packages, so you need a GitHub personal access token with read:packages scope before installing:

sh
export NPM_TOKEN=ghp_your_token_here   # PowerShell: $env:NPM_TOKEN = "ghp_your_token_here"
npm install

.npmrc reads NPM_TOKEN from the environment — never commit a token.

Development

sh
npm run dev       # local dev server
npm run build     # production build to .vitepress/dist
npm run preview   # preview the production build locally

Country/region metadata in data/countries.json and data/regions.json is generated from public/world.svg. To regenerate after editing scripts/generate-data.mjs:

sh
npm run generate:data

Deployment

.github/workflows/deploy.yml builds and deploys to GitHub Pages on every push to main, via actions/deploy-pages (no gh-pages branch). Two things to set up on the repo once:

  1. Settings → Pages → Source: set to "GitHub Actions".
  2. Settings → Secrets and variables → Actions: add a repo secret named NPM_TOKEN (a GitHub PAT with read:packages scope) so CI can install the private package.

Attribution