A web application that allows users to compare two GitHub profiles side by side, displaying key metrics and information about each user.
- Compare two GitHub users simultaneously
- Display user information including:
- Profile picture
- Name
- Number of followers
- Number of following
- Number of public repositories
- Direct link to GitHub profile
- Real-time data fetching from GitHub API
- Error handling for invalid usernames
- Responsive design
- React
- Axios for API calls
- CSS for styling
- Vite as build tool
- Node.js
- Express
- Axios for GitHub API integration
- CORS for cross-origin resource sharing
- dotenv for environment variable management
- Node.js (v14 or higher)
- npm (Node Package Manager)
- GitHub Personal Access Token
- Clone the repository
git clone https://github.com/yourusername/git_compare.git
cd git_compare
- Install dependencies for both client and server
For the client:
cd client
npm install
For the server:
cd server
npm install
- Set up environment variables
Create a .env file in the server directory with the following variables:
GITHUB_TOKEN=your_github_personal_access_token
PORT=5000
- Start the application
Start the server:
cd server
npm start
Start the client (in a new terminal):
cd client
npm run dev
- Navigate to http://localhost:5173 in your web browser
- Enter two GitHub usernames in the input fields
- Click "Compare" to see the comparison
- View the results displayed below