Design system migration reporting for MetaMask.
Primary outputs:
- Dashboard (historical trends and latest status)
- Slack report (weekly update summary)
This repository is an internal reporting pipeline.
- Primary Product Features
- Project Architecture
- Maintainer Workflow
- Dashboard
- Slack Report
- Data Outputs
- Configuration
- Requirements
A React dashboard (dashboard/) that visualizes MMDS alignment (Figma / React / React Native) plus migration progress over time for Mobile and Extension using generated JSON in metrics/.
Current dashboard scope includes:
- MMDS platform alignment (default)
- Latest migration KPIs
- 6-month trend charts
- MMDS vs deprecated instance trends
- MMDS component availability and new-component deltas
- Code owner adoption charts
A generated weekly markdown report used for stakeholder updates.
It summarizes:
- MMDS component availability
- Migration progress by project
- Week-over-week changes
- Links to detailed artifacts
This repository tracks migration from legacy components to MMDS across:
repos/metamask-extensionrepos/metamask-mobile
With MMDS component definitions sourced from:
repos/metamask-design-system
Core implementation files:
index.js: canonical scanner + generator (.xlsx,-summary.json,-data.json)config.json: tracked component mappingsscripts/sync-config.js: updatesconfig.jsonfrom submodulesscripts/update-timeline.js: rebuildsmetrics/timeline.json+metrics/index.jsonscripts/validate-metrics-consistency.js: consistency checks across generated artifactsscripts/generate-slack-report.js: weekly Slack markdown outputconfig/alignment-exceptions.json: intentional platform-specific families (Modal/BottomSheet, Popover, helpers)scripts/lib/alignment-inventory.js: MMDS package inventory + Code Connect classificationscripts/discover-alignment.js: writesmetrics/alignment-*.jsonandmetrics/alignment-timeline.json
The Alignment tab measures MMDS itself: whether a component exists on React and
React Native with the same name, plus Code Connect coverage. Figma is marked
linked when a .figma.tsx file points at a Figma node; otherwise unknown.
Unknown is not a gap, and linked is not a live library confirmation.
Default: every component is required on both code platforms. A small exception
list in config/alignment-exceptions.json names intentional platform families
(Modal vs BottomSheet, Popover) and helpers to exclude.
Output: metrics/alignment-latest.json and metrics/alignment-timeline.json.
Use this sequence locally to match CI behavior:
yarn install
yarn setup-repos
yarn pipeline
yarn slack-report --output metrics/slack-report-YYYY-MM-DD.md
cd dashboard && npm ci && npm run buildyarn pipeline runs the full weekly sequence: config sync, extension/mobile scans, one-off discovery, untracked timeline rebuild (adoption trends + per-team replaceable history), MMDS platform alignment inventory, migration timeline/index update, validation, and dashboard metrics copy.
Manual stage breakdown (debugging only):
yarn sync-config
yarn start
yarn start:mobile
yarn discover:extension
yarn discover:mobile
yarn update-untracked-timeline
yarn discover-alignment
yarn update-timeline
yarn validate-metrics
cp metrics/*.json dashboard/public/metrics/If generating for a historical date, set METRICS_DATE=YYYY-MM-DD when running yarn pipeline (or individual scan/discover steps).
CI workflows:
.github/workflows/weekly-metrics.yml- Fridays 15:00 UTC or manual
workflow_dispatch; opens a PR tomain(org rules). UK: 16:00 London in BST, 15:00 in GMT. US Pacific ≈ 8:00 PDT / 7:00 PST. - updates submodules/config, regenerates metrics, updates timeline/index, validates data, generates Slack output, and rebuilds dashboard assets
- Fridays 15:00 UTC or manual
.github/workflows/deploy-dashboard.yml- deploys dashboard to GitHub Pages when dashboard or metrics JSON changes on
main(merge the weekly metrics PR to publish)
- deploys dashboard to GitHub Pages when dashboard or metrics JSON changes on
Location:
- Source:
dashboard/src/* - Data input:
dashboard/public/metrics/*
Run locally:
cp metrics/*.json dashboard/public/metrics/
cd dashboard
npm ci
npm run devProduction build:
cd dashboard
npm run buildGenerate:
yarn slack-report
yarn slack-report --output metrics/slack-report-YYYY-MM-DD.mdThe script reads the latest files via metrics/index.json and related *-summary.json data.
Generated in metrics/:
extension-component-metrics-YYYY-MM-DD.xlsxmobile-component-metrics-YYYY-MM-DD.xlsxextension-component-metrics-YYYY-MM-DD-summary.jsonmobile-component-metrics-YYYY-MM-DD-summary.jsonextension-component-metrics-YYYY-MM-DD-data.jsonmobile-component-metrics-YYYY-MM-DD-data.jsontimeline.jsonindex.jsonalignment-YYYY-MM-DD.json(+alignment-latest.json)alignment-timeline.jsonslack-report-YYYY-MM-DD.md
Notes:
index.jsis the canonical generator for XLSX + summary/data JSON.scripts/xlsx-to-json.jsis retained mainly for repair/backfill workflows.
The tool uses config.json project entries with:
filePattern,ignoreFolders,outputFilecurrentPackages,currentComponentscodeOwnerMetricIgnoreGlobs(optional): array of globs to exclude from code owner adoption metrics only (does not affect overall component counts). Useful for ignoring legacy or soon-to-be-deprecated areas from team adoption charts.deprecatedComponentsmappings:paths: import paths to matchreplacement: MMDS target ornull
Keep config in sync with codebases:
yarn sync-config
yarn sync-config:dry-run
yarn sync-config:skip-updateManual overrides are preserved when _autoGenerated: false is set on a component entry.
- Node.js 20+ recommended (CI uses Node 20)
- Yarn 4.x for root scripts
- npm for dashboard scripts (
dashboard/package.json)
If you change generation logic or data contracts:
- Regenerate outputs (
yarn start,yarn start:mobile) - Rebuild timeline/index (
yarn update-timeline) - Validate consistency (
yarn validate-metrics) - Rebuild dashboard (
cd dashboard && npm run build)
This project is licensed under the MIT License.