Welcome! This document bundles the day-to-day tasks contributors perform when working on the MagicMirror² module list. Use it as the single stop for local setup, pipeline execution, and schema validation.
- Node.js: Current Node.js version (LTS or later) is required.
- Git: Ensure Git is installed and available in your path.
Clone the repository and install dependencies:
git clone https://github.com/MagicMirrorOrg/MagicMirror-3rd-Party-Modules.git
cd MagicMirror-3rd-Party-Modules
npm installUse the canonical helper scripts from package.json or call the orchestrator directly:
| Scope | Command | Purpose |
|---|---|---|
| Metadata only | node --run collectMetadata |
Fetch the upstream wiki list and refresh repository metadata cache plus in-memory enrichment payload. |
| Full canonical run | node --run all |
Execute full-refresh-parallel end-to-end. |
| Inspect the pipeline | node --run pipeline -- list / describe / logs |
Inspect the registered stages, pipelines, and recent run records. |
| Re-run processing+publish | node scripts/orchestrator/index.ts run full-refresh-parallel --only=parallel-processing,aggregate-catalogue |
Re-run worker analysis and publication without re-running markdown parsing manually. |
The parallel-processing stage is the expensive part of the run: it clones repositories, extracts metadata and screenshots, and performs the deeper checks that produce the stage-5 payload in memory. The follow-up aggregate-catalogue stage turns that payload into modules.json, modules.min.json, and stats.json.
The orchestrator CLI (node --run pipeline or node scripts/orchestrator/index.ts) bundles the stage graph, structured logging, and DX helpers like list, describe, logs, and doctor. Use it to:
- Execute the full pipeline with
node scripts/orchestrator/index.ts run full-refresh-parallel. - Target supported stages with
node scripts/orchestrator/index.ts run full-refresh-parallel --only=collect-metadata,--only=parallel-processing, or--only=aggregate-catalogue. - Inspect the available stages with
list/describeor review artifacts vialogs. - Output machine-readable logs with
--json-logsfor integration with other tools.
Check the orchestrator CLI reference for detailed usage examples, command options, and troubleshooting tips.
- Refresh metadata only: Use
node scripts/orchestrator/index.ts run full-refresh-parallel --only=collect-metadatawhen you only need to refresh source parsing and repository metadata cache. - Focus on one stage: Use
--only=<stage-id>to run a single stage in isolation. For example,node scripts/orchestrator/index.ts run full-refresh-parallel --only=collect-metadata. - Debug a small source list: Set
WIKI_FILE=path/to/3rd-Party-Modules.mdand runnode --run allto use a local wiki-formatted module list instead of the upstream page. - Check logs: If a run fails, use
node scripts/orchestrator/index.ts logsto list recent runs, andnode scripts/orchestrator/index.ts logs <run-file>to view details.
Reads the official wiki list of third-party modules and fetches metadata (stars, topics, default branch, etc.) from the hosting service (GitHub/GitLab). The stage returns an in-memory enriched payload for downstream stages and updates the API cache on disk.
Combines repository cloning, package.json enrichment, screenshot extraction, and deep analysis inside the worker pool. The stage emits the analysis payload in memory.
Consumes the stage-5 payload and writes the published catalogue outputs (modules.json, modules.min.json, stats.json).
Validates the published catalogue (modules.json, modules.min.json, stats.json) against the JSON Schemas. The command is wired into release packaging and must pass before publishing.
For focused manual runs, point the pipeline at a small local wiki snapshot instead of the full upstream page:
- Copy
website/test/3rd-Party-Modules.mdor prepare your own markdown file in the same table format as the upstream MagicMirror wiki page. - Run
WIKI_FILE=path/to/3rd-Party-Modules.md node --run all. - Inspect the generated files under
website/data/just like a full run.
For regression testing, prefer the curated fixtures (node --run fixtures:generate, node --run test:fixtures, node --run golden:check) over ad-hoc subsets.
As of September 2025, schema validation is part of the release gate. After you regenerate the website data, run:
node --run release:validateThe command checks the published artifacts (modules.json, modules.min.json, stats.json).
ℹ️ CI gate: The same validation now runs automatically in GitHub Actions (
release-validation.yml) on every push and pull request targetingmain. Keep the command in your local workflow to catch schema regressions before CI fails.
This script powers the validation command above. Keep it in your release checklist—CI will block merges once the GitHub Action lands, and the CLI already fails the automated packaging run if validation breaks.
- Regenerate the curated fixtures to ensure the schemas match the current expectations:
node --run fixtures:generate node --run test:fixtures
- Re-run the affected pipeline stages (or
node --run all) to rebuild the real datasets. - Execute
node --run release:validateagain. Keep iterating until the exit code is zero.
Document regressions or schema updates in docs/architecture.md and docs/pipeline/orchestrator-cli-reference.md. For tricky cases, open an Issue so downstream consumers are aware of the contract change.
Schema sources live under pipeline/schemas/src/ (with reusable fragments in pipeline/schemas/partials/). After editing them, regenerate the bundled artifacts that power validation:
npm run schemas:buildTo verify that no additional changes are pending, run:
npm run schemas:checkThe bundled files live in dist/schemas/. They ship with the repository so node --run release:validate can run without extra setup.
- Install Node.js.
- Clone the repository:
git clone https://github.com/MagicMirrorOrg/MagicMirror-3rd-Party-Modules cd MagicMirror-3rd-Party-Modules npm install - Optional: Launch the task menu with
npm startor runnode --run allto execute every stage sequentially (note: takes >10 minutes and >2 GB disk when cloning the full catalogue).
To preview the published website bundle without running the full pipeline, use the prebuilt container image:
docker run --rm -p 8080:8080 ghcr.io/magicmirrororg/magicmirror-3rd-party-modules:mainThen open http://localhost:8080 in a browser.
Run all tests with:
npm testThe shared utilities in scripts/shared/ have unit tests using Node.js's built-in test runner. Run them with:
npm run test:unitThese tests verify core functionality like logging, rate limiting, and HTTP client behavior. When adding new utilities or modifying existing ones, update the tests in scripts/shared/__tests__/.
The project enforces code quality through ESLint and Prettier:
npm run lint # Check all files
npm run lint:fix # Auto-fix issuesTypeScript files are included in ESLint checks via typescript-eslint v8+. Production scripts
are .ts format with type safety enforced via npm run test:types.
Spelling is checked with cspell:
npm run test:spellingGolden artifacts are reference outputs stored in fixtures/golden/ that serve as snapshots for regression testing. They ensure pipeline changes don't accidentally alter outputs.
Workflow when modifying pipeline code:
-
Run tests:
npm run golden:check- ✅ Pass: Your changes didn't affect outputs
- ❌ Fail: Outputs changed - review required
-
Review changes:
git diff fixtures/golden/- Are these changes expected and intentional?
- Do they match your code changes?
-
Update golden files (only if changes are intentional):
npm run golden:update- Updates reference outputs to match new behavior
- Creates new baseline for future tests
-
Commit: Include golden files in your commit
- Documents expected behavior change
- Future tests compare against your new baseline
When to update golden artifacts:
- Stage schemas change (added/removed fields)
- Error handling improvements (e.g., new error categories)
- Sorting or formatting changes (e.g., deterministic outputs)
- Bug fixes that alter output structure
- New pipeline features that affect final artifacts
What they test:
- Pipeline produces consistent outputs for the same inputs
- No accidental regressions in data structure or content
- Contract changes are explicit and reviewable in PRs
docs/architecture.md– current vs. target pipeline topology.docs/pipeline/orchestrator-cli-reference.md– command reference for partial runs, diagnostics, and logs.fixtures/README.md– curated dataset and validation troubleshooting.docs/pipeline/orchestrator-cli-reference.md– current CLI and schema validation flow.docs/open-items.md– central list of active cross-doc follow-up work.
Linting Errors
The project enforces strict linting rules. If your build fails due to linting:
- Run
npm run lint:fixto automatically fix formatting and simple errors. - Manually resolve any remaining issues reported by the linter.
Schema Validation Failures
If node --run release:validate fails:
- Check the error message to identify which file violates the schema.
- If you modified the schema, regenerate fixtures:
node --run fixtures:generate. - If you modified code that generates data, ensure the output matches the schema definitions in
pipeline/schemas/.
Rate Limiting
The pipeline makes many requests to GitHub/GitLab. If you hit rate limits:
- Ensure you have a valid
GITHUB_TOKENin your environment (though the pipeline tries to work without one, a token significantly increases limits). - The built-in rate limiter handles backoff automatically, but extreme usage might still trigger temporary bans. Wait a few minutes and try again.