Skip to content

arushi1947/github-profile-analyzer

Repository files navigation

GitHub Profile Analyzer API

Live API

https://github-profile-analyzer-12et.onrender.com

Example Endpoint

https://github-profile-analyzer-12et.onrender.com/api/github/analyze/octocat

Overview

GitHub Profile Analyzer is a Node.js and Express-based REST API that fetches GitHub user information, analyzes repository data, and stores profile insights in MySQL.

Features

  • Analyze GitHub profiles
  • Calculate total repository stars
  • Identify most used programming language
  • Calculate developer score
  • Store analyzed profiles in MySQL
  • Retrieve all stored profiles
  • Retrieve a specific profile
  • Delete profiles

Technologies Used

  • Node.js
  • Express.js
  • MySQL
  • Axios
  • dotenv
  • Nodemon

Installation

Clone Repository

git clone <your-github-repo-url>
cd github-profile-analyzer

Install Dependencies

npm install

Configure Environment Variables

Create a .env file:

PORT=5000

DB_HOST=localhost
DB_USER=root
DB_PASSWORD=yourpassword
DB_NAME=github_analyzer

Start Server

npm run dev

API Endpoints

Analyze GitHub Profile

GET /api/github/analyze/:username

Example:

GET /api/github/analyze/torvalds

Get All Profiles

GET /api/github/profiles

Get Single Profile

GET /api/github/profiles/:username

Example:

GET /api/github/profiles/torvalds

Delete Profile

DELETE /api/github/profiles/:username

Example:

DELETE /api/github/profiles/torvalds

Sample Response

{
  "message": "Profile Stored Successfully",
  "username": "torvalds",
  "totalStars": 247775,
  "mostUsedLanguage": "C",
  "developerScore": 859463
}

About

GitHub Profile Analyzer API built with Node.js, Express.js, MySQL and GitHub API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors