This is a solution to the IP address tracker challenge on Frontend Mentor.
Users should be able to:
- View the optimal layout for each page depending on their device's screen size.
- See hover states for all interactive elements on the page.
- See their own IP address on the map on the initial page load.
- Search for any IP addresses or domains and see the key information and location.
- Project homepage
- GitHub repository
- Issues
- Pull requests
- My other projects
- My Frontend Mentor profile
- Semantic HTML
- Vanilla JavaScript
- Tailwind CSS - Styling
- Leaflet.js - Interactive map
- Google Fonts API - Custom font
- IP Geolocation API - IP address tracking
- How to implement interactive maps using Leaflet.js.
- How to use IP Geolocation API to track the geographical location of an IP address.
1. First, you need to clone the project:
git clone https://github.com/ShayanTheNerd/IP-address-tracker.git
Alternatively, you can copy the source of the project directly to your local environment using Degit:
pnpm i -g degit
degit https://github.com/ShayanTheNerd/IP-address-tracker new-project-folder
2. Then, install required packages:
pnpm i
3. Finally, run the dev
script to start the dev server:
pnpm run dev
Now, you can preview the project on a local server of your choice. My personal recommendation is the Live Server Extension.
Before deploying the project or creating a new pull request, run the following commands and make sure there are no errors:
pnpm run format
pnpm run build
If you want to develop this project, please stick to these rules:
- Follow the current architecture, coding paradigm, and project folder structure.
- Follow the current character case principals for ids, classes, variables, file and folder names, etc.
- Code based on the current libraries, frameworks, and packages included in the project.
- For styling, utilize Tailwind's features as much as possible, but also make sure to use BEM methodology for naming custom CSS classes.
- In case you need to access an HTML element in JavaScript by a class name, prefix the class name with
js-
. For example,js-submit-btn
. - Add Git commit messages considering Conventional Commits.
Your contribution is always welcome, please follow these steps:
- Fork the project.
- Create your feature branch:
git checkout -b feature/branch-name
. - Make sure to follow instructions in the style guide section.
- Stage all changes you made:
git add -A
. - Commit all staged changes with a descriptive commit message:
git commit -m 'feat: add foo bar baz'
. - Push everything to your feature branch:
git push origin feature/branch-name
. - Create a new Pull Request.
This project is licensed under BSD 3 Clause License. Created by Shayan Zamani.