layerlens
3.1.0, released 3 months ago by flutter-chat.dev
Generate Mermaid dependency diagrams and detect cycles in every source code folder.
What it does
LayerLens operates on file system concepts to generate a Mermaid flowchart dependency diagram inside every directory of a Dart or Flutter package. It also identifies and alerts you to any cyclic dependencies or changed diagrams.
AI-written summary of version 3.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to visualize file and directory level dependencies within your Dart or Flutter project.
- You need to detect cyclic dependencies and enforce architectural rules in CI/CD pipelines.
- You want automatic DEPS.md documentation generated for every folder in your source code.
Skip it when
- You need to visualize cross-package dependencies rather than inside-package ones.
- You are using a programming language other than Dart.
Strengths
- Operates on file system concepts reflecting mental models of the project.
- Detects cyclic dependencies and supports CI/CD failure flags.
- Supports multiple layout engines like dagre and elk.
Weaknesses
- Currently only supports Dart projects.
- Requires manual preview tools or extensions in IDEs to render Mermaid diagrams.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 6
Can be activated globally via pub or added as a dev_dependency in pubspec.yaml and run via dart run layerlens.
dart run layerlensWorks with
Packages commonly used together with layerlens: ones it builds on, ones built on it, and its own family.
- analyzerlayerlens depends on itPerforms static analysis of Dart code for tool integration and embedding.
- globlayerlens depends on itA file and directory globbing library that supports Bash-style path matching and listing.
- platformlayerlens depends on itCross‑platform abstraction for querying runtime platform info in Dart.
- argslayerlens depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.