add templates directory and socket service