mumei-dashboard 0.4.4 → 0.5.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.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Local realtime dashboard for [mumei](../README.md). Watches `.mumei/` in
4
4
  your project and renders a browser UI showing feature phases, Wave
5
- progress, review verdicts, token cost, and hook firing trends.
5
+ progress, review verdicts, token cost, and hook activity.
6
6
 
7
7
  ## Run from your project
8
8
 
@@ -12,8 +12,7 @@ npx mumei-dashboard
12
12
  ```
13
13
 
14
14
  The dashboard binds to `http://127.0.0.1:3001` for the API and watches
15
- `./.mumei/` relative to your current working directory. Open Vite's
16
- preview at `http://localhost:5173` during development.
15
+ `./.mumei/` relative to your current working directory.
17
16
 
18
17
  ## Local development (mumei monorepo)
19
18
 
@@ -25,7 +24,8 @@ npm run dev # spawns Fastify (server) + Vite (frontend)
25
24
  ```
26
25
 
27
26
  `npm run dev` runs both processes via `concurrently`. Vite proxies
28
- `/api` and `/events` to the Fastify server.
27
+ `/api` and `/events` to the Fastify server and serves the UI at
28
+ `http://localhost:5173`.
29
29
 
30
30
  ## Scripts
31
31
 
@@ -38,46 +38,6 @@ npm run dev # spawns Fastify (server) + Vite (frontend)
38
38
  | `npm test` | Vitest |
39
39
  | `npm run lint` | Biome `check --error-on-warnings` |
40
40
 
41
- ## Architecture
42
-
43
- ```text
44
- dashboard/
45
- ├── bin/
46
- │ └── mumei-dashboard.mjs # `npx mumei-dashboard` entry
47
- ├── server/ # Fastify backend
48
- │ ├── index.ts # routes + SSE + chokidar watcher
49
- │ ├── features.ts # /api/features summary builder
50
- │ ├── meta.ts # /api/meta + /api/meta/stats (TopBar)
51
- │ ├── trends.ts # /api/trends/{tokens,reviews,hooks}
52
- │ ├── detail.ts # /api/feature/:slug/detail (DetailPanel)
53
- │ ├── activity.ts # /api/activity (ActivityFeed)
54
- │ ├── sse.ts # /api/events (SSE multiplex, 200ms debounce)
55
- │ └── lib/ # path / aggregator / tasks-bridge / fs-watch
56
- ├── src/ # Vite + React 19 frontend
57
- │ ├── App.tsx # placeholder layout (replace with Claude Design output)
58
- │ ├── main.tsx # TanStack Query provider mount
59
- │ ├── hooks/
60
- │ │ └── useEventStream.ts # SSE subscription
61
- │ ├── components/ # shadcn/ui components land here
62
- │ ├── lib/utils.ts # cn() classname merger
63
- │ ├── types/ # generated from ../schemas/ (do NOT edit by hand)
64
- │ └── index.css # Tailwind v4 + shadcn theme tokens
65
- ├── components.json # shadcn/ui config (new-york, zinc base)
66
- ├── tsconfig*.json # project references (app + node)
67
- ├── vite.config.ts # Tailwind v4 plugin + dev proxy
68
- └── package.json
69
- ```
70
-
71
- ## Tech stack (May 2026 verified)
72
-
73
- - **Vite 5** + **React 19** + TypeScript
74
- - **Tailwind CSS v4** via `@tailwindcss/vite` (no PostCSS config)
75
- - **shadcn/ui** new-york style, zinc base, cssVariables
76
- - **TanStack Query v5** for fetching
77
- - **Fastify v5** + **chokidar v5** (ESM-only) for backend
78
- - **SSE** (plain HTTP, no plugin) for one-way realtime
79
- - **Recharts** for trend graphs
80
-
81
41
  ## Configuration
82
42
 
83
43
  | Env var | Default | Effect |
@@ -86,22 +46,22 @@ dashboard/
86
46
  | `MUMEI_DASHBOARD_LOG_LEVEL` | `info` | Pino log level |
87
47
  | `MUMEI_DASHBOARD_CORS_ORIGINS` | `http://localhost:5173` | Comma-separated allowlist of origins permitted for `/api/*` and `/api/events` |
88
48
 
89
- ### REST endpoints
90
-
91
- | Path | Purpose |
92
- | ------------------------------ | ---------------------------------------------------------------------------------- |
93
- | `GET /api/meta` | Project label (home-relative path) |
94
- | `GET /api/meta/stats` | TopBar counters: active count, month tokens, cache hit rate, hooks/sec, 24h events |
95
- | `GET /api/features` | FeatureSummary[] from `.mumei/specs/` + `.mumei/plans/` |
96
- | `GET /api/trends/tokens` | Daily token totals, `?days=N` window (default 14) |
97
- | `GET /api/trends/reviews` | Daily verdict counts (PASS/NEEDS_IMPROVEMENT/MAJOR_ISSUES), `?days=N` window |
98
- | `GET /api/trends/hooks` | Top-N hook firings, `?topN=N&windowH=H` (defaults 10/24) |
99
- | `GET /api/feature/:slug/detail`| FeatureDetail (timeline / acs / waveplan / reviews / costPerIter) |
100
- | `GET /api/activity` | Activity events (commit/review/phase/hook), `?limit=N` (default 50) |
101
- | `GET /api/feature/:slug/:doc` | Read-only Markdown: requirements / design / tasks |
102
- | `GET /api/cost?feature=<slug>` | Aggregate cost-log via `scripts/aggregate-cost.sh --json` |
103
- | `GET /api/hook-stats` | Aggregate hook stats via `scripts/aggregate-hook-stats.sh --json` |
104
- | `GET /events` | Server-Sent Events: `feature.update`, `cost.updated`, `activity.added` |
49
+ ## REST endpoints
50
+
51
+ | Path | Purpose |
52
+ | ------------------------------ | ---------------------------------------------------------------------------- |
53
+ | `GET /api/meta` | Project label (home-relative path) |
54
+ | `GET /api/meta/stats` | Hero counters (active, month tokens, cache hit, hooks/sec, 24h) |
55
+ | `GET /api/features` | FeatureSummary[] from `.mumei/specs/` + `.mumei/plans/` |
56
+ | `GET /api/trends/tokens` | Daily token totals, `?days=N` window (default 14) |
57
+ | `GET /api/trends/reviews` | Daily verdict counts (PASS/NEEDS_IMPROVEMENT/MAJOR_ISSUES), `?days=N` window |
58
+ | `GET /api/trends/hooks` | Top-N hook firings, `?topN=N&windowH=H` (defaults 10/24) |
59
+ | `GET /api/feature/:slug/detail`| FeatureDetail (timeline / acs / waveplan / reviews / costPerIter) |
60
+ | `GET /api/activity` | Activity events (commit/review/phase/hook), `?limit=N` (default 50) |
61
+ | `GET /api/feature/:slug/:doc` | Read-only Markdown: requirements / design / tasks |
62
+ | `GET /api/cost?feature=<slug>` | Aggregate cost-log via `scripts/aggregate-cost.sh --json` |
63
+ | `GET /api/hook-stats` | Aggregate hook stats via `scripts/aggregate-hook-stats.sh --json` |
64
+ | `GET /events` | Server-Sent Events: `feature.update`, `cost.updated`, `activity.added` |
105
65
 
106
66
  ## Distribution
107
67