- DataPuller
- DataPuller - click here
Have you ever wondered how browsers always seem to know your location? You’ve probably noticed that many websites display your location on their homepage, indicating that they know (exactly) where you are. the objective of this project is to show you, how much information can a website collect about and the interaction you do with the website, like the time you spent, your first visit, last visit...etc
- Next.js
- TypeScript
- Tailwind CSS
- Nodejs
- Google API
- cookie-cutter
- detect-browser
- detect-gpu
- react-leaflet
- Automatically detect location based on IP Address
- get Zip Code based on latitude & longitude
- for the "time spent by user" & "visits dates" in the website, it uses cookies, so if you delete cookies, it will start over.
git clone https://github.com/hktitof/DataPuller
in the root of the project "DataPuller", execute in your terminal the command "yarn"
yarn
touch .env
1- not Adding Google API to the project will cause not returning the correct zip code, might be always "00000"
NEXT_PUBLIC_KEY_GOOGLE_API="your API key"
yarn dev
-
Generate a full static production build
yarn build
the following endpoint will return a json object contains a bunch of information about the ip address
/api/userInfoByIP/[IP-Address]
example :
/api/userInfoByIP/159.89.173.104
{"zip":"560002","country":"India","countryCode":"IN","region":"KA","regionName":"Karnataka","city":"Bengaluru","datetime":"9/6/2022, 1:24:30 AM","lat":12.9634,"lon":77.5855,"timezone":"Asia/Kolkata","isp":"DigitalOcean, LLC","org":"Digital Ocean","as":"AS14061 DigitalOcean, LLC","query":"159.89.173.104"}
the following endpoint will return a json object contains the zip code for the latitude and logitude
"/api/userInfoByLatLon/" + lat + "/" + lon
example :
/api/userInfoByIP/159.89.173.104
{"zipcode" : "56998"}
{"zipcode" : "00000"}
MIT License
Copyright (c) [2022] [Abdellatif Anaflous]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Linkedin - @abdellatif-anaflous
- Website - Abdellatif Anaflous