recode js part as components and event driven interactions
add phpmd