This tool is meant to help people which are working with elixir Commanded apps. The solution isn't some silver bullet and is based on as simple (and silly) solution as was possible to quickly get some satisfying result related to projects I am working with.
I was build this tool on project which is including now 65 nodes (aggregates, handlers, ...) and I hope this could help us get better picture about whole system.
This example is generated for https://github.com/slashdotdash/conduit
-
copy config/dev.tmp.exs as
config/dev.exs
and set properly path to your project. Thepath_wildcard
is used to get better files what we want to analyse. -
execute
./bin/setup
. Setup mix and install required node packages for frontend client. -
execute
./bin/generate_data
. This command will generate required json file for FE infrontend_client
folder. -
execute
./bin/run_client
. Will run server (serving generated json file to FE) and open FE react application in browser.
The main app logic is based on configuration and regular expressions. In config/dev.exs you can play with it.
-
config :commanded_process_map, :project
path:
set path to your projectpath_wildcard:
set wildcard pattern to anaylyse only files which matters. (eg./lib/**/*.ex
or/apps/*/lib/**/*.ex
in umbrella apps)
-
config :commanded_process_map, :types
are representing nodes if FE flow graph. Thekey
is type of node and following areregexp
regular expression to regognise nodenot_one_of
list of regular expressions to exclude file if some is evaluated astrue
output
what type of output is node emittingtargets
what types of nodes are receiving output from this type of node
-
config :commanded_process_map, :regexp
are used for analysing each node what edges (commands and events) are they using. It is including regexp for named capturing and parsing and for scan parsing.
You can define as many nodes as want. They will be automatically grouped by colour in graph and edged by rules in config (output, targets). You can even create your own pseudo language for spiking ideas and update config regexp by it. It will generate you graph for presenting that logic/structure.*
- after regenerating data let server returning new data (no needs to restart)
- get rid of react compile warnings
- investigation/play with graph options to reach better UX
- update README by UI possibilities description (selecting, source code view, ...)
- improve selectors (suggestion filter, ...)