How seemirra/backstage-plugin-lazy-catalog works
Lazy Catalog is a Backstage extension with two ways to apply shared catalog rules: enrich entities during catalog processing, or rewrite catalog descriptors through a scaffolder action. Its rules engine loads and matches rules, then applies field changes; the processor can also generate fallback TechDocs files when a project lacks documentation. The README documents these capabilities, while sampled source confirms key registrations and calls. The app is a runnable testbed, not part of the extension’s core runtime map.
Main entry points: LazyCatalogProcessor.ts Entity processor · writeCatalogInfo.ts Descriptor write action · apply.ts Rule application · write.ts Fallback docs writer
Components 15
Catalog enrichment
- Catalog module
plugins/catalog-backend-module-lazy-catalog/src/module.ts - Entity processor
plugins/catalog-backend-module-lazy-catalog/src/processor/LazyCatalogProcessor.ts
Shared rules engine
- Rules file
lazy-catalog.yaml - Rules loader
plugins/lazy-catalog-common/src/rules/loadRules.ts - Entity matching
plugins/lazy-catalog-common/src/rules/match.ts - Rule application
plugins/lazy-catalog-common/src/rules/apply.ts - Field paths
plugins/lazy-catalog-common/src/rules/path.ts - Source directory
plugins/lazy-catalog-common/src/rules/sourceDir.ts
Descriptor write-back
- Scaffolder module
plugins/scaffolder-backend-module-lazy-catalog/src/module.ts - Descriptor write action
plugins/scaffolder-backend-module-lazy-catalog/src/actions/writeCatalogInfo.ts
Fallback TechDocs
- Fallback docs writer
plugins/lazy-catalog-common/src/fallbackDocs/write.ts - Fallback templates
plugins/lazy-catalog-common/src/fallbackDocs/templates.ts
Other components
- Catalog processing
- Scaffolder task
- TechDocs
Connections 17
- Catalog processing → Catalog module: registers module
README.md - Catalog module → Entity processor: registers processor
plugins/catalog-backend-module-lazy-catalog/src/module.ts - Entity processor → Rules loader: loads rules
plugins/catalog-backend-module-lazy-catalog/src/processor/LazyCatalogProcessor.ts - Rules file → Rules loader: provides rules
README.md - Entity processor → Rule application: applies rules
plugins/catalog-backend-module-lazy-catalog/src/processor/LazyCatalogProcessor.ts - Rule application → Entity matching: checks matches
plugins/lazy-catalog-common/src/rules/apply.ts - Rule application → Field paths: reads fields
plugins/lazy-catalog-common/src/rules/apply.ts - Entity matching → Field paths: checks fields
plugins/lazy-catalog-common/src/rules/match.ts - Entity processor → Source directory: resolves source
plugins/catalog-backend-module-lazy-catalog/src/processor/LazyCatalogProcessor.ts - Scaffolder task → Scaffolder module: registers module
README.md - Scaffolder module → Descriptor write action: registers action
plugins/scaffolder-backend-module-lazy-catalog/src/module.ts - Descriptor write action → Rules loader: loads rules
plugins/scaffolder-backend-module-lazy-catalog/src/actions/writeCatalogInfo.ts - Descriptor write action → Rule application: rewrites fields
plugins/scaffolder-backend-module-lazy-catalog/src/actions/writeCatalogInfo.ts - Descriptor write action → Field paths: sets fields
plugins/scaffolder-backend-module-lazy-catalog/src/actions/writeCatalogInfo.ts - Entity processor → Fallback docs writer: ensures docs
plugins/catalog-backend-module-lazy-catalog/src/processor/LazyCatalogProcessor.ts - Fallback docs writer → Fallback templates: renders files
plugins/lazy-catalog-common/src/fallbackDocs/write.ts - TechDocs → Fallback docs writer: reads generated docs