{"id":24794064,"url":"https://github.com/nuxt-hub/multiplayer-globe","last_synced_at":"2025-08-10T08:05:48.334Z","repository":{"id":274783056,"uuid":"923725199","full_name":"nuxt-hub/multiplayer-globe","owner":"nuxt-hub","description":"Display website visitor locations in real-time using Nuxt and NuxtHub.","archived":false,"fork":false,"pushed_at":"2025-04-14T23:16:04.000Z","size":505,"stargazers_count":64,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T23:26:32.976Z","etag":null,"topics":["cloudflare","cobe","durable-objects","nuxt","nuxthub","realtime"],"latest_commit_sha":null,"homepage":"https://multiplayer-globe.nuxthub.workers.dev","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nuxt-hub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-28T18:31:07.000Z","updated_at":"2025-04-14T23:16:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"257d6cc7-4b55-40cd-ae8f-697ea266f543","html_url":"https://github.com/nuxt-hub/multiplayer-globe","commit_stats":null,"previous_names":["nuxt-hub/multiplayer-globe"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/nuxt-hub/multiplayer-globe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-hub%2Fmultiplayer-globe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-hub%2Fmultiplayer-globe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-hub%2Fmultiplayer-globe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-hub%2Fmultiplayer-globe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nuxt-hub","download_url":"https://codeload.github.com/nuxt-hub/multiplayer-globe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nuxt-hub%2Fmultiplayer-globe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269693593,"owners_count":24460248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","cobe","durable-objects","nuxt","nuxthub","realtime"],"created_at":"2025-01-29T22:32:43.073Z","updated_at":"2025-08-10T08:05:48.325Z","avatar_url":"https://github.com/nuxt-hub.png","language":"Vue","funding_links":[],"categories":["Vue","Starter Kits"],"sub_categories":[],"readme":"# Multiplayer Globe App with Nuxt\n\nDisplay website visitor locations in real-time using [Nuxt](https://nuxt.com) and [NuxtHub](https://hub.nuxt.com).\n\n[https://multiplayer-globe.nuxthub.workers.dev](https://multiplayer-globe.nuxthub.workers.dev)\n\n\u003ca href=\"https://multiplayer-globe.nuxthub.workers.dev\"\u003e\n\u003cimg src=\"./public/og-image.png\" alt=\"Multiplayer Globe App with Nuxt\" /\u003e\n\u003c/a\u003e\n\n[![Deploy to NuxtHub](https://hub.nuxt.com/button.svg)](https://admin.hub.nuxt.com/new?template=multiplayer-globe)\n\n## Credits\n\nInspired by \u003ca href=\"https://github.com/cloudflare/templates/tree/main/multiplayer-globe-template\"\u003eCloudflare's multiplayer-globe-template\u003c/a\u003e.\n\n## Features\n\n- Server-Side rendering on Cloudflare Workers\n- ESLint setup\n- Ready to add a database, blob and KV storage\n- One click deploy on 275+ locations for free\n\n## How it works\n\nWhen the first request is made, the server store the user's location (latitude and longitude) using the [`useState`](https://nuxt.com/docs/api/composables/use-state) composable in the [`app/plugins/location.server.ts`](./app/plugins/location.server.ts) file.\n\nA `/ws/visitors` websocket endpoint is created in the [`server/routes/ws/visitors.ts`](./server/routes/ws/visitors.ts) file using the [`defineWebSocketHandler`](https://nitro.build/guide/websocket) function.\n\nWhen the [`index.vue` page](./app/pages/index.vue) is mounted on client-side, it connects to the `/ws/visitors` websocket endpoint with its location as query parameters to the server.\n\nThe websocket endpoints send back the user locations to the client-side.\n\n## Setup\n\nMake sure to install the dependencies with [pnpm](https://pnpm.io/installation#using-corepack):\n\n```bash\npnpm install\n```\n\n## Development Server\n\nStart the development server on `http://localhost:3000`:\n\n```bash\npnpm dev\n```\n\n\u003e [!TIP]\n\u003e A random location is generated in development as we don't have access to Cloudflare's geolocation data on the incoming request.\n\n## Production\n\nBuild the application for production:\n\n```bash\npnpm build\n```\n\n## Deploy\n\nDeploy with one command on your Cloudflare account with:\n\n```bash\nnpx nuxthub deploy\n```\n\nLearn more on https://hub.nuxt.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt-hub%2Fmultiplayer-globe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnuxt-hub%2Fmultiplayer-globe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnuxt-hub%2Fmultiplayer-globe/lists"}