Private chat

I am building a chat application in ionic 4 using, nodejs and mysql, but i couldnot proceed my work further as i am unclear about the mechanism of private chat using aforementioned tools. Can anyone help me to explain the mechanism clearly with code if possible. I would be grateful if you all can help me as soon as possible as this project is my final year project and has to be completed on due date