How do you make a Werewolf tabletop game?

So I noticed a game that became successful that was inspired by a Werewolf party game and it was Flicker.

I’ve been trying for a couple of weeks now to create a game like it; albeit different roles/powers and etc but to no avail.

So my question is this: what is the simplest code structure/engineering to make these types of games.