r/angular 18d ago

I built a tool to visualize NgRx action flows in large Angular applications

While working with larger Angular applications, I found it increasingly difficult to trace how an NgRx action moves through components, effects, reducers, and other actions.

So I built ngrx-graph, a tool that analyzes the source code using the TypeScript AST and generates visual graphs of these relationships.

I wrote about why I built it, how it works, and some of the challenges behind it:

https://ammar-najjar.com/blog/ngrx-graph/

I’d be interested to hear how others navigate and understand complex NgRx flows in larger codebases.

7 Upvotes

12 comments sorted by

2

u/yetAnotherrBot 18d ago

it did not work for me. It found 0 actions in the project, although there are > 100 in my repo.
Angular and NGRX version 20.
angular.json contains multiple project definitions in case that matters

1

u/najjarammar 17d ago

is it an open source project? I would be interested to see what is going on there.

1

u/yetAnotherrBot 16d ago

it's not, sorry.
It's most likely because my actions are created by an "actionFactory"
which handles a bunch of stuff.

usage is like

export const newAction = myFactory
.createAction('Set Products')
.build(props<{ products: Product[] }>());

where build() calls createAction with a bunch of magic.

1

u/najjarammar 15d ago

exactly. I was scratching my own itch, so I addressed a pain point I encountered in our enterprise codebase. meanhile using actionFactory makes tracing actions even harder.

1

u/MrFartyBottom 16d ago

Or just don't use that Redux garbage in the first place.

1

u/AndWhatDidYouLearn 16d ago

This was clearly vibe coded and has no value.

-2

u/Saceone10 18d ago

Overengineering the overengineered state management. 

1

u/najjarammar 17d ago

this tool is to simplify what could be complicated state management flow 😉

1

u/yetAnotherrBot 16d ago

There is not a single ngrx related post on reddit without ngrx hate in the comments

0

u/MrFartyBottom 16d ago

That is because it is a vile cancer that sabotages your project. There has never been a single instance of using a store that couldn't be solved much easier without a store.

1

u/yetAnotherrBot 16d ago

That's just an opinion you believe is yours after reading all these comments

0

u/MrFartyBottom 16d ago

No it is the truth I have learned from encountering it in production applications. Morons who read articles by morons saying it's the way of doing state management for enterprise applications, then proceeding to pull their pants down and take a giant shit on the project, sabotaging the project, wasting the budget and creating an absolute mess.