{"id":16386667,"url":"https://github.com/cosmoart/ip-address-tracker","last_synced_at":"2025-06-25T01:32:06.542Z","repository":{"id":104217065,"uuid":"532638861","full_name":"cosmoart/IP-address-tracker","owner":"cosmoart","description":"📌 A website to track and obtain information based on an IP address or a domain","archived":false,"fork":false,"pushed_at":"2022-09-10T15:36:26.000Z","size":443,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T10:14:30.298Z","etag":null,"topics":["axios","frontend-mentor","ip-tracker","leaflet","maps","react","reactjs","styled-components"],"latest_commit_sha":null,"homepage":"https://ip-trackerr.vercel.app","language":"JavaScript","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/cosmoart.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}},"created_at":"2022-09-04T19:34:01.000Z","updated_at":"2023-05-30T18:20:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"18f2cf39-4679-4ce3-ad3d-e48f5e81cb7c","html_url":"https://github.com/cosmoart/IP-address-tracker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cosmoart/IP-address-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmoart%2FIP-address-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmoart%2FIP-address-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmoart%2FIP-address-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmoart%2FIP-address-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmoart","download_url":"https://codeload.github.com/cosmoart/IP-address-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmoart%2FIP-address-tracker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261785231,"owners_count":23209265,"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","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":["axios","frontend-mentor","ip-tracker","leaflet","maps","react","reactjs","styled-components"],"created_at":"2024-10-11T04:23:14.247Z","updated_at":"2025-06-25T01:32:06.509Z","avatar_url":"https://github.com/cosmoart.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"mailto:cosmohydra17@gmail.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Gmail-D14836?style=for-the-badge\u0026logo=gmail\u0026logoColor=white\" alt=\"Email\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003ca href=\"https://www.instagram.com/cosmo_art0/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Instagram-E4405F?style=for-the-badge\u0026logo=instagram\u0026logoColor=white\" alt=\"Instagram\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.discord.com/users/734087835472232559/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Discord-7289DA?style=for-the-badge\u0026logo=discord\u0026logoColor=white\" alt=\"Discord\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://twitter.com/CosmoArt0\"\u003e\u003cimg src=\"https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white\" alt=\"Twitter\" /\u003e\u003c/a\u003e\n\n# IP address tracker\n\n📍A website to track and obtain information based on an IP address or a domain. This is a solution to the [IP address tracker challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/ip-address-tracker-I8-0yYAH0). To get the IP Address info I used the [IP Geolocation API by IPify](https://geo.ipify.org/). To generate the map I used [LeafletJS](https://leafletjs.com/).\n\n[Solution][solution-url] . [Live Page][live-page]\n\n\u003c/div\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTable of contents\u003c/summary\u003e\n\n-   [Overview](#overview)\n    -   [The challenge](#the-challenge)\n    -   [Screenshots](#screenshots)\n    -   [Links](#links)\n-   [My process](#my-process)\n    -   [Built with](#built-with)\n    -   [What I learned](#what-i-learned)\n    -   [Useful resources](#useful-resources)\n-   [Author](#author)\n\n\u003c/details\u003e\n\n## Overview\n\n### The challenge\n\nUsers should be able to:\n\n-   View the optimal layout for each page depending on their device's screen size\n-   See hover states for all interactive elements on the page\n-   See their own IP address on the map on the initial page load\n-   Search for any IP addresses or domains and see the key information and location\n\n### Screenshots\n\n\u003ctable\u003e\n        \u003ctr\u003e\n\t\t    \u003ctd\u003e\n                \u003cimg src=\"./screenshots/mobile.webp\" width=\"100%\" title=\"Mobile solution\"  /\u003e\n            \u003c/td\u003e\n            \u003ctd\u003e\n                \u003cimg src=\"./screenshots/desktop.webp\" width=\"100%\" title=\"Desktop solution\"/\u003e\n            \u003c/td\u003e\n        \u003c/tr\u003e\n\u003c/table\u003e\n\n### Links\n\n-   [Solution][solution-url]\n-   [Live Page][live-page]\n\n## My process\n\n### Built with\n\n-   [React](https://reactjs.org/) - JS library\n-   [Styled Components](https://styled-components.com/) - For styles\n-   [Vitejs](https://vitejs.dev)\n-   [Axios](https://axios-http.com)\n-   [LeafletJS](https://leafletjs.com/) - For map generation\n-   [IP Geolocation API by IPify](https://geo.ipify.org/) - To obtain the information of the IP or domain\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### What I learned\n\nThis challenge in particular was easy except for one thing: updating the map when getting the information, in the official Leaflet documentation it is made clear that the map is immutable, so I decided to investigate and found [React Leaflet](https://react-leaflet.js.org), which made it much easier for me. To update the map I used React's key.\n\nAt the end the code of the map is as follows:\n\n```js\n\u003cMapContainer key={JSON.stringify([info.location.lat, info.location.lng])} center={[info.location.lat || 0, info.location.lng || 0]} zoom={17.5} id=\"map\"\u003e\n\t\u003cTileLayer attribution='\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors' url=\"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\" /\u003e\n\t\u003cMarker position={[info.location.lat || 0, info.location.lng || 0]} icon={locationIcon}\u003e\u003c/Marker\u003e\n\u003c/MapContainer\u003e\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Useful resources\n\n-   [React Leaflet](https://react-leaflet.js.org) - Made it easy for me to use leaflet in React\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Author\n\n-   Email - [cosmohydra17@gmail.com](mailto:cosmohydra17@gmail.com)\n-   Instagram - [@cosmo_art0](https://www.instagram.com/cosmo_art0/)\n-   Twitter - [@CosmoArt0](https://twitter.com/cosmoart0)\n-   Frontend Mentor - [@CosmoArt](https://www.frontendmentor.io/profile/cosmoart)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n[live-page]: https://ip-trackerr.vercel.app\n[solution-url]: https://www.frontendmentor.io/solutions/ip-address-tracker-solution-tHNFTFIXxt","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmoart%2Fip-address-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmoart%2Fip-address-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmoart%2Fip-address-tracker/lists"}