Skip to content

Repository files navigation

Repolyze Logo

Understand Any Codebase in Seconds

AI insights on your GitHub repo - understand quality, design, security, and improvement opportunities in seconds.

Now owned and maintained by Ossium

Live DemoGitHub StarsLicense: MITContributor CovenantBuy Me a Coffee


FeaturesQuick StartAPI ReferenceContributingCode of ConductLicense


Repository Overview

🔹 Data Flow Diagram

Data Flow Diagram

🔹 PDF Export

PDF Export Screenshot

🔹 Repository Score & Insights

Repository Score

🔹 Repository Score Image

Repository Score

About

Repolyze is an open-source tool that leverages AI to analyze GitHub repositories instantly. Whether you're evaluating a new library, onboarding to a codebase, or auditing your own project, Repolyze provides comprehensive insights in seconds.

Why Repolyze?

BenefitDescription
Save HoursUnderstand any codebase in seconds, not hours
AI-PoweredIntelligent analysis using advanced language models
ComprehensiveCode quality, security, architecture, and more
Branch SupportAnalyze any branch, not just the default
Beautiful UIModern, responsive interface with dark mode
Privacy FirstNo code is stored; analysis happens in real-time
Free & Open SourceMIT licensed, community-driven

Features

Core Analysis

FeatureDescription
Health ScoringComprehensive score (0-100) for overall code quality
Architecture AnalysisVisualize component relationships and structure
Security InsightsIdentify potential vulnerabilities and security issues
Dependency AnalysisUnderstand package dependencies and outdated packages
Tech Stack DetectionAutomatically identify frameworks and technologies
AI RecommendationsGet actionable improvement suggestions
Branch AnalysisAnalyze any branch in the repository
Data Flow DiagramsInteractive Mermaid diagrams showing data flow patterns

Export & Sharing

FeatureDescription
Copy Plain TextCopy analysis report as formatted plain text
Copy MarkdownCopy full report in Markdown format
Download PDFExport detailed PDF report with all insights
Share CardsDownload beautiful share cards as images
Social SharingShare on Twitter, LinkedIn, or copy link

User Experience

FeatureDescription
Interactive File TreeExplore repository structure with file statistics
Real-time ProgressWatch the analysis happen live with status updates
Dark/Light ModeBeautiful themes for any preference
Fully ResponsiveWorks seamlessly on desktop, tablet, and mobile
Lightning FastBuilt with Next.js 16 for optimal performance
Smart CachingRecently analyzed repos load instantly

Quick Start

Prerequisites

  • Node.js 18.0 or higher
  • pnpm (recommended) or npm/yarn
  • Git
# Verify Node.js version
node --version # Should be >= 18.0.0# Install pnpm if needed
npm install -g pnpm

Installation

# 1. Clone the repository
git clone https://github.com/OssiumOfficial/Repolyze.git
cd Repolyze
# 2. Install dependencies
pnpm install
# 3. Set up environment variables
cp .env.example .env.local
# 4. Add your API keys (see Environment Variables section)# 5. Start development server
pnpm dev
# 6. Open http://localhost:3000

Environment Variables

Create a .env.local file with the following:

# ===========================================# REQUIRED# ===========================================# GitHub Personal Access Token# Get yours at: https://github.com/settings/tokens# Required scopes: repo, read:userGITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx# OpenRouter API Key# Get yours at: https://openrouter.ai/keysOPENROUTER_API_KEY=sk-or-xxxxxxxxxxxxxxxxxxxx# ===========================================# OPTIONAL# ===========================================# Site URL (for SEO and social sharing)NEXT_PUBLIC_SITE_URL=http://localhost:3000# Cache duration in seconds (default: 3600)CACHE_TTL=3600
📋 How to Get API Keys

GitHub Personal Access Token

  1. Go to GitHub SettingsDeveloper settingsPersonal access tokensTokens (classic)
  2. Click "Generate new token (classic)"
  3. Select scopes: repo, read:user
  4. Copy the token and add it to .env.local

OpenRouter API Key

  1. Go to OpenRouter
  2. Sign up and navigate to SettingsAPI Keys
  3. Create a new key and add it to .env.local

🛠️ Tech Stack

CategoryTechnologies
FrameworkNext.js 16, React 19, TypeScript 5
StylingTailwind CSS 4, shadcn/ui
AnimationFramer Motion
DiagramsMermaid
PDF ExportjsPDF
AIOpenRouter
DeploymentVercel

📁 Project Structure

Repolyze/
├── app/
│ ├── api/
│ │ ├── analyze/
│ │ │ ├── route.ts # POST /api/analyze - Main analysis endpoint
│ │ │ ├── config.ts # API configuration & constants
│ │ │ ├── types.ts # Request/Response type definitions
│ │ │ ├── validators.ts # Input validation schemas
│ │ │ ├── rate-limit.ts # Rate limiting middleware
│ │ │ └── stream-handler.ts # SSE streaming handler
│ │ └── branches/
│ │ └── route.ts # GET /api/branches - Fetch repo branches
│ ├── share/
│ │ └── page.tsx # Shareable analysis page
│ ├── layout.tsx # Root layout with providers
│ ├── page.tsx # Home page
│ └── globals.css # Global styles & Tailwind imports
│
├── components/
│ ├── ui/ # shadcn/ui components (button, card, dialog, etc.)
│ │
│ ├── repo-analyzer/
│ │ ├── index.tsx # Main analyzer orchestrator
│ │ ├── section-header.tsx # Reusable section headers
│ │ └── automations.ts # Automation suggestions logic
│ │
│ ├── analysis-header/
│ │ ├── index.tsx # Analysis results header
│ │ ├── branch-selector.tsx # Branch selection dropdown
│ │ └── summary-actions.tsx # Export & share action buttons
│ │
│ ├── file-tree/
│ │ ├── index.tsx # File tree container
│ │ ├── tree-node.tsx # Individual tree node component
│ │ ├── language-tags.tsx # Language indicator badges
│ │ └── types.ts # File tree type definitions
│ │
│ ├── share-card/
│ │ ├── index.tsx # Share card generator
│ │ ├── variants/ # Card variants (compact, default, detailed)
│ │ ├── technical-frame.tsx # Technical info frame
│ │ └── types.ts # Share card types
│ │
│ ├── share-modal/
│ │ ├── index.tsx # Share modal entry point
│ │ ├── desktop-dialog.tsx # Desktop share dialog
│ │ ├── mobile-drawer.tsx # Mobile share drawer
│ │ └── action-sections.tsx # Share action buttons
│ │
│ ├── testimonial/
│ │ ├── masonry.tsx # Masonry layout for testimonials
│ │ ├── testimonial.tsx # Individual testimonial card
│ │ └── data.ts # Testimonial data
│ │
│ ├── ai-insights.tsx # AI-generated insights display
│ ├── automation-panel.tsx # Automation suggestions panel
│ ├── architecture-diagram.tsx # Architecture visualization
│ └── data-flow-diagram.tsx # Mermaid data flow diagram
│
├── context/
│ ├── analysis-context.tsx # Global analysis state management
│ └── theme-provider.tsx # Theme context (dark/light mode)
│
├── lib/
│ ├── pdf-export.ts # PDF generation with jsPDF
│ ├── share.ts # Share URL & social sharing utilities
│ ├── storage.ts # LocalStorage helpers for caching
│ ├── validators.ts # URL & input validation functions
│ └── mermaid.ts # Mermaid diagram configuration
│
├── public/
│ ├── icon.svg # App icon
│ ├── og-image.png # Open Graph image for social sharing
│ └── Repolyze-showcase.png # README showcase image
│
├── .env.example # Environment variables template
├── .env.local # Local environment variables (git-ignored)
├── next.config.ts # Next.js configuration
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
└── package.json # Dependencies & scripts

🔄 Data Flow

flowchart TB
subgraph Client
A[User Input] --> B[URL Validation]
B --> C[Branch Selection]
end
subgraph API Layer
C --> D[Rate Limiter]
D --> E[GitHub API]
E --> F[Repository Data]
F --> G[AI Analysis Engine]
end
subgraph Processing
G --> H[Score Calculation]
H --> I[Insight Generation]
I --> J[Diagram Generation]
end
subgraph Output
J --> K[Results Display]
K --> L{Export Options}
L --> M[PDF Report]
L --> N[Markdown]
L --> O[Share Card]
L --> P[Social Share]
end
Loading

Component Interaction Flow

┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ RepoAnalyzer │────▶│ AnalysisContext │────▶│ API Routes │
│ (UI Entry) │ │ (State Mgmt) │ │ (/api/analyze) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ AnalysisHeader │ │ File Tree │ │ GitHub + AI │
│ (Actions/Nav) │ │ (Structure) │ │ (Data Fetch) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ ShareModal │ │ AI Insights │ │ Score Cards │
│ (Export/Share) │ │ (Recommendations)│ │ (Metrics) │
└─────────────────┘ └──────────────────┘ └─────────────────┘

🔌 API Reference

Analyze Repository

Analyzes a GitHub repository and returns comprehensive insights.

POST /api/analyzeContent-Type: application/json

Request Body

{
"repoUrl": "https://github.com/owner/repo",
"branch": "main",
"forceRefresh": false
}
ParameterTypeRequiredDescription
repoUrlstringYesFull GitHub repository URL
branchstringNoBranch to analyze (default: repository's default branch)
forceRefreshbooleanNoSkip cache and force re-analysis

Response

{
"success": true,
"cached": false,
"data": {
"metadata": {
"name": "next.js",
"fullName": "vercel/next.js",
"description": "The React Framework",
"stars": 120000,
"forks": 25000,
"language": "TypeScript",
"branch": "main",
"license": "MIT",
"owner": {
"login": "vercel",
"avatarUrl": "https://avatars.githubusercontent.com/u/..."
}
},
"scores": {
"overall": 92,
"codeQuality": 95,
"documentation": 90,
"security": 88,
"maintainability": 94,
"testCoverage": 85,
"dependencies": 90
},
"insights": [
{
"type": "strength",
"title": "Excellent Documentation",
"description": "Comprehensive README and API documentation",
"priority": "high"
}
],
"techStack": ["TypeScript", "React", "Next.js", "Turbopack"],
"fileTree": { "...": "..." },
"dataFlow": {
"mermaid": "flowchart TD\n A[Input] --> B[Process]"
},
"refactors": [...],
"automations": [...],
"summary": "Next.js is a well-maintained React framework..."
}
}

Error Responses

StatusCodeDescription
400INVALID_URLInvalid GitHub URL format
404REPO_NOT_FOUNDRepository not found
422BRANCH_NOT_FOUNDSpecified branch not found
429RATE_LIMITEDToo many requests

Get Branches

Fetches all available branches for a repository.

GET /api/branches?repo=owner/repo

Response

{
"success": true,
"data": {
"branches": [
{ "name": "main", "protected": true, "default": true },
{ "name": "develop", "protected": false, "default": false }
],
"defaultBranch": "main"
}
}

Usage Examples

cURL:

curl -X POST https://repolyze.ossium.live/api/analyze \
-H "Content-Type: application/json" \
-d '{"repoUrl": "https://github.com/vercel/next.js", "branch": "canary"}'

JavaScript:

constresponse=awaitfetch("/api/analyze",{method: "POST",headers: {"Content-Type": "application/json"},body: JSON.stringify({repoUrl: "https://github.com/vercel/next.js",branch: "canary",}),});const{ data }=awaitresponse.json();console.log(data.scores.overall);// 92

🧪 Development

Available Scripts

CommandDescription
pnpm devStart development server
pnpm buildBuild for production
pnpm startStart production server
pnpm lintRun ESLint
pnpm lint:fixFix ESLint errors
pnpm type-checkRun TypeScript checks
pnpm formatFormat code with Prettier

Testing Locally

# Test analyze endpoint
curl -X POST http://localhost:3000/api/analyze \
-H "Content-Type: application/json" \
-d '{"repoUrl": "https://github.com/ig-imanish/mx-icons"}'# Test branches endpoint
curl "http://localhost:3000/api/branches?repo=ig-imanish/mx-icons"# Test share page
open http://localhost:3000/share/ig-imanish/mx-icons

🤝 Contributing

We welcome contributions from everyone! Here's how you can help:

Ways to Contribute

TypeDescription
🐛 Bug ReportsFound a bug? Open an issue
💡 Feature RequestsHave an idea? Start a discussion
📝 DocumentationHelp improve our docs
🔧 CodeSubmit bug fixes or new features
🎨 DesignImprove UI/UX

Getting Started

# 1. Fork the repository on GitHub# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/Repolyze.git
cd Repolyze
# 3. Add upstream remote
git remote add upstream https://github.com/OssiumOfficial/Repolyze.git
# 4. Create a feature branch
git checkout -b feature/amazing-feature
# 5. Install dependencies
pnpm install
# 6. Start development
pnpm dev
# 7. Make your changes and commit
git add .
git commit -m "feat: add amazing feature"# 8. Push to your fork
git push origin feature/amazing-feature
# 9. Open a Pull Request on GitHub

Commit Convention

We follow Conventional Commits:

TypeDescriptionExample
featNew featurefeat: add branch comparison
fixBug fixfix: resolve memory leak
docsDocumentationdocs: update API reference
styleFormattingstyle: fix indentation
refactorCode refactoringrefactor: simplify auth logic
perfPerformanceperf: optimize image loading
testTeststest: add unit tests
choreMaintenancechore: update dependencies

Pull Request Guidelines

Before submitting a PR, please ensure:

  • Code follows the existing style
  • All tests pass (pnpm lint && pnpm type-check)
  • Commit messages follow convention
  • Documentation is updated if needed
  • PR description explains the changes

Issue Guidelines

When opening an issue, please include:

For Bug Reports:

  • Clear description of the bug
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots if applicable
  • Environment details (OS, browser, Node version)

For Feature Requests:

  • Clear description of the feature
  • Use case / problem it solves
  • Proposed solution (if any)
  • Alternatives considered

🗺️ Roadmap

Upcoming Features

  • 🔐 Private repository support with OAuth
  • 📊 Historical tracking & score trends
  • 🔔 Webhook notifications on score changes
  • 📈 Team dashboard for multiple repos
  • 🤖 GitHub Action integration
  • 🔍 Branch comparison (side-by-side)

Recently Completed

  • ✅ Branch analysis support
  • ✅ Data flow diagrams (Mermaid)
  • ✅ PDF export with jsPDF
  • ✅ Markdown/Plain text copy
  • ✅ Social sharing
  • ✅ Dark/Light mode
  • ✅ Smart caching

❓ FAQ

Is Repolyze free to use?

Yes! Repolyze is completely free and open source under the MIT license.

Is my code stored anywhere?

No. Repolyze analyzes repositories in real-time and does not store any code. Only analysis results are temporarily cached.

Can I analyze private repositories?

Currently, only public repositories are supported. Private repository support is on our roadmap.

What languages are supported?

Repolyze can analyze repositories in any programming language including JavaScript, TypeScript, Python, Go, Rust, Java, and more.

How accurate is the analysis?

Repolyze uses advanced AI models for analysis. Results should be considered as helpful suggestions rather than absolute assessments.


📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License
Copyright (c) 2024 Ossium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software...

🙏 Acknowledgments

Special thanks to these amazing projects:


⭐ Show Your Support

If you find Repolyze useful, please consider giving it a star!

Star on GitHub

Share with others:

Share on TwitterShare on LinkedIn

About

Analyze your GitHub repository with actionable insights, visual diagrams, and exportable reports.

Resources

Code of conduct

Contributing

Stars

127 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages