This is a React application that allows users to search for GitHub profiles using the GitHub API. The app fetches GitHub users based on search queries and displays them along with their profile information.
- Search for GitHub users using the GitHub API.
- Displays a list of user profiles based on the search query.
- Show loading spinner while fetching data.
- Error handling for failed API requests.
- Clear search results functionality.
- View more details about each user (link placeholder).
- React: JavaScript library for building user interfaces.
- React Router: Used for navigation between pages.
- Context API & useReducer: For state management across the app.
- Tailwind CSS: For styling components.
- DaisyUI: A Tailwind CSS plugin for styled components.
- Axios: For making API requests to GitHub.
- GitHub API: For fetching user data.
To run this project locally, follow the instructions below.
- Node.js installed
- Git installed
-
Clone the repository:
git clone https://github.com/your-username/github-user-finder.git cd github-user-finder
-
Install dependencies:
npm install
-
Create a .env file in the root directory and add the following environment variables:
REACT_APP_BASE_URL=https://api.github.com REACT_APP_GITHUB_TOKEN=your_github_token_here
-
Start the development server
npm start
-
Visit
https://localhost:3000
in your browser
src
│
├── components
│ ├── layouts
│ │ ├── Navbar.js
│ │ └── Footer.js
│ ├── users
│ │ ├── SearchUser.js
│ │ └── UserResults.js
│
├── context
│ ├── GithubContext.js
│ └── GithubReducer.js
│
├── pages
│ ├── Home.js
│ └── NotFound.js
│
├── assets
│ └── loadingspinner.gif
│
└── App.js
Feel free to fork this project and submit pull requests for improvements or bug fixes.
This project is licensed under the MIT License.