A modern Next.js application for searching and exploring GitHub user profiles with real-time search capabilities and detailed user information.
- User Search: Search GitHub users by login with instant results
- Real-time Results: Debounced search with 500ms delay for optimal performance
- User Profiles: Detailed view of individual GitHub user information
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Error Handling: Comprehensive error handling for rate limits and API issues
- Loading States: Smooth loading animations during API requests
- Next.js 14 - React framework with App Router
- TypeScript - Static typing for better code quality
- React Hooks - Modern state management (useState, useEffect, useCallback)
- CSS Modules - Scoped styling with CSS modules
- GitHub API - Public GitHub API for user data (no authentication required)
- Node.js 18.x or higher
- npm or yarn
# Install dependencies
npm install
# or
yarn install# Build
npm run build
# or
yarn buildnpm run dev
# or
yarn devOpen http://localhost:3000 to view the application in your browser.
- Navigate to the home page
- Enter a GitHub username or search term in the search field
- Click "Find" button or wait for the debounced search (500ms)
- Browse the results
-
Click on any user card from the search results
-
View detailed information including:
- Avatar and username
- Bio and location
- Company and website
- Social links (Twitter, GitHub)
- Repository count and followers/following
- Account creation date
-
Click "Back to Search" to return to the search page
Custom React hook that handles:
- API requests to GitHub's search endpoint
- Debounced search logic
- Error handling (rate limits, invalid queries)
- Loading states
- Result caching
const { users, loading, error, search } = useGitHubSearch()
await search('shwedus')Handles user input with:
- Text input field
- Search button
- Disabled state during loading
- Query validation
Displays each user as a card with:
- Avatar image
- Username as clickable link to profile
- GitHub profile link
Shows comprehensive user information:
- Avatar and name
- Bio and company
- Location and email
- Website and Twitter links
- Repository statistics
- Followers and following counts
- Account metadata
The application uses the public GitHub API:
GET https://api.github.com/search/users?q={query}&per_page=30
GET https://api.github.com/users/{username}