Live Chat
We need a refactored version of the current live chat
Points:
- Use the current implementation as a high-level overview of what needs to be done. Please, do not copy and paste this code, since it is a very bad code. I would ask you to rewrite EVERYTHING from scratch.
- There won't be any storage of the chat, only real-time, so no database involved.
New features:
-
users should be able to upload an image: - create an API POST endpoint for it, using ORG authentication
- it uses s3-storage-engine for it. locally, to test, just ignore the main upload function.
- it returns the URL of the asset once uploaded
-
create a proper way to "connect" to the chat - define the input structure based on the draft below
- define the output (broadcast) structure
-
possibility to "reply" to a message - the input structure would receive an attribute "replyTo", which is the id of the targeted msg
-
an admin endpoint (JWT auth) to open and close the chat
input structure (draft):
id
authorName
authorDescription
replyTo
media
output structure (draft) extends input and
chatId
-
sentAt
Date
Nice to have:
- multiple chats. we would add a
chatId
in the input structure, and only sent the msg to those on that specific chat.
Talk to your project manager if you need help to understand the basic functionality of it.
Edited by Ghost User