GitHub Releases API を使用して、任意のユーザーのリポジトリ別ダウンロード数をリアルタイムで取得・可視化する Web アプリケーションです。
Live Demo: https://obott9.github.io/github-download-counter/
- 🔍 GitHub ユーザー名を入力して、全リポジトリのリリースダウンロード数を一括取得
- 📊 ダウンロード数のサマリー表示(総ダウンロード数、リポジトリ数、リリース数)
- 📦 リポジトリごとのリリース詳細(バージョン、アセット、ファイルサイズ)を展開表示
- 📈 ダウンロード数の視覚的なバーグラフ
- ⚡
Promise.allによる並列 API コールで高速取得 - 🎯 Rate Limit 表示(API 使用状況のモニタリング)
- 📱 レスポンシブデザイン
| Category | Technology |
|---|---|
| Frontend | React 18 |
| Build | Vite 5 |
| API | GitHub REST API v3 |
| Deploy | GitHub Pages (gh-pages) |
| Language | JavaScript (ES2022+) |
GET /users/{username}/repos?per_page=100&sort=updated
GET /repos/{owner}/{repo}/releases?per_page=100
- 認証なし: 60 リクエスト/時間
- トークン認証: 5,000 リクエスト/時間
- Node.js 18+
- npm or yarn
git clone https://github.com/obott9/github-download-counter.git
cd github-download-counter
npm installnpm run devブラウザで http://localhost:5173/github-download-counter/ を開きます。
npm run buildnpm run deploy- リポジトリ取得:
/users/:user/reposで全公開リポジトリを取得 - 並列リリース取得:
Promise.allで各リポジトリの/repos/:owner/:repo/releasesを同時に呼び出し - 集計・可視化: アセットごとの
download_countを集計し、ソート・表示 - Rate Limit 監視: レスポンスヘッダー
x-ratelimit-*から残りリクエスト数を表示
// 並列API呼び出しの例
const results = await Promise.all(
repos.map(async (repo) => {
const res = await fetch(`${API}/repos/${user}/${repo.name}/releases`);
return res.ok ? res.json() : [];
})
);github-download-counter/
├── index.html # エントリーポイント
├── vite.config.js # Vite設定(GitHub Pages base path)
├── package.json
├── LICENSE
└── src/
├── main.jsx # React マウント
└── App.jsx # メインコンポーネント(全ロジック)
MIT License - See LICENSE for details.
obott9 — Senior Software Engineer
35+ years of cross-platform development experience (Swift/macOS, C#/.NET/Windows)