refact all the code to integrade ewrApp with HeadDesignDB Website

refact all the code to integrade ewrApp with HeadDesignDB Website