π Discover and explore GitHub users and their repositories with style! A modern, responsive web application built with Next.js, featuring GitHub OAuth authentication, infinite scrolling, and beautiful UI components.
See the app in action!
Experience the smooth user interface, search functionality, and responsive design across all devices
- GitHub OAuth Integration - Secure login with your GitHub account
- Token-based Authentication - Persistent login sessions
- Rate Limiting Protection - Smart error handling for API limits
- π User Search - Find GitHub users by username with real-time search
- π User Profiles - View detailed user information and statistics
- π Quick Access - Direct links to user's GitHub profile, followers, following, and more
- β‘ Responsive UI - Beautiful user cards with hover effects
- βΎοΈ Infinite Scrolling - Seamlessly browse through repositories
- π·οΈ Language Detection - Color-coded programming languages
- β Repository Stats - Stars, forks, watchers, and size information
- π Metadata Display - Creation dates, last updates, and descriptions
- π External Links - Quick access to GitHub repository pages
- π Detailed Information - License, default branch, and clone URLs
- π Dark/Light Mode - Toggle between themes with persistent preference
- π± Responsive Design - Perfect on desktop, tablet, and mobile devices
- π Modern Components - Built with Radix UI primitives and custom styling
- β¨ Smooth Animations - CSS transitions and micro-interactions
- π Fast Loading - Optimized with Next.js and React Query caching
- π Drawer/Modal System - Elegant detail views for users and repositories
- β‘ Performance Optimized - Server-side rendering and static generation
- π Real-time Updates - React Query for efficient data fetching
- π§ͺ Comprehensive Testing - Unit tests with Jest and Testing Library
- π Code Coverage - Detailed testing reports
- π― TypeScript - Full type safety and better developer experience
- π SEO Optimized - Meta tags, structured data, and sitemap
- Next.js 15.3.3 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript - Static type checking
- TailwindCSS 4.0 - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icon library
- next-themes - Theme switching support
- Vaul - Drawer component for mobile
- TanStack Query (React Query) - Server state management
- Axios - HTTP client for API requests
- React Context - Client state management
- Jest - JavaScript testing framework
- Testing Library - React component testing utilities
- ESLint - Code linting and formatting
- Prettier - Code formatting
- GitHub OAuth - Secure authentication
- GitHub REST API - User and repository data
- Local Storage - Token persistence
- Node.js 18.0 or higher
- npm or yarn package manager
- GitHub OAuth App credentials
-
Clone the repository
git clone https://github.com/thoriqdharmawan/github-repositories-explorer.git cd github-repositories-explorer
-
Install dependencies
npm install # or yarn install
-
Set up environment variables
Create a
.env
file in the root directory:NEXT_PUBLIC_APP_API_URI=https://api.github.com NEXT_PUBLIC_HOMEPAGE_URI=http://localhost:3000 (optional) NEXT_PUBLIC_AUTHORIZATION_CALLBACK_URI=http://localhost:3000/callback (optional) NEXT_PUBLIC_CLIENT_ID=your-client-id-from-github (optional) CLIENT_SECRET=your-secret-from-github (optional) NEXT_PUBLIC_BASE_URL=http://localhost:3000 (optional)
-
GitHub OAuth Setup
- Go to GitHub Developer Settings
- Create a new OAuth App
- Set Authorization callback URL to:
http://localhost:3000/callback
- Copy the Client ID to your
.env
file
-
Run the development server
npm run dev # or yarn dev
-
Open your browser
Navigate to http://localhost:3000 π
Prefer using Docker? Here's a quick setup guide:
- Docker and Docker Compose installed on your machine
-
Clone and navigate to the project
git clone https://github.com/thoriqdharmawan/github-repositories-explorer.git cd github-repositories-explorer
-
Set up environment variables (same as above)
NEXT_PUBLIC_APP_API_URI=https://api.github.com # Add other environment variables as needed
-
Choose your Docker setup:
π₯ Development Mode (with hot reload):
npm run docker:dev # or use docker-compose directly docker-compose --profile dev up dev --build
π Production Mode:
# Build production image npm run docker:build # Start production server npm run docker:start
-
Access the application
- Open http://localhost:3000 in your browser
Command | Description |
---|---|
npm run docker:dev |
π₯ Start development server with hot reload |
npm run docker:build |
π¦ Build production Docker image |
npm run docker:start |
π Start production server |
npm run docker:stop |
π Stop all containers |
npm run docker:clean |
π§Ή Remove containers and images |
npm run docker:logs |
π Show container logs |
- Development mode includes volume mounting for hot reload
- Production mode creates optimized builds for deployment
- All Docker scripts are available in
docker-setup.sh
- Use
docker-compose logs dev
to check development logs
Command | Description |
---|---|
npm run dev |
π₯ Start development server with Turbopack |
npm run build |
π¦ Build for production |
npm run start |
π Start production server |
npm run lint |
π Run ESLint |
npm test |
π§ͺ Run tests |
npm run test:watch |
π Run tests in watch mode |
npm run test:coverage |
π Generate test coverage report |
npm run test:coverage:open |
π Open coverage report in browser |
This project includes comprehensive testing with:
- Unit Tests - Component and utility function testing
- Integration Tests - API hooks and provider testing
- Test Coverage - Detailed coverage reports
- Continuous Testing - Watch mode for development
Our test suite maintains high code coverage across all modules to ensure reliability and maintainability.
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests in watch mode
npm run test:watch
# Open coverage report in browser
npm run test:coverage:open
βββ π api/ # API hooks and utilities
β βββ π repos/ # Repository-related API hooks
β βββ π users/ # User-related API hooks
β βββ π __test__/ # API tests
βββ π app/ # Next.js App Router
β βββ π layout.tsx # Root layout
β βββ π page.tsx # Home page
β βββ π api/ # API routes
βββ π components/ # Reusable UI components
β βββ π ui/ # Base UI components
β βββ π __test__/ # Component tests
βββ π features/ # Feature-based components
β βββ π list-users/ # User search and listing
β βββ π list-repos/ # Repository listing
β βββ π user-detail/ # User detail view
β βββ π repo-detail/ # Repository detail view
βββ π lib/ # Utility libraries
βββ π providers/ # React Context providers
βββ π types/ # TypeScript type definitions
βββ π utils/ # Helper functions
The project features a comprehensive design system built with:
- π― Consistent Theming - Dark/light mode support
- βΏ Accessibility - ARIA compliant components
- π± Responsive Design - Mobile-first approach
- π Animation - Smooth transitions and loading states
- π§© Modular Components - Reusable and composable
Header
- Navigation with auth and theme toggleSearchInput
- User search functionalityUserItem
- User card with detailsRepoItem
- Repository card with statsDetailViews
- Drawer/modal system for detailsLoadingState
- Skeleton loading componentsErrorState
- Error handling with retry actions
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on every push
# Build the project
npm run build
# Start the production server
npm start
Thoriq Dharmawan
- GitHub: @thoriqdharmawan
- GitHub API - For providing comprehensive repository data
- Vercel - For seamless deployment and hosting
- Next.js Team - For the amazing React framework
- Radix UI - For accessible component primitives
- TanStack - For powerful data fetching capabilities