{"id":51401678,"url":"https://github.com/4msar/where-are-you","last_synced_at":"2026-07-04T07:04:08.120Z","repository":{"id":347062536,"uuid":"1192721132","full_name":"4msar/where-are-you","owner":"4msar","description":"Find user by there location, just send the link and get the user location!","archived":false,"fork":false,"pushed_at":"2026-03-27T05:18:47.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T05:40:42.778Z","etag":null,"topics":["cloudflare-kv","cloudflare-worker","google-maps","location","real-time","share"],"latest_commit_sha":null,"homepage":"https://where.msar.me","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4msar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-26T13:52:59.000Z","updated_at":"2026-03-27T05:20:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/4msar/where-are-you","commit_stats":null,"previous_names":["4msar/where-are-you"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/4msar/where-are-you","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4msar%2Fwhere-are-you","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4msar%2Fwhere-are-you/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4msar%2Fwhere-are-you/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4msar%2Fwhere-are-you/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4msar","download_url":"https://codeload.github.com/4msar/where-are-you/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4msar%2Fwhere-are-you/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35112709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"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-kv","cloudflare-worker","google-maps","location","real-time","share"],"created_at":"2026-07-04T07:04:07.068Z","updated_at":"2026-07-04T07:04:08.114Z","avatar_url":"https://github.com/4msar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Where Are You\n\nWhere Are You is a real-time location sharing app built with Next.js.\nUsers get a personal link they can share so others can view their live location on a map.\n\n## Features\n\n- Real-time location sharing with browser geolocation\n- Shareable profile links using dynamic routes: `/[username]`\n- Live map rendering with Google Maps\n- User status tracking: `active`, `idle`, `left`\n- Basic profile data: display name, username, avatar URL\n- Persistent storage using Cloudflare KV\n\n## Main Use Cases\n\n1. Open the home page and allow location access.\n2. Get your generated username and share your personal link.\n3. Another user opens your link to view your current location.\n4. Your location and status update automatically while the app is open.\n\n## Routes\n\n- `/`\n    - Home view for location sharing and map display.\n- `/[username]`\n    - Public profile/location page for a specific user.\n\n## API\n\n### `GET /api/location`\n\nReturns active user locations.\n\nResponse (example):\n\n```json\n[\n    {\n        \"username\": \"calm-fox-japan-42\",\n        \"displayName\": \"Blue Sky\",\n        \"avatarUrl\": \"https://example.com/avatar.png\",\n        \"status\": \"active\",\n        \"location\": { \"lat\": 40.7128, \"lng\": -74.006 },\n        \"lastUpdated\": \"2026-03-26T11:20:00.000Z\"\n    }\n]\n```\n\n### `POST /api/location`\n\nCreates or updates user location/status.\n\nRequest body:\n\n```json\n{\n    \"username\": \"calm-fox-japan-42\",\n    \"displayName\": \"Blue Sky\",\n    \"avatarUrl\": \"https://example.com/avatar.png\",\n    \"status\": \"active\",\n    \"location\": { \"lat\": 40.7128, \"lng\": -74.006 }\n}\n```\n\nResponse:\n\n```json\n{ \"success\": true }\n```\n\n### `GET /api/user?username=\u003cusername\u003e`\n\nChecks whether a user exists and returns profile details.\n\nResponse (example):\n\n```json\n{\n    \"exists\": true,\n    \"user\": {\n        \"username\": \"calm-fox-japan-42\",\n        \"displayName\": \"Blue Sky\",\n        \"status\": \"active\",\n        \"location\": { \"lat\": 40.7128, \"lng\": -74.006 },\n        \"lastUpdated\": \"2026-03-26T11:20:00.000Z\"\n    }\n}\n```\n\n### `PUT /api/user`\n\nUpdates profile fields and optional status.\n\nRequest body:\n\n```json\n{\n    \"oldUsername\": \"calm-fox-japan-42\",\n    \"newUsername\": \"calm-fox-japan-77\",\n    \"displayName\": \"Blue Sky\",\n    \"avatarUrl\": \"https://example.com/new-avatar.png\",\n    \"status\": \"active\"\n}\n```\n\nResponse:\n\n```json\n{\n    \"success\": true,\n    \"user\": {\n        \"username\": \"calm-fox-japan-77\",\n        \"displayName\": \"Blue Sky\",\n        \"status\": \"active\",\n        \"location\": { \"lat\": 40.7128, \"lng\": -74.006 },\n        \"lastUpdated\": \"2026-03-26T11:20:00.000Z\"\n    }\n}\n```\n\n## Tech Stack\n\n- Next.js 16\n- React 19\n- Tailwind CSS\n- Google Maps (`@vis.gl/react-google-maps`)\n- Cloudflare KV (data persistence)\n\n## Environment Variables\n\nCreate a `.env.local` file in the project root:\n\n```bash\nNEXT_PUBLIC_GOOGLE_MAPS_API_KEY=your_google_maps_api_key\nCLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_id\nCLOUDFLARE_KV_NAMESPACE_ID=your_kv_namespace_id\nCLOUDFLARE_KV_API_TOKEN=your_cloudflare_kv_api_token\n```\n\n## Getting Started\n\nInstall dependencies:\n\n```bash\nnpm install\n```\n\nRun development server:\n\n```bash\nnpm run dev\n```\n\nBuild for production:\n\n```bash\nnpm run build\n```\n\nStart production server:\n\n```bash\nnpm start\n```\n\nRun lint:\n\n```bash\nnpm run lint\n```\n\n## Notes and Limitations\n\n- Location sharing requires browser geolocation permission.\n- Geolocation generally requires HTTPS (or localhost in development).\n- Location updates run on a fixed interval (currently 30 seconds).\n- User idle status is time-based (currently 60 seconds without updates).\n- Username is constrained to lowercase letters, numbers, and hyphens.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4msar%2Fwhere-are-you","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4msar%2Fwhere-are-you","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4msar%2Fwhere-are-you/lists"}