{"id":50967867,"url":"https://github.com/asklar/worldcup-map-canvas-2026","last_synced_at":"2026-06-18T22:31:04.563Z","repository":{"id":365581222,"uuid":"1272783058","full_name":"asklar/worldcup-map-canvas-2026","owner":"asklar","description":"Interactive map of 2026 FIFA World Cup matches (results \u0026 upcoming) as a GitHub Copilot canvas extension. Leaflet + OpenStreetMap, data from TheSportsDB.","archived":false,"fork":false,"pushed_at":"2026-06-18T00:13:35.000Z","size":14154,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T02:12:36.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/asklar.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-17T23:47:58.000Z","updated_at":"2026-06-18T00:13:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/asklar/worldcup-map-canvas-2026","commit_stats":null,"previous_names":["asklar/worldcup-map-canvas-2026"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/asklar/worldcup-map-canvas-2026","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2Fworldcup-map-canvas-2026","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2Fworldcup-map-canvas-2026/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2Fworldcup-map-canvas-2026/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2Fworldcup-map-canvas-2026/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asklar","download_url":"https://codeload.github.com/asklar/worldcup-map-canvas-2026/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asklar%2Fworldcup-map-canvas-2026/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34510281,"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-06-18T02:00:06.871Z","response_time":128,"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":[],"created_at":"2026-06-18T22:31:03.812Z","updated_at":"2026-06-18T22:31:04.557Z","avatar_url":"https://github.com/asklar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌎 2026 FIFA World Cup Map — Copilot Canvas Extension\n\nA [GitHub Copilot **canvas extension**](https://docs.github.com/en/copilot/how-tos/github-copilot-app/working-with-canvas-extensions)\nthat renders the 2026 FIFA World Cup on an interactive map. Each match is a marker placed\nat its venue — **green for finished results, orange for upcoming fixtures** — with popups\nshowing team badges, score or kickoff time, venue, and round. You can filter by status or\nteam, and the agent can drive the map for you.\n\nMatch data comes live from [TheSportsDB](https://www.thesportsdb.com/); the map uses\n[Leaflet](https://leafletjs.com/) with [OpenStreetMap](https://www.openstreetmap.org/) tiles.\n\nhttps://github.com/user-attachments/assets/d50dadb2-0919-4783-91bb-5f5a927385fb\n\n\u003e **Note:** Canvases render in the **GitHub Copilot desktop app** side panel — not in the\n\u003e CLI terminal. You need the app to see the map.\n\n## Install\n\nClone into your user-scoped Copilot extensions directory so it's available in every session:\n\n```bash\ngit clone https://github.com/asklar/worldcup-map-canvas-2026 \"$HOME/.copilot/extensions/worldcup-map\"\n```\n\nOn Windows (PowerShell):\n\n```powershell\ngit clone https://github.com/asklar/worldcup-map-canvas-2026 \"$env:USERPROFILE\\.copilot\\extensions\\worldcup-map\"\n```\n\nThen reload extensions (or restart the CLI / `/clear`). In the Copilot app, open the\n**“2026 World Cup Map”** canvas.\n\nTo share it with a single team instead, drop the folder into a repo's\n`.github/extensions/worldcup-map/` (project scope) and everyone working in that repo gets it\nautomatically.\n\n## Usage\n\nIn the canvas:\n\n- **↻ Refresh** — re-fetch the latest results and fixtures\n- **All / Results / Upcoming** — filter markers by status\n- **Filter team…** — show only matches involving a team\n- Click a marker for match details\n\nAsk the agent in natural language (these map to agent-callable capabilities):\n\n- *\"Refresh the World Cup matches\"* → `refresh_matches`\n- *\"Focus on Mexico's match\"* → `focus_match`\n- *\"Show only upcoming games\"* / *\"Filter to Brazil\"* → `filter_matches`\n\nThese tools also work **without** the canvas open and return text:\n\n- `worldcup_list_matches` — list matches (optional `status` / `team`)\n- `worldcup_match_detail` — details for a single match (by `team` or `id`)\n\n## Configuration\n\nAll optional, via environment variables:\n\n| Variable | Default | Purpose |\n| --- | --- | --- |\n| `THESPORTSDB_KEY` | `123` | TheSportsDB API key. `123` is a shared **test** key — get your own for reliable use. |\n| `WORLDCUP_PORT` | `60698` | Fixed local port for the canvas server (stable across reloads). |\n| `WORLDCUP_SEASON` | `2026` | TheSportsDB season to load. |\n| `WORLDCUP_ROUNDS` | `1,2,3` | Group-stage matchday rounds to fetch. |\n\n## How it works\n\n```\nworldcup-map/\n  extension.mjs   Canvas + tools wiring: createCanvas() + joinSession()\n  server.mjs      Local HTTP/SSE server (/, /api/matches, /api/refresh, /events)\n  data.mjs        TheSportsDB fetch, merge across endpoints, normalize, cache, classify\n  venues.mjs      Static lookup: 16 host venues -\u003e lat/lng (+ aliases, fallbacks)\n  public/\n    index.html    Leaflet map UI (markers, popups, legend, filters, SSE client)\n```\n\n- The extension starts a small local server and registers a canvas whose `open()` returns\n  that server's URL; the app renders it in the side panel.\n- TheSportsDB's `eventsseason` feed is only partially populated during the live tournament,\n  so `data.mjs` merges **per-round** (`eventsround`) data with the `eventsnextleague` and\n  `eventspastleague` feeds, deduped by match id, to get all 72 group matches (results +\n  upcoming). Knockout fixtures appear automatically as they're scheduled.\n- Events from TheSportsDB have no coordinates, so `venues.mjs` maps each venue name to the\n  correct host-stadium lat/lng.\n- Agent actions push commands (reload / focus / filter) to the open page over\n  Server-Sent Events.\n\n### Run the server standalone (development)\n\nYou can test the data pipeline without the app:\n\n```bash\nnode server.mjs            # prints a local URL\ncurl http://127.0.0.1:60698/api/matches\n```\n\n## Attribution\n\n- Match data: [TheSportsDB](https://www.thesportsdb.com/) — please review their terms and\n  use your own API key.\n- Map rendering: [Leaflet](https://leafletjs.com/) (BSD-2-Clause).\n- Map tiles: © [OpenStreetMap](https://www.openstreetmap.org/copyright) contributors.\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasklar%2Fworldcup-map-canvas-2026","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasklar%2Fworldcup-map-canvas-2026","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasklar%2Fworldcup-map-canvas-2026/lists"}