Skip to content

randomfunction/GitLensAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitLens.AI 🧠

GitLens.AI is a full-stack web application that offers AI-powered insights into GitHub profiles. It provides a detailed analysis of a user's coding activities, generates repository recommendations, and features an interactive 3D globe to visualize the user's global presence.

GitLens.AI Screenshot

Project Description

This project is designed to provide a comprehensive and visually engaging analysis of GitHub users. By leveraging a combination of machine learning models and the Google Gemini API, GitLens.AI goes beyond simple statistics to offer a deeper understanding of a developer's skills and interests. The application is built with a modern tech stack, featuring a Next.js frontend, a Python backend for recommendations, and a visually appealing interface with 3D elements.

Features

  • GitHub Profile Analysis: Fetches and displays a user's public profile information (avatar, bio, followers, etc.).
  • Repository Insights: Shows a user's top repositories, sorted by stars.
  • Language Analysis: Calculates and displays the user's most frequently used programming languages in a pie chart.
  • AI-Powered Summary: Uses the Google Gemini API to generate a natural language summary of the user's coding strengths, domains of expertise, and primary languages.
  • Repository Recommendations: A Python-based service that uses a Graph Neural Network (GNN) and sentence transformers to recommend new repositories to the user.
  • Interactive 3D Globe: A 3D globe on the homepage to visualize the user's global presence.
  • Responsive UI: Clean, minimal, and responsive interface built with Tailwind CSS and shadcn/ui.

Tech Stack

Getting Started

Follow these instructions to get a local copy up and running.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/gitlens.ai.git
    cd gitlens.ai
  2. Install the required frontend dependencies:

    npm install
  3. Install the required backend dependencies:

    pip install -r requirements.txt

Environment Variables

To run the application, you need to set up your environment variables. Create a file named .env.local in the root of your project and add your Google Gemini API key.

GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
GITHUB_TOKEN="YOUR_GITHUB_TOKEN"

Running the Development Servers

  1. Start the frontend development server:

    npm run dev

    Open http://localhost:3000 in your browser to see the application.

  2. Start the backend recommendation service:

    uvicorn recommendation_service:app --reload

    The backend service will be running on http://localhost:8000.

Usage

  1. Navigate to the homepage.
  2. Click the "Analyze Profile" button.
  3. Enter a valid GitHub username in the input field.
  4. Click the "Analyze" button or press Enter.
  5. The application will navigate to a new page and display the complete analysis of the user's profile.
  6. To get repository recommendations, use the "Compare Profiles" feature (Note: This feature is still under development).

Project Structure

The project is organized as follows:

/src
├── app/
│   ├── api/
│   │   ├── analyze/route.ts       # Gemini API route
│   │   └── github/[username]/route.ts # GitHub API route
│   ├── user/[username]/page.tsx # Dynamic page for displaying results
│   ├── layout.tsx               # Root layout
│   └── page.tsx                 # Homepage
├── components/
│   └── ui/                      # shadcn/ui components
├── lib/
│   └── utils.ts                 # Utility functions
└── types.ts                     # TypeScript type definitions

/recommendation_service.py     # Python backend for recommendations
/build_text_embeddings.py      # Script to build text embeddings
/rgcn_model.pt                 # Pre-trained GNN model
/repo_embeddings.pt            # Repository embeddings
/text_embeddings.npy           # Text embeddings

Deployment

The easiest way to deploy this Next.js app is to use the Vercel Platform. Make sure to set up the GEMINI_API_KEY and GITHUB_TOKEN environment variables in your Vercel project settings. The Python backend will need to be deployed separately (e.g., on a service like Heroku or AWS).

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published