npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, πŸ‘‹, I’m Ryan HefnerΒ  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you πŸ™

Β© 2026 – Pkg Stats / Ryan Hefner

choi2021

v1.0.0

Published

πŸ—ΊοΈ Visualize Next.js routes as an interactive diagram. Automatically parse route structures and navigation relationships in your Next.js project.

Readme

πŸ—ΊοΈ Next.js Route Map

Next.js ν”„λ‘œμ νŠΈμ˜ 라우트 ꡬ쑰λ₯Ό μΈν„°λž™ν‹°λΈŒν•œ μ‹œκ°μ  λ‹€μ΄μ–΄κ·Έλž¨μœΌλ‘œ λ³€ν™˜ν•˜λŠ” CLI 도ꡬ

npm version License: MIT

✨ νŠΉμ§•

  • πŸš€ κ°„λ‹¨ν•œ μ‚¬μš©λ²•: ν•œ 쀄 λͺ…λ Ήμ–΄λ‘œ 라우트 λ§΅ 생성
  • 🎨 μΈν„°λž™ν‹°λΈŒ μ‹œκ°ν™”: Cytoscape.js 기반의 동적 κ·Έλž˜ν”„
  • πŸ“± λͺ¨λ“  라우트 νƒ€μž… 지원: νŽ˜μ΄μ§€, API, 동적 라우트 λͺ¨λ‘ 감지
  • πŸ”— λ„€λΉ„κ²Œμ΄μ…˜ 좔적: router.push(), Link μ»΄ν¬λ„ŒνŠΈ μ—°κ²° 관계 뢄석
  • πŸ“„ 단일 HTML 파일: μ„œλ²„ 없이 λΈŒλΌμš°μ €μ—μ„œ λ°”λ‘œ μ‹€ν–‰
  • 🎯 제둜 μ„€μ •: 별도 μ„€μ • 없이 μ¦‰μ‹œ μ‚¬μš© κ°€λŠ₯

πŸš€ λΉ λ₯Έ μ‹œμž‘

npx둜 μ¦‰μ‹œ μ‚¬μš© (ꢌμž₯)

npx next-route-map map --path ./your-nextjs-project

κΈ€λ‘œλ²Œ μ„€μΉ˜

npm install -g next-route-map
next-route-map map --path ./your-nextjs-project

πŸ“– μ‚¬μš©λ²•

κΈ°λ³Έ μ‚¬μš©λ²•

# ν˜„μž¬ λ””λ ‰ν† λ¦¬μ˜ Next.js ν”„λ‘œμ νŠΈ 뢄석
npx next-route-map map

# νŠΉμ • 경둜의 ν”„λ‘œμ νŠΈ 뢄석
npx next-route-map map --path ./my-next-app

# 도움말 보기
npx next-route-map --help

λͺ…λ Ήμ–΄ μ˜΅μ…˜

next-route-map map [options]

Options:
  -p, --path <path>     Next.js ν”„λ‘œμ νŠΈ 경둜 (κΈ°λ³Έκ°’: ".")
  -h, --help           도움말 ν‘œμ‹œ

🎨 μƒμ„±λ˜λŠ” μ‹œκ°ν™”

도ꡬλ₯Ό μ‹€ν–‰ν•˜λ©΄ route-visualizer.html 파일이 μƒμ„±λ˜λ©°, λ‹€μŒκ³Ό 같은 κΈ°λŠ₯을 μ œκ³΅ν•©λ‹ˆλ‹€:

πŸ“Š λ…Έλ“œ νƒ€μž…λ³„ 색상 ꡬ뢄

  • 🟒 일반 νŽ˜μ΄μ§€: μ΄ˆλ‘μƒ‰ (예: /about, /contact)
  • πŸ”΅ 동적 라우트: νŒŒλž€μƒ‰ (예: /user/[id], /blog/[...slug])
  • 🟠 API 라우트: 주황색 (예: /api/users, /api/auth)

πŸ”— μ—°κ²° 관계 ν‘œμ‹œ

  • νŒŒλž€μƒ‰ ν™”μ‚΄ν‘œ: router.push() λ„€λΉ„κ²Œμ΄μ…˜
  • 빨간색 ν™”μ‚΄ν‘œ: router.replace() λ„€λΉ„κ²Œμ΄μ…˜
  • μ΄ˆλ‘μƒ‰ ν™”μ‚΄ν‘œ: <Link> μ»΄ν¬λ„ŒνŠΈ μ—°κ²°

πŸ–±οΈ μΈν„°λž™ν‹°λΈŒ κΈ°λŠ₯

  • 쀌/팬: 마우슀 휠과 λ“œλž˜κ·Έλ‘œ ν™•λŒ€/μΆ•μ†Œ 및 이동
  • μ—£μ§€ 클릭: 연결선을 ν΄λ¦­ν•˜λ©΄ μ†ŒμŠ€ μ½”λ“œ 정보 ν‘œμ‹œ
  • μžλ™ λ ˆμ΄μ•„μ›ƒ: 계측적 ꡬ쑰둜 μžλ™ μ •λ ¬

πŸ“ μ§€μ›ν•˜λŠ” ν”„λ‘œμ νŠΈ ꡬ쑰

Pages Router (Next.js 12 μ΄ν•˜)

pages/
β”œβ”€β”€ index.js          β†’ /
β”œβ”€β”€ about.js          β†’ /about
β”œβ”€β”€ user/
β”‚   β”œβ”€β”€ index.js      β†’ /user
β”‚   └── [id].js       β†’ /user/[id]
└── api/
    └── users.js      β†’ /api/users

App Router (Next.js 13+)

app/
β”œβ”€β”€ page.js           β†’ /
β”œβ”€β”€ about/
β”‚   └── page.js       β†’ /about
β”œβ”€β”€ user/
β”‚   β”œβ”€β”€ page.js       β†’ /user
β”‚   └── [id]/
β”‚       └── page.js   β†’ /user/[id]
└── api/
    └── users/
        └── route.js  β†’ /api/users

πŸ” κ°μ§€λ˜λŠ” λ„€λΉ„κ²Œμ΄μ…˜ νŒ¨ν„΄

λ„κ΅¬λŠ” λ‹€μŒκ³Ό 같은 μ½”λ“œ νŒ¨ν„΄μ„ μžλ™μœΌλ‘œ κ°μ§€ν•©λ‹ˆλ‹€:

// router.push() 호좜
import { useRouter } from "next/router";
const router = useRouter();
router.push("/dashboard");

// Link μ»΄ν¬λ„ŒνŠΈ
import Link from "next/link";
<Link href="/profile">ν”„λ‘œν•„</Link>;

// router.replace() 호좜
router.replace("/login");

βš™οΈ μš”κ΅¬μ‚¬ν•­

  • Node.js: 14.0.0 이상
  • Next.js ν”„λ‘œμ νŠΈ: Pages Router λ˜λŠ” App Router
  • λΈŒλΌμš°μ €: λͺ¨λ˜ λΈŒλΌμš°μ € (Chrome, Firefox, Safari, Edge)

πŸ“ 예제 좜λ ₯

도ꡬ μ‹€ν–‰ ν›„ μƒμ„±λ˜λŠ” HTML νŒŒμΌμ„ λΈŒλΌμš°μ €μ—μ„œ μ—΄λ©΄:

πŸ—ΊοΈ  Next.js 라우트 λ§΅ 생성 쀑...
πŸ“ ν”„λ‘œμ νŠΈ 경둜: ./my-next-app
🎨 ν…Œλ§ˆ: light
πŸ“Š 좜λ ₯ ν˜•μ‹: web
μ‹œκ°ν™” 파일 생성: ./my-next-app/route-visualizer.html

πŸ› οΈ 개발자 정보

ν”„λ‘œμ νŠΈ ꡬ쑰

next-route-map/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ cli/           # CLI λͺ…λ Ήμ–΄ 처리
β”‚   β”œβ”€β”€ parser/        # 라우트 νŒŒμ‹± μ—”μ§„
β”‚   └── types/         # TypeScript νƒ€μž… μ •μ˜
β”œβ”€β”€ dist/              # λΉŒλ“œλœ 파일
└── example-next/      # ν…ŒμŠ€νŠΈμš© Next.js ν”„λ‘œμ νŠΈ

기술 μŠ€νƒ

  • TypeScript: νƒ€μž… μ•ˆμ „μ„±
  • Commander.js: CLI ν”„λ ˆμž„μ›Œν¬
  • Glob: 파일 νŒ¨ν„΄ λ§€μΉ­
  • Cytoscape.js: κ·Έλž˜ν”„ μ‹œκ°ν™”

🀝 κΈ°μ—¬ν•˜κΈ°

  1. 이 μ €μž₯μ†Œλ₯Ό ν¬ν¬ν•©λ‹ˆλ‹€
  2. κΈ°λŠ₯ 브랜치λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€ (git checkout -b feature/amazing-feature)
  3. 변경사항을 μ»€λ°‹ν•©λ‹ˆλ‹€ (git commit -m 'Add amazing feature')
  4. λΈŒλžœμΉ˜μ— ν‘Έμ‹œν•©λ‹ˆλ‹€ (git push origin feature/amazing-feature)
  5. Pull Requestλ₯Ό μƒμ„±ν•©λ‹ˆλ‹€

πŸ“„ λΌμ΄μ„ μŠ€

이 ν”„λ‘œμ νŠΈλŠ” MIT λΌμ΄μ„ μŠ€ ν•˜μ— λ°°ν¬λ©λ‹ˆλ‹€. μžμ„Έν•œ λ‚΄μš©μ€ LICENSE νŒŒμΌμ„ μ°Έμ‘°ν•˜μ„Έμš”.

πŸ› 버그 리포트 & κΈ°λŠ₯ μš”μ²­

λ¬Έμ œκ°€ λ°œμƒν•˜κ±°λ‚˜ μƒˆλ‘œμš΄ κΈ°λŠ₯을 μ œμ•ˆν•˜κ³  μ‹ΆμœΌμ‹œλ©΄ GitHub Issues에 등둝해 μ£Όμ„Έμš”.

πŸ“š κ΄€λ ¨ ν”„λ‘œμ νŠΈ

  • Next.js - React ν”„λ ˆμž„μ›Œν¬
  • Cytoscape.js - κ·Έλž˜ν”„ μ‹œκ°ν™” 라이브러리
  • webpack-bundle-analyzer - λ²ˆλ“€ 뢄석 도ꡬ (μ˜κ°μ„ 받은 ν”„λ‘œμ νŠΈ)

⭐ 이 ν”„λ‘œμ νŠΈκ°€ μœ μš©ν•˜λ‹€λ©΄ GitHubμ—μ„œ μŠ€νƒ€λ₯Ό λˆŒλŸ¬μ£Όμ„Έμš”!