Skip to content

esosaoh/git-mentor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitMentor Logo

GitMentor

Effortlessly contribute to open-source projects with AI-powered guidance.
github.com/esosaoh/gitmentor

Table of Contents

Table of Contents
  1. About The Project
  2. Architecture
  3. Getting Started
  4. Acknowledgments

About The Project

GitMentor is a tool designed to help developers easily contribute to GitHub repositories. It provides AI-powered analysis of repositories and generates implementation plans for specific features, making it easier to understand the codebase and contribute effectively. The project consists of a frontend built with Next.js and a backend built with FastAPI, communicating through REST APIs.

Key Features

  • Repository Analysis: Analyzes GitHub repositories to understand their structure and functionality.
  • Feature Implementation Plans: Generates step-by-step implementation plans for specific features, including setup instructions, implementation steps, and potential challenges.
  • Relevant File Identification: Identifies the most relevant files for implementing a feature, along with their importance and reason for relevance.
  • Interactive UI: Provides a user-friendly interface for submitting repository URLs and feature descriptions, and for viewing the generated implementation plans.
  • Health Check Endpoint: Provides a health check endpoint to monitor the status of the application and its dependencies.

Architecture

The project follows a microservices architecture with a clear separation between the frontend and backend.

  • Frontend:
    • Built with Next.js, a React framework for building web applications.
    • Uses Framer Motion for animations and React Markdown for rendering markdown content.
    • Interacts with the backend API to fetch repository analysis and implementation plans.
  • Backend:
    • Built with FastAPI, a modern, high-performance web framework for building APIs with Python.
    • Uses gitingest to fetch repository content.
    • Uses Google Gemini AI to analyze the repository and generate implementation plans.
    • Uses Redis for caching.
  • CI/CD:
    • Uses GitHub Actions for continuous integration and continuous deployment.
    • Lints the backend code with flake8.
  • Infrastructure:
    • Uses Docker and Docker Compose for containerization and orchestration.
    • Deploys Redis as a separate container.

Getting Started

To get started with GitMentor, follow these steps:

Prerequisites

  • Docker:
    # Installation instructions for Docker can be found at https://docs.docker.com/get-docker/
  • Node.js (version 18 or higher):
    # Installation instructions for Node.js can be found at https://nodejs.org/
  • Python (version 3.11 or higher):
    # Installation instructions for Python can be found at https://www.python.org/

Installation

  1. Clone the repository:

    git clone https://github.com/esosaoh/gitmentor.git
    cd gitmentor
  2. Set up environment variables:

    • Create a .env file in the backend/app/core/ directory and add the following variables:
      GITHUB_TOKEN=<your_github_token> # Optional, but recommended for higher API rate limits
      GEMINI_API_KEY=<your_gemini_api_key>
      REDIS_HOST=redis
      REDIS_PORT=6379
      REDIS_PASSWORD=
      
    • Obtain a Gemini API key from Google AI Studio.
    • Obtain a GitHub token if you plan to analyze many repositories.
  3. Build and run the application using Docker Compose:

    docker-compose up --build
  4. Access the frontend at http://localhost:3000.

About

Contribute to open source repos with AI guidance (cuHacking 6)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •