adds state machines and vote logic for users, posts and comments