build the chat.js