Giter Site home page Giter Site logo

naz1804 / ip_address_tracker Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 404 KB

IP address tracker is a tool that can be used to identify the location, time, and ISP of an IP address.

Home Page: https://ip-address-tracker-74adb2.netlify.app/

JavaScript 87.24% HTML 6.30% CSS 6.45%
html reactjs rest-api tailwindcss vite javascript leaflet-reactjs

ip_address_tracker's Introduction

IP Address Tracker

IP address tracker is a tool that can be used to identify the location, time, and ISP of an IP address.

Technologies

  • Vite
  • React
  • JavaScript
  • Tailwind CSS
  • HTML
  • API
  • leaflet.js

Installation

First thing first is you need node.js installed. USe this Link to be sent to the node.js downloads.

  1. Then you can clone the code locally by copying the HTTPS from the <> Code button.

image

  1. Open a terminal window or open your code editor that you can open up a terminal.
  2. Navigate to the directory where you want to clone the repository.
  3. Then type git clone paste the HTTPS after that.
git clone https://github.com/Naz1804/ip_address_tracker.git

To install the dependencies, run the following command in your terminal:

npm install

Then:

npm run dev

Next you will see this:

image

You have two options to either click on the http://localhost:5173/ or press o to open up the localhost.

You can always press h to see what more commands they are.

Then you should have the project running !!

API

The API we are using is ipgeolocation this is the Link to the Documentation. And they have a free plan which you can use, make an account and get your API KEY from your dashboard.

On App.jsx find the variable called API_KEY and replace the value with your API KEY and remember to keep it in quotes.

image

const API_KEY = // this is where you put your api key replacing of what was their

We using 2 API fetch to get the location, ISP and the other fetch is to get the exact time from the given IP address.

If you look at App.jsx you can see how we are calling the API, how we using the data to get the output we want.

Also remember to use the document to know which data you are calling and what other calling plus what data you can get.

Leaflet.js

Leaflet.js is an open-source JavaScript library for building interactive web maps. It is designed to be lightweight and easy to use, and it supports a wide variety of features, including:

  • Tile layers: Leaflet.js can display tiled maps from a variety of sources, including OpenStreetMap, Google Maps, and Bing Maps.
  • Markers: Leaflet.js can display markers on maps, and you can customize the appearance of markers using CSS.
  • Popups: Leaflet.js can display popups on maps, and you can use popups to display information about markers or other features on the map.
  • Polylines: Leaflet.js can display polylines on maps, and you can use polylines to represent features such as roads or trails.
  • Polygons: Leaflet.js can display polygons on maps, and you can use polygons to represent features such as countries or states.

If you go to Map.jsx inside the src -> components file you can see how we are using the library and you can see how I put a custom Icon marker plus the <MapContainer /> key & Marker position is getting a position which is passed downed from the App.jsx and the position is holding the latitude and longitude which will move the map to that location. And also it works with the API because API also gives back latitude and longitude from the given IP address which then works with the Leaflet.js to give the exact location on the map.

ip_address_tracker's People

Contributors

naz1804 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.