Brew a graph of your client-side codebase using Madge & Neo4j.
Read a Tutorial on Medium.
How it works:
- [Optional] Run
docker-compose up
to start Neo4j instance- Predefined user/password:
neo4j
/barista
- You can use any Neo4j instance instead
- Predefined user/password:
- Run
yarn install
- Run
yarn barista
- Wait... graph is brewing... done!
- [Optional] Use local Neo4j Browser to explore your graph
- You can use any Neo4j tool for graph analysis
Nodes:
(:Folder)
(:File)
Relationships:
(:Folder)-[:IN]->(:Folder)
(:File)-[:FROM]->(:Folder)
(:File)-[:DEPENDS_ON]->(:File)
/cypher folder contains a collection of useful queries:
- Common folder consumers as folders: common-usage-folders.cql
- Common folder consumers: common-usage.cql
- Detect dependencies from the outside: strict-module-dependency.cql
- Detect n-deep dependencies from the outside: strict-module-n-deep-dependencies.cql
- Find outside dependency for subject, and then find other consumers of same dependency: subject-dependency-consumer.cql
Categories to work on:
- Enrich result graph with new nodes and relationships
- Change the logic of application
- Add more useful Cypher queries
- Improve documentation