A simple and responsive GitHub Profile Finder built using HTML, CSS, and Vanilla JavaScript. This project allows users to search for any public GitHub profile and displays useful information by fetching data from the GitHub Users API.
GitHub Profile Finder is a beginner-friendly project created to practice working with REST APIs in JavaScript.
The application sends a request to the GitHub Users API, retrieves public profile information, and dynamically updates the user interface with the received data.
- 🔍 Search any GitHub user by username
- 👤 Display profile picture
- 📛 Show user's name and username
- 📝 Display bio
- 👥 Show followers and following count
- 📂 Display total public repositories
- 📍 Show location
- 🏢 Display company information
- 🔗 Direct link to GitHub profile
- ⏳ Loading indicator while fetching data
- ❌ Error handling for invalid usernames
- 🚫 Prevent multiple requests by disabling the search button during API calls
- HTML5
- CSS3
- Vanilla JavaScript (ES6+)
- GitHub REST API
- Fetch API
This project helped me practice the following JavaScript concepts:
- DOM Manipulation
- Event Handling
- Fetch API
- Async / Await
- Promises
- HTTP Requests
- JSON Parsing
- Error Handling
- try...catch...finally
- Throwing Custom Errors
- Conditional Rendering
- Template Literals
- Input Validation
GitHub-Profile-Finder/
│
├── index.html
├── style.css
├── app.js
└── README.md
- User enters a GitHub username.
- The application sends a GET request to the GitHub Users API.
- A loading indicator is displayed while the request is in progress.
- If the user exists:
- Profile information is fetched.
- The UI is updated dynamically.
- If the username is invalid:
- An error message is displayed.
- The loading indicator is removed and the search button becomes active again.
GitHub Users API
https://api.github.com/users/{username}
Example:
https://api.github.com/users/octocat
The application displays:
- Profile Image
- Name
- Username
- Bio
- Followers
- Following
- Public Repositories
- Location
- Company
- GitHub Profile Link
git clone https://github.com/your-username/GitHub-Profile-Finder.gitcd GitHub-Profile-FinderSimply open the index.html file in your browser.
or
Use the Live Server extension in Visual Studio Code.
The application handles the following cases:
- Empty username input
- User not found
- Invalid API response
- Loading state management
- Button disable/enable during API request
- Search using the Enter key
- Display user's latest repositories
- Show pinned repositories
- Display account creation date
- Dark / Light mode
- Better responsive design
- Search history
- API rate limit handling
While building this project, I learned:
- How to consume REST APIs using Fetch API
- Working with asynchronous JavaScript
- Handling API errors gracefully
- Updating the DOM dynamically
- Managing loading and error states
- Writing cleaner asynchronous code using async/await
Yash Guram
Computer Engineering Graduate
Currently learning React, Node.js, and Full Stack Web Development while building practical projects.
If you found this project useful, consider giving it a ⭐ on GitHub.