mirror of
https://github.com/tiennm99/vngeoguessr.git
synced 2026-10-11 03:13:56 +00:00
Below 3 points the result dialog says whether the guess had the right district or province, located server-side from the boundaries. The reveal links the spot on OpenStreetMap, and a Share button builds a squares line with the region's URL. Region pages and the root carry Open Graph metadata for link previews. An expired round is worded as expired rather than as a failed save. A skipped round gets a fresh session id so the unawaited delete cannot kill the next round. Below sm the theme switch collapses to one cycling button and the tally hides, so the mute control stays on a 360px screen. The panorama viewer loads on demand, taking three.js out of the first load.
51 lines
2.5 KiB
Bash
51 lines
2.5 KiB
Bash
# Copy to .env and fill in. Every value here is a placeholder, never a real key.
|
|
#
|
|
# Only the variables the app actually reads are listed. The Vercel Marketplace
|
|
# integrations inject a larger block (PGHOST, POSTGRES_PASSWORD, KV_URL and so
|
|
# on) that nothing in this codebase reads -- leave those as `vercel env pull`
|
|
# writes them.
|
|
#
|
|
# Reference: docs/development.md > Environment Variables
|
|
|
|
# --- Mapillary (required) ---------------------------------------------------
|
|
# Without this every round fails: src/lib/mapillary.js throws on a missing token.
|
|
# Also required by scripts/build-pano-index.mjs.
|
|
# Create one at https://www.mapillary.com/dashboard/developers
|
|
MAPILLARY_ACCESS_TOKEN=
|
|
|
|
# --- Postgres (required) ----------------------------------------------------
|
|
# Neon connection string holding the panorama index. Either name works;
|
|
# `vercel env pull` writes both. Seed it with `npm run data:seed`.
|
|
DATABASE_URL=postgresql://user:password@host.neon.tech/dbname?sslmode=require
|
|
# POSTGRES_URL=
|
|
|
|
# --- Redis (required) -------------------------------------------------------
|
|
# Either the vanilla Upstash pair...
|
|
# UPSTASH_REDIS_REST_URL=https://example.upstash.io
|
|
# UPSTASH_REDIS_REST_TOKEN=
|
|
# ...or the Vercel Marketplace alias for the same thing. Set one pair, not both.
|
|
KV_REST_API_URL=https://example.upstash.io
|
|
KV_REST_API_TOKEN=
|
|
|
|
# Namespace for every physical Redis key, so this project can share an Upstash
|
|
# database with others without collisions. Optional; defaults to 'vngeoguessr:'.
|
|
# Do not set it empty -- src/lib/upstash.js treats that as unset on purpose.
|
|
# KEY_PREFIX=vngeoguessr:
|
|
|
|
# --- Debug API (optional) ---------------------------------------------------
|
|
# In Vercel production /api/debug/* returns 404 unless the request carries this
|
|
# value as the `x-debug-key` header or the `vng_debug` cookie. Leave unset to
|
|
# keep the debug API closed there. Off production it is always open.
|
|
# DEBUG_ACCESS_KEY=
|
|
|
|
# --- Link previews (optional) -----------------------------------------------
|
|
# Absolute origin for Open Graph URLs. Defaults to Vercel's production URL.
|
|
# NEXT_PUBLIC_SITE_URL=https://example.com
|
|
|
|
# --- Map tiles (optional) ---------------------------------------------------
|
|
# Read at BUILD time, not runtime. Unset, all Leaflet maps fall back to the OSM
|
|
# public tile server: fine for dev and e2e, but its policy forbids commercial
|
|
# use, so set this before any commercial deployment. The key is public by
|
|
# design -- restrict it to the production domain in the Geoapify dashboard.
|
|
# NEXT_PUBLIC_GEOAPIFY_KEY=
|