Skip to content

Repository files navigation

RepoMap AI

RepoMap AI Hero

RepoMap AI is a premium, AI-powered GitHub repository intelligence tool. Paste a public GitHub repository URL, and the application instantly analyzes the architecture, codebase, and structure, generating a comprehensive, easy-to-understand explanation using OpenAI.

Built specifically for high-velocity engineering teams, code reviewers, and learners who want to understand complex codebases without spending hours tracing imports.

Features

  • Instant Architecture Inference: Automatically generates a Mermaid.js flow diagram of the repository architecture.
  • Premium Interface: A gorgeous, Linear-inspired dark-mode UI with subtle Framer Motion micro-interactions and a lightweight Three.js particle background.
  • File Explorer: A Mac Finder-inspired collapsible file tree built straight from the GitHub API.
  • Beginner Guide: An AI-generated learning path and recommended reading order for newcomers to the repository.
  • Code Health Score: Maintainability metrics, key strengths, and potential architectural issues calculated automatically.
  • Export to Markdown: Download the entire analysis report for documentation or sharing.

Tech Stack

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Animations: Framer Motion
  • Icons: Lucide React
  • Graphics: Three.js & React Three Fiber
  • Diagrams: Mermaid.js
  • Data Source: GitHub REST API
  • AI Engine: OpenAI (gpt-4o-mini) with strict Structured Outputs (json_schema)

Installation

Prerequisites

You need Node.js (v18+) and an OpenAI API Key. A GitHub Personal Access Token is highly recommended to avoid rate limits.

Local Development

  1. Clone the repository: ```bash git clone https://github.com/yourusername/repomap.ai.git cd repomap.ai ```

  2. Install dependencies: ```bash npm install ```

  3. Set up Environment Variables: Create a `.env.local` file in the root directory: ```env GITHUB_TOKEN=your_github_personal_access_token OPENAI_API_KEY=your_openai_api_key ```

  4. Run the development server: ```bash npm run dev ```

    Open http://localhost:3000 in your browser.

Architecture

  1. Frontend: Next.js Client Components handle state management, layout orchestration, and animations.
  2. API Routes:
    • `/api/github`: Fetches the repository tree, handles truncation for massive repos, and normalizes the payload.
    • `/api/analyze`: Passes the normalized repository data into the AI Service.
  3. AI Service: Uses OpenAI's strict `json_schema` response format to guarantee the AI only returns the strongly typed RepositoryAnalysis object, preventing markdown hallucinations and parsing errors.

Deployment

This application is entirely Edge/Serverless ready. It is recommended to deploy on Vercel.

  1. Push your code to a GitHub repository.
  2. Import the project into Vercel.
  3. Add `GITHUB_TOKEN` and `OPENAI_API_KEY` to the Vercel Environment Variables.
  4. Deploy!

License

MIT License

About

AI-powered GitHub repository analyzer with architecture visualization, code insights, and smart onboarding.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages