A Chat Scaffold based on antd and dva:
root: {
conversations: { // conversations
'-2h6WJbFPBxUs15iB15DnSAIRTyP2-1482823102860': {
participants: {
'2h6WJbFPBxUs15iB15DnSAIRTyP2': user,
'1482823102860': user
},
chats: {
'-KZzCufnRDtS4h0q9fL': {
content: '',
time: '',
user: {}
}
}
},
...
},
user: { // online users
'2h6WJbFPBxUs15iB15DnSAIRTyP2': user,
...
}
}
git clone https://github.com/RaoHai/chat.git
cd chat
npm install
npm start // enjoy :D