Skip to content

dhruvinmakwana/IPLookUP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IPLookUP - Live demo

This projects allows user to find geolocation data based on the IP addresses provided.

Tech Stack Description
GeoLite2 City database and geoip2 python API GeoIP2 python API allows fetching geo location data with the help of GeoLite City database
Flask For REST API development
Flasgger For Swagger UI generation and request and/or response validation
Marshmallow As an ORM/ODM framework to serialize and deserialize complex data types in REST request response
Flask-Limiter Used to limit records query to 25 records per minute
PyTest Testing framework
React Frontend Development framework
MUI React based component library
Zustand State management library

Running the project

You will only need to run flask server which is located in the backend directory, since the repository already contains the build files for client application.

Running the server

  • Navigate to backend directory using cd backend

  • This project was build using python version 3.8

  • Create a new virtual environment python -m venv venv guide.

  • Activate the venv environment using ./venv/Scripts/activate

  • Install dependencies described in requirements.txt using pip install -r requirements.txt

  • Make sure backend/resources directory contains GeoLite2_City database.

  • Update DevelopmentConfig to point to GeoLite2_City database

  • Start flask server by running python -m flask run

  • Navigate to http://127.0.0.1:8000

  • To view swagger API documentation navigate to http://127.0.0.1:8000/apidocs

Running the client

  • Navigate to frontend directory using cd frontend
  • Update REACT_APP_API_END_POINT constant inside src/constants.js with the flask server URL without a trailing slash(/)
    • ex. REACT_APP_API_END_POINT="https://127.0.0.1"
  • run npm install
  • run npm start
  • It should automatically load the application in the browser. If not follow then prompt on console to view the webapp.

Please let me know if you have any concerns or need help in setting up the project.