A simple and elegant React application to find and display GitHub user avatars by their username. This project demonstrates the integration of GitHub's API, debouncing with custom hooks, and a user-friendly interface.
- π User Search: Search for any GitHub user by their username.
- πΌοΈ Avatar Display: Display the user's GitHub avatar in a stylish, rounded frame.
- π οΈ Debouncing: Prevent excessive API calls with a custom debouncing hook.
- β Error Handling: User-friendly error messages for invalid usernames or failed requests.
- π¨ Responsive Design: Mobile-first design ensures a great experience on any device.
π Live Demo Link
- ποΈ User Details: Display additional user information like bio, number of repositories, followers, etc.
- π Dark Mode: Add a toggle to switch between light and dark themes.
- πΎ Favorites: Allow users to save their favorite GitHub profiles.
- π Autocomplete: Implement username suggestions as the user types.
dist/
βββ index.html # Main HTML file, entry point for the app
βββ logo192.png # Web app logo (small size)
βββ manifest.json # Web app manifest for PWA settings
βββ robots.txt # Instructions for search engine bots
βββ vite.svg # Vite logo, possibly used in the app
src/
βββ components/
β βββ GitHubCard/ # Components related to GitHub profile cards
β βββ Home/ # Home page component
β βββ InputBox/ # Components for input handling
βββ hooks/
β βββ useDebounce.js # Custom hook to debounce input values
βββ routes/
β βββ CustomRoutes.jsx # Custom routing configuration
βββ App.js # Main app component
βββ App.css # Global CSS for the app
βββ index.js # Entry point for React, renders the app
βββ main.jsx # Main JavaScript file for the app
βββ tailwind.config.js # Tailwind CSS configuration
βββ vite.config.js # Vite configuration file
.gitignore # Specifies files and directories to ignore in Git
package.json # Project dependencies and scripts
README.md # Project documentation and instructions
```
## π Getting Started
### Prerequisites
- Node.js and npm installed on your machine.
- Basic understanding of React.
### Installation
1. **Clone the repository**:
```bash
git clone https://github.com/ChinmayKaitade/github-user-avatar-finder.git-
Install dependencies:
npm install
-
Run the application:
npm start
The application should now be running on
http://localhost:3000.
- Enter a GitHub username in the input box.
- The avatar will be displayed below after a short delay.
- If the username doesn't exist, an error message will be shown.
Contributions are welcome! Please fork this repository, make your changes, and submit a pull request. π
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by Chinmay Kaitade