This repository contains a script to analyze the directory structure of a Flutter project and generate a visualization in the DOT format.
Ensure the following utilities are installed on your system:
dot(part of Graphviz)dcm
You can install dot (Graphviz) using Homebrew on macOS:
brew install graphvizdcm should be installed according to its documentation.
- Clone the repository:
- Make the scripts executable:
chmod +x project_structure.sh
chmod +x common_analysis.sh- Run the script:
./common_analysis.sh /path/to/project/libThis script will:
- Check for the presence of the required utilities
dotanddcm. - Analyze the directory structure of your Flutter project's
libdirectory. - Generate a SVG file representing the directory structure with highlighted directories.
- Add all artifacts of analysis to single archive.
The script highlights specific directories in the visualization:
features: lightblueutil: lightgreenassets: lightyellowapplication: lightcoraldata: lightpinkdomain: lightgoldenrodyellowcommon: lightgraypresentation: lightsalmonwidgets: lightsteelblue
The script will remove the following old artifacts before generating new ones:
- Directories:
analyze_widgets,metrics,code_quality - Files:
analyze.json,structure.png,project_structure.dot,project_structure.svg