A web app to analyze GitHub user profiles — fetch repos, view language charts, save analysis to a MySQL database, and browse stored results.
- Search any GitHub user by username
- View followers, public repos, and login info
- Fetch all repositories with stars, forks, and language
- Interactive pie chart for language breakdown per repo
- Save analysis data to a MySQL database
- Browse all saved analyses
| Layer | Technology |
|---|---|
| Frontend | React + Vite |
| Routing | React Router DOM |
| Charts | Chart.js |
| Backend | Node.js / Express |
| Database | MySQL |
| Deployment | Vercel (frontend) |
Make sure you have the following installed:
/
├── front/ # React + Vite app
│ ├── src/
│ │ ├── Home.jsx
│ │ └── ...
│ └── .env
├── back/ # Express server
│ ├── server.js
│ └── .env
└── README.md
git clone https://github.com/vansh1011/GitHub_Analyzer.git
cd GitHub_Analyzer - Open your MySQL client and create a database:
CREATE DATABASE test;- Create the analysis table:
USE test;
CREATE TABLE profiles (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL,
followers INT,
following INT,
public_repos INT,
total_stars INT,
total_forks INT,
top_language VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);cd back
npm installCreate a .env file inside the back/ folder:
HOST=mysql_host
USER=mysql_username
PASSWORD=mysql_password
DB = your database
PORT=8000
PORT2 = 4000
FRONTURL = frontend_urlStart the backend server:
node --watch server.jsThe server will run at http://localhost:8000
cd front
npm installCreate a .env file inside the front/ folder:
VITE_SERVER=http://localhost:8000Start the frontend dev server:
npm run devThe app will run at http://localhost:5173
- Push your frontend folder to GitHub
- Import the repo on Vercel
- Set the environment variable in Vercel dashboard:
VITE_SERVER→ your backend's live URL
- Deploy
You can deploy the backend on any Node.js hosting platform such as:
Make sure to set the same environment variables (HOST, USER, etc.) on the platform.
| Variable | Description |
|---|---|
VITE_SERVER |
Base URL of your backend server |
| Variable | Description |
|---|---|
HOST |
MySQL host (e.g. localhost) |
USER |
MySQL username |
PASSWORD |
MySQL password |
DB |
MySQL database name |
PORT |
Port for the backend server |
- Enter a GitHub username in the search box and click Find
- Click Get All Repos to load the user's repositories
- Click View Chart on any repo to see a language breakdown pie chart
- Click Save Analysis to store the user's stats in the database
- Click Find Analysis or Find All to browse saved data