Skip to content

Abhilash-03/RepoMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RepoMap πŸ—ΊοΈ

A powerful, zero-setup dependency visualization tool for JavaScript/TypeScript repositories. Simply paste a GitHub URL and instantly see an interactive map of file dependencies, discover orphan files, and identify entry points.

RepoMap TypeScript Vite

✨ Features

Core Analysis

  • πŸ“Š Interactive Dependency Graph - Zoomable, pannable graph with ELK layout algorithm
  • πŸ”΄ Orphan File Detection - Identify dead code and unused files
  • 🟒 Entry Point Detection - Automatically identifies main entry files
  • πŸ”— Bidirectional Tracking - See both imports and imported-by relationships

Framework Support

  • βš›οΈ React / Vite - Full support for standard React applications
  • ⬛ Next.js - App Router & Pages Router, API routes, middleware
  • 🎸 Remix - File-based routing, entry files
  • πŸ“¦ Node.js / Express - Backend JS/TS projects

Note: Vue (.vue), Svelte (.svelte), and Astro (.astro) single-file components are not yet analyzed. Only their companion JS/TS files are supported.

Smart Detection

  • πŸ“ Path Alias Resolution - Supports @/, ~/, #/ aliases
  • πŸ“ TypeScript ESM - Resolves .js imports to .ts files
  • βš™οΈ Config File Detection - Recognizes *.config.*, .*rc, etc.
  • πŸ§ͺ Test File Detection - Excludes test files from orphan detection
  • πŸ“š Storybook Support - Recognizes .stories.* files

User Experience

  • πŸ“± Mobile Responsive - Full touch support with tap-to-view details
  • πŸŒ™ Full Screen Mode - Distraction-free graph exploration
  • ⏳ Progress Indicator - Real-time analysis progress with step-by-step feedback
  • πŸ”‘ GitHub Token Settings - Configure API tokens with rate limit display
  • πŸ“– Comprehensive Docs - Built-in documentation at /docs

πŸ› οΈ Tech Stack

Layer Technology
Frontend React 19, TypeScript, Vite, Tailwind CSS
UI Components shadcn/ui, Lucide Icons
Visualization React Flow, ELK.js Layout
Backend Node.js, Express, TypeScript
GitHub API Octokit
Routing React Router DOM

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/Abhilash-03/RepoMap.git
cd RepoMap

# Install all dependencies
npm run install:all

# Start development servers
npm run dev

The app will be available at:

πŸ“– Usage

  1. Open the app in your browser at http://localhost:5173
  2. Paste a GitHub URL (e.g., https://github.com/pmndrs/zustand)
  3. Click "Analyze" and wait for the analysis to complete
  4. Explore the graph:
    • 🟒 Green nodes = Entry points
    • πŸ”΄ Red nodes = Orphan files
    • βšͺ Gray nodes = Regular files
  5. Tap/click nodes to see detailed information
  6. Use controls to zoom, pan, change layout direction, or go full screen

GitHub API Rate Limits

Type Requests/Hour
Without Token 60
With Token 5,000

Add your token via the βš™οΈ Settings icon in the header.

πŸ“ Project Structure

RepoMap/
β”œβ”€β”€ client/                 # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ docs/       # Documentation page components
β”‚   β”‚   β”‚   └── ui/         # shadcn/ui components
β”‚   β”‚   β”œβ”€β”€ pages/          # Page components
β”‚   β”‚   β”œβ”€β”€ services/       # API service
β”‚   β”‚   β”œβ”€β”€ lib/            # Utilities & ELK layout
β”‚   β”‚   └── types/          # TypeScript types
β”‚   └── package.json
β”œβ”€β”€ server/                 # Express backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/         # API routes
β”‚   β”‚   β”œβ”€β”€ services/       # Analysis logic
β”‚   β”‚   β”‚   β”œβ”€β”€ analyzer.ts # Dependency analysis
β”‚   β”‚   β”‚   β”œβ”€β”€ github.ts   # GitHub API client
β”‚   β”‚   β”‚   └── graphBuilder.ts
β”‚   β”‚   └── types/
β”‚   └── package.json
└── package.json            # Root package.json

πŸ”Œ API Reference

Analyze Repository

POST /api/analyze
Content-Type: application/json

{
  "repoUrl": "https://github.com/owner/repo",
  "githubToken": "optional_token"
}

Response:

{
  "repoInfo": { "owner": "...", "repo": "..." },
  "totalFiles": 42,
  "entryPoints": ["src/main.tsx"],
  "orphanFiles": ["src/unused.ts"],
  "dependencies": [...],
  "nodes": [...],
  "edges": [...],
  "rateLimit": { "remaining": 4999, "limit": 5000 }
}

Check Rate Limit

GET /api/rate-limit
x-github-token: optional_token

Response:

{
  "limit": 5000,
  "remaining": 4990,
  "reset": 1704067200,
  "used": 10
}

🎯 Supported File Types

Extension Description
.js JavaScript
.jsx JavaScript JSX
.ts TypeScript
.tsx TypeScript JSX
.mjs ES Modules
.cjs CommonJS

🚫 Excluded Directories

The following directories are automatically skipped:

  • node_modules, dist, build, .git
  • coverage, vendor, __pycache__
  • .next, .nuxt, out

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is open source and available under the MIT License.

πŸ™ Acknowledgments


Made with ❀️ for developers who love clean code

About

GitHub Repository File Dependency Analyzer - Visual dependency graph and orphan file detection

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages