refactory menu to json config, add generator