A modern React application that allows users to search for GitHub users and explore their repositories with a clean, responsive interface.
- User Search: Search for GitHub users by username
- Repository Explorer: View user repositories with details like stars and descriptions
- Responsive Design: Works seamlessly on desktop and mobile devices
- Loading States: Smooth loading indicators and skeleton components
- Error Handling: Comprehensive error handling with user-friendly messages
- Accessibility: Built with accessibility in mind using Radix UI primitives
- Real-time Search: Instant search results with proper debouncing
- Repository Details: View repository information including star count and descriptions
- React 19.1.1 - Latest React with modern hooks and features
- TypeScript 5.9.3 - Type-safe development
- Vite 7.1.7 - Fast build tool and development server
- Tailwind CSS 4.1.14 - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icons
- Sonner - Toast notifications
- Alova 3.3.4 - Lightweight request strategy library
- React Hook Form 7.65.0 - Performant forms with easy validation
- Zod 4.1.12 - TypeScript-first schema validation
- Vitest 3.2.4 - Fast unit testing framework
- Testing Library - Simple and complete testing utilities
- ESLint - Code linting and formatting
- Coverage Reports - Test coverage with V8 provider
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone https://github.com/irfandyj/github-user-repositories-explorer.git cd github-user-repositories-explorer -
Install dependencies
npm install
-
Start development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
| Script | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
npm run test |
Run tests |
npm run test:watch |
Run tests in watch mode |
npm run test:ui |
Run tests with UI |
npm run test:cov |
Run tests with coverage |
src/
βββ api/
β βββ github/ # Auto-generated GitHub API definitions
βββ components/
β βββ molecules/ # Reusable component molecules
β β βββ SearchUserForm/
β β βββ SearchUserAccordion/
β βββ organisms/ # Complex component organisms
β β βββ SearchUserCard/
β βββ ui/ # Base UI components
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions
βββ assets/ # Static assets
-
Search for Users
- Enter a GitHub username in the search field
- Click "Search" or press Enter
- View up to 5 matching users
-
Explore Repositories
- Click on any user to expand their section
- View their repositories with details
- Click on repository names to open them on GitHub
The project includes comprehensive testing setup:
# Run all tests
npm run test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:cov
# Run tests with UI
npm run test:ui- Component unit tests
- Integration tests
- User interaction tests
- API mocking
The project uses GitHub Actions for automatic deployment to GitHub Pages. The deployment is triggered on every push to the master branch.
Workflow Features:
- Automatic deployment on push to master branch
- Manual deployment trigger available
- Node.js 18 with npm caching
- TypeScript compilation support
- GitHub Pages integration
Deployment Process:
- Push changes to the
masterbranch - GitHub Actions automatically builds the project
- Deploys the built files to GitHub Pages
- Live site updates automatically
# Build for production
npm run build
# Preview production build locally
npm run previewThe deployment is handled by .github/workflows/deploy.yml which:
- Installs dependencies with npm caching
- Builds the TypeScript project
- Deploys to GitHub Pages using the official GitHub Pages action
The GitHub API integration is configured in src/api/github/index.ts:
- Base URL:
https://api.github.com - Auto-generated API definitions from GitHub's OpenAPI spec
- Error handling with toast notifications
API definitions are auto-generated from GitHub's OpenAPI specification using the Alova VS Code plugin.
The project uses a custom design system built on:
- Tailwind CSS for utility classes
- Radix UI for accessible primitives
- Custom components for consistent styling
- Responsive design principles
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub: @irfandyj
- Project: GitHub Repositories Explorer
- GitHub API for providing the data
- Alova for the excellent request strategy library
- Radix UI for accessible component primitives
- Tailwind CSS for the utility-first CSS framework
β Star this repository if you found it helpful!