how coding a cluster in html css js

hello , i should code a cluster like image bellow we have no challenge in coding backend but in front need some clue to do this
its a dynamic cluster so that in every step we can filter more and more
every filter add a row
transparency is included for example if we delete top box every child will deleted
i dont know how do this
should use table or not
please someone help me