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.
- 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.
- 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)
You need Node.js (v18+) and an OpenAI API Key. A GitHub Personal Access Token is highly recommended to avoid rate limits.
-
Clone the repository: ```bash git clone https://github.com/yourusername/repomap.ai.git cd repomap.ai ```
-
Install dependencies: ```bash npm install ```
-
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 ```
-
Run the development server: ```bash npm run dev ```
Open http://localhost:3000 in your browser.
- Frontend: Next.js Client Components handle state management, layout orchestration, and animations.
- 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.
- AI Service: Uses OpenAI's strict `json_schema` response format to guarantee the AI only returns the strongly typed
RepositoryAnalysisobject, preventing markdown hallucinations and parsing errors.
This application is entirely Edge/Serverless ready. It is recommended to deploy on Vercel.
- Push your code to a GitHub repository.
- Import the project into Vercel.
- Add `GITHUB_TOKEN` and `OPENAI_API_KEY` to the Vercel Environment Variables.
- Deploy!
