Loading...
Functional Requirements:
Non-Functional Requirements:
POST /messages
{senderId, receiverId, content}
This will be for creating a new message.
PUT messages/:messageId
{userId}
This will solely be used to update the read receipt of the given message.
GET /messages?userId&contactId&page&limit
This will return all the messages that the user has yet received. We will have a page and limit parameter so that it will retrieve only a certain amount of messages at a time.
User
userId
password
firstName
lastName
Message
messageId
senderId
receiverId
message
timestamp
read
We can create a composite index on the senderId and receiverId in order to quickly find messages between two contacts.