edit: websocket, add js & refactor component