tiennm99 23ee9d47ff fix(layout): put game chrome in flow and contain third-party z-index
The how-to-play hint was a free-floating overlay centred on the whole game
box, which put it over the guess map search field on desktop and over the
Mapillary attribution -- required visible by their Terms of Use -- on phones.
It now rides PanoramaViewer's topBarSlot as a flex sibling of that credit, so
neither collision is representable.

Replace the ad-hoc z-index values and the two forced 9999 rules with one
ladder of tokens in globals.css. Leaflet and Photo Sphere Viewer ladders are
contained by isolate on the panes that host them rather than out-bid, which
lets the dialog scrim finally cover the action bar and the minimap.

Also: pad the header and content box with the left/right safe-area insets that
viewportFit cover requires, size the collapsed minimap against the viewport so
a landscape phone shrinks it instead of pushing it into the panorama chrome,
hide Leaflet's credit and zoom buttons on that thumbnail and lift the zoom
control clear of the wrapped credit when it expands, move the desktop
"Click to place your guess" badge off the tile credit, raise the hint dismiss
target to 44px, and move the sticky-footer column off body so Radix portals
are not flex items.
2026-09-02 09:53:06 +07:00
2025-08-07 13:08:06 +07:00
2025-08-07 12:27:13 +07:00
2025-08-04 23:11:11 +07:00
2025-08-07 12:27:13 +07:00

VNGeoGuessr

A GeoGuessr clone focused on Vietnamese locations with accurate boundary detection and anti-cheat security. Play geolocation guessing games across a region tree covering the whole country using real street-level imagery.

🎮 Features

  • Region Tree: Whole country, 5 provinces, 61 districts — including Da Lat (Lam Dong) and Duc Hoa (Long An)
  • 360° Street View: Mapillary panoramic images with PhotoSphere viewer
  • Anti-Cheat Security: Server-side session management prevents cheating
  • Distance-Based Scoring: 0-5 point system based on accuracy
  • Persistent Leaderboards: Redis-powered top 200 player rankings
  • Accurate Boundaries: Nominatim API + Turf.js for precise city detection

📚 Documentation

For detailed information about this project, see the documentation in /docs/:

🚀 Getting Started

Prerequisites

  • Node.js 24+
  • npm 11+
  • Redis server (sessions and leaderboards)
  • Postgres database (panorama index; Neon in production)

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Start production server
npm start

# Run linting
npm run lint

Open http://localhost:3000 to play the game.

🏗️ Built With

  • Frontend: Next.js 16 + React 19 + Tailwind CSS 4
  • Street View: Mapillary API + PhotoSphere Viewer
  • Maps: Leaflet + OpenStreetMap
  • Geographic Data: Nominatim API + Turf.js
  • Storage: Neon Postgres (panorama index) + Upstash Redis (leaderboards and game sessions)
  • UI Components: shadcn/ui

🎯 How to Play

  1. Enter your username
  2. Pick a region from the country/province/district tree
  3. View the 360° street panorama
  4. Place your guess on the map
  5. Earn points based on accuracy (closer = more points)
  6. Compete for the top 200 leaderboard spots!

📋 Development Notes

  • JavaScript Only: No TypeScript files
  • Individual Parameters: Functions use separate parameters, not object destructuring
  • Server-Side Security: Game coordinates never sent to client
  • Session Management: Automatic cleanup after 30 minutes

🤝 Contributing

This project follows specific development guidelines. Please read the Development Guidelines before contributing.

S
Description
GeoGuessr clone for Vietnamese locations — Mapillary panoramas, Turf.js boundaries, Upstash REST leaderboards
Readme Apache-2.0
14 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 98.2%
CSS 1.8%