WorldGuessr game (frontend + backend)
  • JavaScript 46.6%
  • TypeScript 45.9%
  • SCSS 4.7%
  • CSS 2%
  • HTML 0.7%
Find a file
2026-08-12 12:01:19 +00:00
.claude Enhance ELO refund logic and report handling during user deletion 2026-07-01 14:58:37 -05:00
.forgejo/workflows Fix sync: allow unrelated histories for initial upstream merge 2026-03-23 17:24:38 +01:00
.github/workflows Enhance fluid zoom functionality and improve zoomSnap behavior 2026-07-16 13:10:04 -05:00
api Implement dailyDaysPlayed tracking in User model and update related components to reflect total days played. Enhance user data fetching in results and submit APIs to include dailyDaysPlayed, ensuring accurate lifetime statistics. Update DailyLanding and PersonalRecordsCard components to display days played, improving user experience with clearer performance metrics. 2026-08-02 13:26:37 -05:00
components Merge remote-tracking branch 'upstream/master' 2026-08-07 00:01:15 +00:00
data Fix country-map repeats and expand country pools to 4.2M Vali locations 2026-07-31 21:24:12 -05:00
docs Update bot eligibility criteria in environment variables documentation 2026-07-15 22:05:49 -05:00
embed WIP: party/2v2 chat, party security + host transfer, in-house Street View renderer 2026-07-27 13:40:51 -05:00
lib Enhance tile compositor for mobile: improve frame handling and zoom transitions 2026-08-06 17:02:12 -05:00
mapgens Refactor data structure and enhance location handling in the application 2026-05-02 15:02:30 -05:00
mobile Enhance tile compositor for mobile: improve frame handling and zoom transitions 2026-08-06 17:02:12 -05:00
models Implement dailyDaysPlayed tracking in User model and update related components to reflect total days played. Enhance user data fetching in results and submit APIs to include dailyDaysPlayed, ensuring accurate lifetime statistics. Update DailyLanding and PersonalRecordsCard components to display days played, improving user experience with clearer performance metrics. 2026-08-02 13:26:37 -05:00
pages Major pano loading optimizations (adding preloading for web) + packaging improvements for third party portals 2026-07-28 22:08:15 -05:00
public Update common.json 2026-08-10 10:43:53 -05:00
scripts Implement dailyDaysPlayed tracking in User model and update related components to reflect total days played. Enhance user data fetching in results and submit APIs to include dailyDaysPlayed, ensuring accurate lifetime statistics. Update DailyLanding and PersonalRecordsCard components to display days played, improving user experience with clearer performance metrics. 2026-08-02 13:26:37 -05:00
serverUtils Allow forum-name collisions — suffixing is fine, identity is by wg_id 2026-07-22 17:52:29 +00:00
shared WIP: party/2v2 chat, party security + host transfer, in-house Street View renderer 2026-07-27 13:40:51 -05:00
spec-claude Refactor Game and Home screens for improved navigation and layout 2026-02-07 20:46:03 -06:00
styles Re-enable NitroPay integration as a revenue stopgap while the Playwire swap is in progress. Update related comments and imports across components to reflect the restoration of NitroPay, ensuring continuity in ad serving until Playwire's implementation is complete. 2026-08-02 23:50:04 -05:00
utils Implement stale entry purging in daily status cache 2026-07-18 23:53:13 -05:00
ws Enhance UI and performance in various components 2026-07-29 17:58:57 -05:00
.eslintrc.json Initial commit 2026-03-15 13:37:08 +01:00
.gitignore Fix country-map repeats and expand country pools to 4.2M Vali locations 2026-07-31 21:24:12 -05:00
.replit Initial commit 2026-03-15 13:37:08 +01:00
authServer.js Move googleAuth and setName, critical endpoints to separate authServer for consistent uptime and reliability 2026-04-16 22:06:06 -05:00
clientConfig.js Move googleAuth and setName, critical endpoints to separate authServer for consistent uptime and reliability 2026-04-16 22:06:06 -05:00
cron.js Fix country-map repeats and expand country pools to 4.2M Vali locations 2026-07-31 21:24:12 -05:00
Dockerfile Dockerfile: use --no-frozen-lockfile to tolerate upstream-merge lockfile drift 2026-06-01 11:45:54 +02:00
jsconfig.json Initial commit 2026-03-15 13:37:08 +01:00
LICENSE.md Replace MIT License with PolyForm Noncommercial License 1.0.0, detailing terms for use, distribution, and modifications. 2026-03-29 19:11:02 -05:00
mobile-team-parity-plan.md Add audio/music system, duel bots, 2v2 reporting polish, and daily challenge DQ handling 2026-07-10 11:14:42 -05:00
next.config.js Major pano loading optimizations (adding preloading for web) + packaging improvements for third party portals 2026-07-28 22:08:15 -05:00
package.json Major pano loading optimizations (adding preloading for web) + packaging improvements for third party portals 2026-07-28 22:08:15 -05:00
pnpm-lock.yaml Add GrowthBook dependency and enhance onboarding flow 2026-07-23 18:52:24 -05:00
pnpm-workspace.yaml chore: Upgrade pnpm lockfile to version 9.0 and update dependencies 2026-02-01 22:50:38 -06:00
Procfile Initial commit 2026-03-15 13:37:08 +01:00
README.md Team parity sweep, iOS street view 60fps fix, emote mute, host force-end, fluid wheel zoom 2026-07-15 10:48:53 -05:00
removeCloseLocs.cjs Initial commit 2026-03-15 13:37:08 +01:00
replit.nix Initial commit 2026-03-15 13:37:08 +01:00
server.js Fix country-map repeats and expand country pools to 4.2M Vali locations 2026-07-31 21:24:12 -05:00
streetview-demo.html WIP: party/2v2 chat, party security + host transfer, in-house Street View renderer 2026-07-27 13:40:51 -05:00
welcome.js Initial commit 2026-03-15 13:37:08 +01:00

WorldGuessr

A free and open-source version of the popular geography game inspired by GeoGuessr. This React based project aims to provide a fun and educational way to explore the world through Google Street View imagery.

Play now here!

Join the Discord community

Features

  • Random Street Views: Experience a new location anywhere in the world on each game.
  • Multiplayer Mode: Challenge your friends or play against random opponents in real-time.
  • Country Streaks: Test your knowledge and see how many countries you can guess in a row.
  • Free to run: The project is open-source and free to run on your own server. Uses the Google Maps Streetview Embed API, which is completely free compared to the costly SDK used by GeoGuessr.

Acknowledgements

  • Leaflet for the minimap display.
  • Leaflet.SmoothWheelZoom by mutsuyuki, which our fluid scroll-wheel zoom (lib/leafletFluidZoom.js) is adapted from.
  • Google Maps API for the generous free-tier on street view imagery.
  • Vali by @SlashP for generating balanced locations distributions for all countries.
  • Next.js for the web application.
  • All contributors who helped bring this project to life!

Running Locally

Prerequisites

Before you start, ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/codergautam/worldguessr.git
    cd worldguessr
    
  2. Install dependencies:

    pnpm install
    
  3. Run the development server:

    pnpm run dev
    

    Open http://localhost:3000 with your browser to see the result.

Deploying to a VPS / External Server

If you're deploying WorldGuessr on a VPS or any server with an external IP (not localhost), you must configure these environment variables in your .env file:

# Replace YOUR_IP with your server's IP address or domain
NEXT_PUBLIC_API_URL=YOUR_IP:3001
NEXT_PUBLIC_WS_HOST=YOUR_IP:3002

Example with IP:

NEXT_PUBLIC_API_URL=123.45.67.89:3001
NEXT_PUBLIC_WS_HOST=123.45.67.89:3002

Example with domain (after setting up nginx):

NEXT_PUBLIC_API_URL=api.yourdomain.com
NEXT_PUBLIC_WS_HOST=ws.yourdomain.com

Quick Setup Checklist

  1. MongoDB - Create a cluster on MongoDB Atlas (free tier available) and add the connection string:

    MONGODB=mongodb+srv://username:password@cluster.mongodb.net/worldguessr
    
  2. Google OAuth - Create credentials at Google Cloud Console:

    NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_client_id.apps.googleusercontent.com
    GOOGLE_CLIENT_SECRET=your_client_secret
    
  3. API/WS URLs - Point to your external IP or domain (see above)

For detailed environment variable documentation, see docs/environment-variables.md.

Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the PolyForm Noncommercial License 1.0.0. You are free to use, modify, and distribute this project for noncommercial purposes. See LICENSE.md for more information.

Community

Join the Discord community here to discuss new features, report bugs, talk to the developers and connect with other players.

You can email me privately at gautam@worldguessr.com