@mcptoolshop/registry-stats 1.2.4 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.it.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="README.md">English</a> | <a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a> | <a href="README.es.md">Español</a> | <a href="README.fr.md">Français</a> | <a href="README.hi.md">हिन्दी</a> | <strong>Italiano</strong> | <a href="README.pt-BR.md">Português</a>
2
+ <a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a> | <a href="README.es.md">Español</a> | <a href="README.fr.md">Français</a> | <a href="README.hi.md">हिन्दी</a> | <a href="README.md">English</a> | <a href="README.pt-BR.md">Português (BR)</a>
3
3
  </p>
4
4
 
5
5
  <p align="center">
@@ -7,31 +7,69 @@
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- One command. Five registries. All your download stats.
10
+ Five registries. One engine. Dashboard included.
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
14
  <a href="https://github.com/mcp-tool-shop-org/registry-stats/actions/workflows/pages.yml"><img src="https://github.com/mcp-tool-shop-org/registry-stats/actions/workflows/pages.yml/badge.svg" alt="CI"></a>
15
15
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
16
16
  <a href="https://www.npmjs.com/package/@mcptoolshop/registry-stats"><img src="https://img.shields.io/npm/v/@mcptoolshop/registry-stats" alt="npm version"></a>
17
+ <a href="https://mcp-tool-shop-org.github.io/registry-stats/dashboard/"><img src="https://img.shields.io/badge/Dashboard-live-green" alt="Dashboard"></a>
17
18
  <a href="https://mcp-tool-shop-org.github.io/registry-stats/"><img src="https://img.shields.io/badge/Landing_Page-live-blue" alt="Landing Page"></a>
18
19
  </p>
19
20
 
20
21
  <p align="center">
21
- <a href="https://mcp-tool-shop-org.github.io/registry-stats/">Docs</a> &middot;
22
+ <a href="#dashboard">Dashboard</a> &middot;
23
+ <a href="#desktop-app">Desktop App</a> &middot;
22
24
  <a href="#install">Install</a> &middot;
23
25
  <a href="#cli">CLI</a> &middot;
24
- <a href="#config-file">Config</a> &middot;
25
26
  <a href="#programmatic-api">API</a> &middot;
26
27
  <a href="#rest-api-server">REST Server</a> &middot;
28
+ <a href="#config-file">Config</a> &middot;
27
29
  <a href="#license">License</a>
28
30
  </p>
29
31
 
30
32
  ---
31
33
 
32
- Se pubblicate su npm, PyPI, NuGet, VS Code Marketplace o Docker Hub, attualmente avete bisogno di cinque API diverse per rispondere alla domanda "quanti download ho avuto questo mese?". Questa libreria vi offre un'unica interfaccia per tutte, sia come interfaccia a riga di comando (CLI) che come API programmatica.
34
+ Pubblica su npm, PyPI, NuGet, il Marketplace di VS Code e Docker Hub. Attualmente, rispondere alla domanda "come stanno andando i miei pacchetti?" significa controllare cinque siti diversi. **registry-stats** è la piattaforma completa: un motore TypeScript (CLI + API + server REST), una dashboard web interattiva e un'applicazione desktop nativa per Windows, il tutto proveniente da un unico repository.
35
+
36
+ Nessuna dipendenza a runtime. Utilizza la funzione nativa `fetch()`. Node 18 o superiore.
37
+
38
+ ## Cosa c'è all'interno
39
+
40
+ | Livello | Cosa fa |
41
+ |-------|-------------|
42
+ | **Engine** | Libreria TypeScript + CLI + server REST. Interroga cinque registri con un'unica interfaccia. Pubblicato su npm come `@mcptoolshop/registry-stats`. |
43
+ | **Dashboard** | Applicazione web basata su Astro. Assistente chat AI, sei grafici interattivi, motore di crescita intelligente e guida con schede. Ricostruita settimanalmente tramite CI. |
44
+ | **Desktop** | Applicazione nativa per Windows realizzata con WinUI 3 + WebView2. Include la dashboard offline e scarica le statistiche in tempo reale su richiesta. |
45
+
46
+ ## Dashboard
47
+
48
+ Una dashboard con aggiornamenti automatici è disponibile all'indirizzo [`/dashboard/`](https://mcp-tool-shop-org.github.io/registry-stats/dashboard/).
33
49
 
34
- Nessuna dipendenza. Utilizza la funzione nativa `fetch()`. Node 18 o superiore.
50
+ - **Interfaccia a schede** Schede Home, Analytics, Leaderboard e Help
51
+ - **Assistente chat AI** — Registry Assistant alimentato da Ollama con contesto RAG, risposte in streaming, selettore di modelli e memoria della conversazione
52
+ - **Riepilogo esecutivo** — punteggio di salute (0–100), indice di diversità, variazione settimanale, download totali da tutti i registri
53
+ - **Sei grafici interattivi** — tendenza a 30 giorni (vista aggregata / per registro / top 5), quota del registro (area polare), rischio del portafoglio (istogramma + Gini & P90), top 10 momentum, tracker della velocità con sparkline e mappa termica a 30 giorni con rilevamento picchi (>2σ)
54
+ - **Motore di crescita intelligente** — gestisce la distorsione dei piccoli denominatori con soglia di base, limite percentuale e formula di velocità smorzata
55
+ - **Insight azionabili** — raccomandazioni auto-generate e avvisi di attenzione per i pacchetti in calo
56
+ - **Classifica** — tutti i pacchetti classificati per download settimanali con sparkline a 30 giorni e badge di tendenza intelligenti
57
+ - **Pagina di configurazione** — editor del portafoglio con validazione, sezione registry-sync e panoramica della pipeline
58
+ - **Scheda di aiuto** — guida intuitiva che copre ogni scheda, concetti chiave, suggerimenti per l'assistente AI, pipeline dei dati e link utili
59
+ - **Tema chiaro/scuro** — segue le preferenze del sistema
60
+
61
+ I dati vengono scaricati al momento della compilazione e la dashboard viene ricostruita settimanalmente tramite CI (il lunedì alle 06:00 UTC). Configura i pacchetti da monitorare in `site/src/data/packages.json`.
62
+
63
+ ## Applicazione Desktop
64
+
65
+ Un'applicazione nativa per Windows che integra la dashboard in un ambiente WebView2 locale:
66
+
67
+ - **Funziona offline** — include file HTML/CSS/JS; funziona senza connessione a Internet.
68
+ - **Aggiornamento in tempo reale** — scarica `stats.json` da GitHub Pages su richiesta.
69
+ - **Esportazione CSV** — esporta i dati della classifica con un solo clic.
70
+ - **Pacchetto MSIX** — creato e firmato tramite CI utilizzando `desktop-ci.yml`.
71
+
72
+ Il codice sorgente dell'applicazione desktop si trova nella cartella `desktop/`. Realizzata con .NET 10 MAUI e destinata a WinUI 3.
35
73
 
36
74
  ## Installazione
37
75
 
@@ -52,10 +90,6 @@ registry-stats express
52
90
 
53
91
  # Time series with monthly breakdown + trend
54
92
  registry-stats express -r npm --range 2025-01-01:2025-06-30
55
- # 2025-01 142,359,021
56
- # 2025-02 147,522,528
57
- # ...
58
- # Total: 448,383,383 Avg/day: 4,982,038 Trend: flat (-0.46%)
59
93
 
60
94
  # Raw JSON output
61
95
  registry-stats express -r npm --json
@@ -74,14 +108,6 @@ registry-stats
74
108
 
75
109
  # Compare across registries
76
110
  registry-stats express --compare
77
- # express — comparison
78
- #
79
- # Metric npm pypi
80
- # ─────────────────────────────────
81
- # Total - -
82
- # Month 283,472 47,201
83
- # Week 67,367 11,800
84
- # Day 11,566 1,686
85
111
 
86
112
  # Export as CSV or chart-friendly JSON
87
113
  registry-stats express -r npm --range 2025-01-01:2025-06-30 --format csv
@@ -161,7 +187,6 @@ calc.toChartData(daily, 'express'); // { labels: [...], datasets: [{ labe
161
187
 
162
188
  // Comparison — same package across registries
163
189
  const comparison = await stats.compare('express');
164
- // → { package: 'express', registries: { npm: {...}, pypi: {...} }, fetchedAt: '...' }
165
190
  await stats.compare('express', ['npm', 'pypi']); // specific registries only
166
191
 
167
192
  // Caching (5 min TTL, in-memory)
@@ -173,7 +198,7 @@ await stats('npm', 'express', { cache }); // cache hit
173
198
  ## Supporto per i registri
174
199
 
175
200
  | Registro | Formato del pacchetto | Serie temporali | Dati disponibili |
176
- | ---------- | --------------- | ------------- | ---------------- |
201
+ |----------|---------------|-------------|----------------|
177
202
  | `npm` | `express`, `@scope/pkg` | Sì (549 giorni) | giorno precedente, settimana precedente, mese precedente |
178
203
  | `pypi` | `requests` | Sì (180 giorni) | giorno precedente, settimana precedente, mese precedente, totale |
179
204
  | `nuget` | `Newtonsoft.Json` | No | totale |
@@ -192,7 +217,6 @@ await stats('npm', 'express', { cache }); // cache hit
192
217
  Eseguite come microservizio o integrate nel vostro server:
193
218
 
194
219
  ```bash
195
- # CLI
196
220
  registry-stats serve --port 3000
197
221
  ```
198
222
 
@@ -240,13 +264,53 @@ registerProvider(cargo);
240
264
  await stats('cargo', 'serde');
241
265
  ```
242
266
 
243
- ## Sito web
267
+ ## Struttura del Repository
268
+
269
+ ```
270
+ registry-stats/
271
+ ├── src/ # TypeScript engine (published to npm)
272
+ ├── site/ # Astro dashboard + landing page (deployed to GitHub Pages)
273
+ ├── desktop/ # WinUI 3 desktop app (.NET 10 MAUI)
274
+ └── test/ # Library tests (vitest)
275
+ ```
276
+
277
+ ## Sviluppo
278
+
279
+ ```bash
280
+ # Engine
281
+ npm install && npm run build && npm test
282
+
283
+ # Dashboard (dev server)
284
+ npm run site:dev
285
+
286
+ # Dashboard (production build)
287
+ npm run site:build
288
+ ```
289
+
290
+ ## Sicurezza e ambito dei dati
291
+
292
+ | Aspetto | Dettaglio |
293
+ |--------|--------|
294
+ | **Data touched** | Statistiche di download pubbliche da npm, PyPI, NuGet, VS Code Marketplace, Docker Hub. Cache in memoria (opzionale). |
295
+ | **Data NOT touched** | Nessuna telemetria. Nessuna analisi. Nessun archivio di credenziali. Nessun dato utente. Nessuna scrittura di file. |
296
+ | **Permissions** | Lettura: API pubbliche dei registri tramite HTTPS. Scrittura: solo stdout/stderr. |
297
+ | **Network** | Uscite HTTPS verso le API pubbliche dei registri. Server REST locale opzionale. |
298
+ | **Telemetry** | Nessuno raccolto o inviato. |
299
+
300
+ Consulta [SECURITY.md](SECURITY.md) per la segnalazione di vulnerabilità.
301
+
302
+ ## Tabella di valutazione
244
303
 
245
- Il sito web e la documentazione si trovano nella directory `site/`.
304
+ | Categoria | Punteggio |
305
+ |----------|-------|
306
+ | A. Sicurezza | 10 |
307
+ | B. Gestione degli errori | 10 |
308
+ | C. Documentazione per gli operatori | 10 |
309
+ | D. Igiene della distribuzione | 10 |
310
+ | E. Identità (soft) | 10 |
311
+ | **Overall** | **50/50** |
246
312
 
247
- - Sviluppo: `npm run site:dev`
248
- - Build: `npm run site:build`
249
- - Anteprima: `npm run site:preview`
313
+ > Analisi completa: [SHIP_GATE.md](SHIP_GATE.md) · [SCORECARD.md](SCORECARD.md)
250
314
 
251
315
  ## Licenza
252
316
 
package/README.ja.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="README.md">English</a> | <strong>日本語</strong> | <a href="README.zh.md">中文</a> | <a href="README.es.md">Español</a> | <a href="README.fr.md">Français</a> | <a href="README.hi.md">हिन्दी</a> | <a href="README.it.md">Italiano</a> | <a href="README.pt-BR.md">Português</a>
2
+ <a href="README.md">English</a> | <a href="README.zh.md">中文</a> | <a href="README.es.md">Español</a> | <a href="README.fr.md">Français</a> | <a href="README.hi.md">हिन्दी</a> | <a href="README.it.md">Italiano</a> | <a href="README.pt-BR.md">Português (BR)</a>
3
3
  </p>
4
4
 
5
5
  <p align="center">
@@ -7,31 +7,69 @@
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- One command. Five registries. All your download stats.
10
+ Five registries. One engine. Dashboard included.
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
14
  <a href="https://github.com/mcp-tool-shop-org/registry-stats/actions/workflows/pages.yml"><img src="https://github.com/mcp-tool-shop-org/registry-stats/actions/workflows/pages.yml/badge.svg" alt="CI"></a>
15
15
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
16
16
  <a href="https://www.npmjs.com/package/@mcptoolshop/registry-stats"><img src="https://img.shields.io/npm/v/@mcptoolshop/registry-stats" alt="npm version"></a>
17
+ <a href="https://mcp-tool-shop-org.github.io/registry-stats/dashboard/"><img src="https://img.shields.io/badge/Dashboard-live-green" alt="Dashboard"></a>
17
18
  <a href="https://mcp-tool-shop-org.github.io/registry-stats/"><img src="https://img.shields.io/badge/Landing_Page-live-blue" alt="Landing Page"></a>
18
19
  </p>
19
20
 
20
21
  <p align="center">
21
- <a href="https://mcp-tool-shop-org.github.io/registry-stats/">Docs</a> &middot;
22
+ <a href="#dashboard">Dashboard</a> &middot;
23
+ <a href="#desktop-app">Desktop App</a> &middot;
22
24
  <a href="#install">Install</a> &middot;
23
25
  <a href="#cli">CLI</a> &middot;
24
- <a href="#config-file">Config</a> &middot;
25
26
  <a href="#programmatic-api">API</a> &middot;
26
27
  <a href="#rest-api-server">REST Server</a> &middot;
28
+ <a href="#config-file">Config</a> &middot;
27
29
  <a href="#license">License</a>
28
30
  </p>
29
31
 
30
32
  ---
31
33
 
32
- もし、npm、PyPI、NuGet、VS Code Marketplace、またはDocker Hubに公開している場合、現在、"今月ダウンロード数は何件ですか?"という質問に答えるために、5つの異なるAPIが必要になります。このライブラリは、それらすべてに対して、CLIまたはプログラムAPIとして、単一のインターフェースを提供します。
34
+ npm、PyPI、NuGet、Visual Studio Code MarketplaceDocker Hub などのプラットフォームに公開できます。現在、「私のパッケージの状況はどうなっているか?」を知るには、5つの異なるサイトを確認する必要があります。**registry-stats** は、それらを統合したプラットフォームです。TypeScript で構築されたエンジン(CLI + API + REST サーバー)、リアルタイムの Web ダッシュボード、そしてネイティブの Windows デスクトップ アプリケーション。これらはすべて、1つのリポジトリから提供されます。
35
+
36
+ 実行時の依存関係はありません。ネイティブの `fetch()` を使用します。Node 18 以降が必要です。
37
+
38
+ ## 構成要素
39
+
40
+ | レイヤー | 機能 |
41
+ |-------|-------------|
42
+ | **Engine** | TypeScript ライブラリ + CLI + REST サーバー。1つのインターフェースで、5つのレジストリをクエリできます。npm で `@mcptoolshop/registry-stats` として公開されています。 |
43
+ | **Dashboard** | Astro で構築された Web アプリケーション。AI チャットアシスタント、6つのインタラクティブチャート、スマート成長エンジン、タブ付きヘルプガイド。毎週、CI によって再構築されます。 |
44
+ | **Desktop** | WinUI 3 + WebView2 を使用したネイティブ Windows アプリケーション。ダッシュボードをオフラインで利用できるようにバンドルし、必要に応じてリアルタイムの統計情報を取得します。 |
45
+
46
+ ## ダッシュボード
47
+
48
+ 自己更新型の統計ダッシュボードは、[`/dashboard/`](https://mcp-tool-shop-org.github.io/registry-stats/dashboard/) にあります。
33
49
 
34
- 依存関係はゼロです。ネイティブの`fetch()`を使用します。Node 18以降が必要です。
50
+ - **タブインターフェース** — Home、Analytics、Leaderboard、Help タブ
51
+ - **AI チャットアシスタント** — Ollama を使用した Registry Assistant。RAG コンテキスト注入、ストリーミング応答、モデルセレクター、会話メモリ
52
+ - **エグゼクティブスナップショット** — ヘルススコア(0–100)、多様性インデックス、週次変動、全レジストリの合計ダウンロード数
53
+ - **6つのインタラクティブチャート** — 30日トレンド(合計 / レジストリ別 / トップ5切り替え)、レジストリシェア(ポーラーエリア)、ポートフォリオリスク(分布ヒストグラム + Gini & P90)、トップ10モメンタム、スパークライン付きベロシティトラッカー、30日ヒートマップ(スパイク検出 >2σ)
54
+ - **スマート成長エンジン** — 小さな分母の歪みを処理。ベースライン閾値、パーセンテージキャップ、減衰ベロシティ式
55
+ - **アクション可能なインサイト** — 自動生成された推奨事項と減少パッケージの注意アラート
56
+ - **ランキング** — 全パッケージを週次ダウンロード数でランク付け、30日スパークラインとスマートトレンドバッジ付き
57
+ - **セットアップページ** — ポートフォリオエディター、バリデーション、registry-sync コンパニオンセクション、パイプライン概要
58
+ - **ヘルプタブ** — 各タブ、キーコンセプト、AI アシスタントの使い方、データパイプライン、便利なリンクをカバーする人間に優しいガイド
59
+ - **テーマ** — システム設定に従って、ダークモードまたはライトモードを切り替え。
60
+
61
+ データはビルド時に取得され、毎週 CI によって再構築されます(月曜日 06:00 UTC)。追跡するパッケージは、`site/src/data/packages.json` で設定します。
62
+
63
+ ## デスクトップ アプリケーション
64
+
65
+ ダッシュボードをローカルの WebView2 シェルでラップした、ネイティブの Windows アプリケーションです。
66
+
67
+ - **オフライン対応**:HTML/CSS/JS がバンドルされているため、インターネット接続なしで動作します。
68
+ - **リアルタイム更新**:GitHub Pages から `stats.json` をオンデマンドで取得します。
69
+ - **CSV エクスポート**:ランキングデータをワンクリックで CSV 形式でエクスポートできます。
70
+ - **MSIX パッケージ**:CI で `desktop-ci.yml` を使用してビルドおよび署名されます。
71
+
72
+ デスクトップアプリケーションのソースコードは、`desktop/` にあります。 .NET 10 MAUI を使用して、WinUI 3 をターゲットに構築されています。
35
73
 
36
74
  ## インストール
37
75
 
@@ -52,10 +90,6 @@ registry-stats express
52
90
 
53
91
  # Time series with monthly breakdown + trend
54
92
  registry-stats express -r npm --range 2025-01-01:2025-06-30
55
- # 2025-01 142,359,021
56
- # 2025-02 147,522,528
57
- # ...
58
- # Total: 448,383,383 Avg/day: 4,982,038 Trend: flat (-0.46%)
59
93
 
60
94
  # Raw JSON output
61
95
  registry-stats express -r npm --json
@@ -74,14 +108,6 @@ registry-stats
74
108
 
75
109
  # Compare across registries
76
110
  registry-stats express --compare
77
- # express — comparison
78
- #
79
- # Metric npm pypi
80
- # ─────────────────────────────────
81
- # Total - -
82
- # Month 283,472 47,201
83
- # Week 67,367 11,800
84
- # Day 11,566 1,686
85
111
 
86
112
  # Export as CSV or chart-friendly JSON
87
113
  registry-stats express -r npm --range 2025-01-01:2025-06-30 --format csv
@@ -161,7 +187,6 @@ calc.toChartData(daily, 'express'); // { labels: [...], datasets: [{ labe
161
187
 
162
188
  // Comparison — same package across registries
163
189
  const comparison = await stats.compare('express');
164
- // → { package: 'express', registries: { npm: {...}, pypi: {...} }, fetchedAt: '...' }
165
190
  await stats.compare('express', ['npm', 'pypi']); // specific registries only
166
191
 
167
192
  // Caching (5 min TTL, in-memory)
@@ -173,7 +198,7 @@ await stats('npm', 'express', { cache }); // cache hit
173
198
  ## レジストリのサポート
174
199
 
175
200
  | レジストリ | パッケージ形式 | 時系列データ | 利用可能なデータ |
176
- | ---------- | --------------- | ------------- | ---------------- |
201
+ |----------|---------------|-------------|----------------|
177
202
  | `npm` | `express`, `@scope/pkg` | はい (549日間) | lastDay (直近1日), lastWeek (直近1週間), lastMonth (直近1ヶ月) |
178
203
  | `pypi` | `requests` | はい (180日間) | lastDay (直近1日), lastWeek (直近1週間), lastMonth (直近1ヶ月), total (合計) |
179
204
  | `nuget` | `Newtonsoft.Json` | No | total (合計) |
@@ -192,7 +217,6 @@ await stats('npm', 'express', { cache }); // cache hit
192
217
  マイクロサービスとして実行するか、独自のサーバーに組み込むことができます。
193
218
 
194
219
  ```bash
195
- # CLI
196
220
  registry-stats serve --port 3000
197
221
  ```
198
222
 
@@ -240,13 +264,53 @@ registerProvider(cargo);
240
264
  await stats('cargo', 'serde');
241
265
  ```
242
266
 
243
- ## ウェブサイト
267
+ ## リポジトリの構成
268
+
269
+ ```
270
+ registry-stats/
271
+ ├── src/ # TypeScript engine (published to npm)
272
+ ├── site/ # Astro dashboard + landing page (deployed to GitHub Pages)
273
+ ├── desktop/ # WinUI 3 desktop app (.NET 10 MAUI)
274
+ └── test/ # Library tests (vitest)
275
+ ```
276
+
277
+ ## 開発
278
+
279
+ ```bash
280
+ # Engine
281
+ npm install && npm run build && npm test
282
+
283
+ # Dashboard (dev server)
284
+ npm run site:dev
285
+
286
+ # Dashboard (production build)
287
+ npm run site:build
288
+ ```
289
+
290
+ ## セキュリティとデータ範囲
291
+
292
+ | 側面 | 詳細 |
293
+ |--------|--------|
294
+ | **Data touched** | npm、PyPI、NuGet、Visual Studio Code Marketplace、Docker Hub から取得する公開ダウンロード統計。オプションで、メモリ内キャッシュを使用します。 |
295
+ | **Data NOT touched** | テレメトリー、分析、認証情報の保存、ユーザーデータ、ファイル書き込みは一切行いません。 |
296
+ | **Permissions** | 読み込み:HTTPS を使用した公開レジストリ API。書き込み:標準出力/標準エラー出力のみ。 |
297
+ | **Network** | HTTPS を使用して公開レジストリ API にアクセスします。オプションで、ローカルの REST サーバーを使用します。 |
298
+ | **Telemetry** | 収集または送信されるデータはありません。 |
299
+
300
+ 脆弱性に関する報告については、[SECURITY.md](SECURITY.md) を参照してください。
301
+
302
+ ## スコアカード
244
303
 
245
- ドキュメント/ランディングページは`site/`にあります。
304
+ | カテゴリ | スコア |
305
+ |----------|-------|
306
+ | A. セキュリティ | 10 |
307
+ | B. エラー処理 | 10 |
308
+ | C. 運用ドキュメント | 10 |
309
+ | D. ソフトウェアの品質 | 10 |
310
+ | E. 識別情報(重要度:低) | 10 |
311
+ | **Overall** | **50/50** |
246
312
 
247
- - 開発: `npm run site:dev`
248
- - ビルド: `npm run site:build`
249
- - プレビュー: `npm run site:preview`
313
+ 詳細な監査:[SHIP_GATE.md](SHIP_GATE.md) · [SCORECARD.md](SCORECARD.md)
250
314
 
251
315
  ## ライセンス
252
316
 
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <strong>English</strong> | <a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a> | <a href="README.es.md">Español</a> | <a href="README.fr.md">Français</a> | <a href="README.hi.md">हिन्दी</a> | <a href="README.it.md">Italiano</a> | <a href="README.pt-BR.md">Português</a>
2
+ <a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a> | <a href="README.es.md">Español</a> | <a href="README.fr.md">Français</a> | <a href="README.hi.md">हिन्दी</a> | <a href="README.it.md">Italiano</a> | <a href="README.pt-BR.md">Português (BR)</a>
3
3
  </p>
4
4
 
5
5
  <p align="center">
@@ -7,32 +7,69 @@
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- One command. Five registries. All your download stats.
10
+ Five registries. One engine. Dashboard included.
11
11
  </p>
12
12
 
13
13
  <p align="center">
14
14
  <a href="https://github.com/mcp-tool-shop-org/registry-stats/actions/workflows/pages.yml"><img src="https://github.com/mcp-tool-shop-org/registry-stats/actions/workflows/pages.yml/badge.svg" alt="CI"></a>
15
15
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="MIT License"></a>
16
16
  <a href="https://www.npmjs.com/package/@mcptoolshop/registry-stats"><img src="https://img.shields.io/npm/v/@mcptoolshop/registry-stats" alt="npm version"></a>
17
+ <a href="https://mcp-tool-shop-org.github.io/registry-stats/dashboard/"><img src="https://img.shields.io/badge/Dashboard-live-green" alt="Dashboard"></a>
17
18
  <a href="https://mcp-tool-shop-org.github.io/registry-stats/"><img src="https://img.shields.io/badge/Landing_Page-live-blue" alt="Landing Page"></a>
18
19
  </p>
19
20
 
20
21
  <p align="center">
21
- <a href="https://mcp-tool-shop-org.github.io/registry-stats/">Docs</a> &middot;
22
+ <a href="#dashboard">Dashboard</a> &middot;
23
+ <a href="#desktop-app">Desktop App</a> &middot;
22
24
  <a href="#install">Install</a> &middot;
23
25
  <a href="#cli">CLI</a> &middot;
24
- <a href="#config-file">Config</a> &middot;
25
26
  <a href="#programmatic-api">API</a> &middot;
26
27
  <a href="#rest-api-server">REST Server</a> &middot;
27
- <a href="#dashboard">Dashboard</a> &middot;
28
+ <a href="#config-file">Config</a> &middot;
28
29
  <a href="#license">License</a>
29
30
  </p>
30
31
 
31
32
  ---
32
33
 
33
- If you publish to npm, PyPI, NuGet, VS Code Marketplace, or Docker Hub, you currently need five different APIs to answer "how many downloads did I get this month?" This library gives you one interface for all of them as a CLI or programmatic API.
34
+ You publish to npm, PyPI, NuGet, the VS Code Marketplace, and Docker Hub. Right now, answering "how are my packages doing?" means checking five different sites. **registry-stats** is the complete platform: a TypeScript engine (CLI + API + REST server), a live web dashboard, and a native Windows desktop app all from one repo.
35
+
36
+ Zero runtime dependencies. Uses native `fetch()`. Node 18+.
37
+
38
+ ## What's inside
39
+
40
+ | Layer | What it does |
41
+ |-------|-------------|
42
+ | **Engine** | TypeScript library + CLI + REST server. Query five registries with one interface. Published to npm as `@mcptoolshop/registry-stats`. |
43
+ | **Dashboard** | Astro-powered web app with AI chat assistant, six interactive charts, smart growth engine, and tabbed Help guide. Rebuilt weekly by CI. |
44
+ | **Desktop** | WinUI 3 + WebView2 native Windows app. Bundles the dashboard offline, fetches live stats on demand. |
45
+
46
+ ## Dashboard
47
+
48
+ A self-updating stats dashboard lives at [`/dashboard/`](https://mcp-tool-shop-org.github.io/registry-stats/dashboard/).
49
+
50
+ - **Tabbed interface** — Home, Analytics, Leaderboard, and Help tabs
51
+ - **AI chat assistant** — Ollama-powered Registry Assistant with RAG context, streaming responses, model selector, and conversation memory
52
+ - **Executive snapshot** — health score (0–100), diversity index, weekly change, total downloads across all registries
53
+ - **Six interactive charts** — 30-day trend (aggregate / per-registry / top-5 toggles), registry share (polar area), portfolio risk (histogram + Gini & P90), top-10 momentum, velocity tracker with sparklines, and 30-day heatmap with spike detection (>2σ)
54
+ - **Smart growth engine** — handles small-denominator distortion with baseline threshold, percentage cap, and damped velocity formula
55
+ - **Actionable insights** — auto-generated recommendations and attention alerts for declining packages
56
+ - **Leaderboard** — all packages ranked by weekly downloads with inline 30-day sparklines and smart trend badges
57
+ - **Setup page** — portfolio editor with validation, registry-sync companion section, and pipeline overview
58
+ - **Help tab** — human-friendly guide covering every tab, key concepts, AI assistant tips, data pipeline, and useful links
59
+ - **Dark / light theme** — follows system preference
34
60
 
35
- Zero dependencies. Uses native `fetch()`. Node 18+.
61
+ Data is fetched at build time and rebuilt weekly by CI (Mondays 06:00 UTC). Configure tracked packages in `site/src/data/packages.json`.
62
+
63
+ ## Desktop App
64
+
65
+ A native Windows app that wraps the dashboard in a local WebView2 shell:
66
+
67
+ - **Offline-capable** — ships bundled HTML/CSS/JS; works without internet
68
+ - **Live refresh** — fetches `stats.json` from GitHub Pages on demand
69
+ - **CSV export** — export leaderboard data with one click
70
+ - **MSIX packaged** — built and signed in CI via `desktop-ci.yml`
71
+
72
+ The desktop source lives in `desktop/`. Built with .NET 10 MAUI targeting WinUI 3.
36
73
 
37
74
  ## Install
38
75
 
@@ -53,10 +90,6 @@ registry-stats express
53
90
 
54
91
  # Time series with monthly breakdown + trend
55
92
  registry-stats express -r npm --range 2025-01-01:2025-06-30
56
- # 2025-01 142,359,021
57
- # 2025-02 147,522,528
58
- # ...
59
- # Total: 448,383,383 Avg/day: 4,982,038 Trend: flat (-0.46%)
60
93
 
61
94
  # Raw JSON output
62
95
  registry-stats express -r npm --json
@@ -75,14 +108,6 @@ registry-stats
75
108
 
76
109
  # Compare across registries
77
110
  registry-stats express --compare
78
- # express — comparison
79
- #
80
- # Metric npm pypi
81
- # ─────────────────────────────────
82
- # Total - -
83
- # Month 283,472 47,201
84
- # Week 67,367 11,800
85
- # Day 11,566 1,686
86
111
 
87
112
  # Export as CSV or chart-friendly JSON
88
113
  registry-stats express -r npm --range 2025-01-01:2025-06-30 --format csv
@@ -162,7 +187,6 @@ calc.toChartData(daily, 'express'); // { labels: [...], datasets: [{ labe
162
187
 
163
188
  // Comparison — same package across registries
164
189
  const comparison = await stats.compare('express');
165
- // → { package: 'express', registries: { npm: {...}, pypi: {...} }, fetchedAt: '...' }
166
190
  await stats.compare('express', ['npm', 'pypi']); // specific registries only
167
191
 
168
192
  // Caching (5 min TTL, in-memory)
@@ -193,7 +217,6 @@ await stats('npm', 'express', { cache }); // cache hit
193
217
  Run as a microservice or embed in your own server:
194
218
 
195
219
  ```bash
196
- # CLI
197
220
  registry-stats serve --port 3000
198
221
  ```
199
222
 
@@ -241,25 +264,28 @@ registerProvider(cargo);
241
264
  await stats('cargo', 'serde');
242
265
  ```
243
266
 
244
- ## Dashboard
245
-
246
- A self-updating stats dashboard ships with the library at [`/dashboard/`](https://mcp-tool-shop-org.github.io/registry-stats/dashboard/).
267
+ ## Repo Structure
247
268
 
248
- - **Executive snapshot** — one-sentence weekly narrative (top registry, top package, top gainer, concentration, data confidence)
249
- - **Growth Pulse** — top gainers, decliners, and newly active packages (npm 7d vs prior 7d)
250
- - **Data Health** per-registry coverage, confidence badges, expandable error details
251
- - **Breakdown** per-registry bars and 30-day aggregate sparkline
252
- - **Leaderboard** all packages ranked by weekly downloads with per-row 30d sparklines
269
+ ```
270
+ registry-stats/
271
+ ├── src/ # TypeScript engine (published to npm)
272
+ ├── site/ # Astro dashboard + landing page (deployed to GitHub Pages)
273
+ ├── desktop/ # WinUI 3 desktop app (.NET 10 MAUI)
274
+ └── test/ # Library tests (vitest)
275
+ ```
253
276
 
254
- Data is fetched at build time via `npm run fetch-stats` and rebuilt weekly by CI (Mondays 06:00 UTC). Dark and light themes supported.
277
+ ## Development
255
278
 
256
- ## Website
279
+ ```bash
280
+ # Engine
281
+ npm install && npm run build && npm test
257
282
 
258
- Docs / landing page lives in `site/`.
283
+ # Dashboard (dev server)
284
+ npm run site:dev
259
285
 
260
- - Dev: `npm run site:dev`
261
- - Build: `npm run site:build`
262
- - Preview: `npm run site:preview`
286
+ # Dashboard (production build)
287
+ npm run site:build
288
+ ```
263
289
 
264
290
  ## Security & Data Scope
265
291