Use cases
...
Tom has a set of data he wants to public and have people take a look at. However, no one is interested to know his data because no one know who Tom is. Tom would love for people to find his impressive work, but does not want to copy it from his linkedin profile to his post. He would love for his work to be shown in every posts somehow so that it gives more credits to what he says.
Approach
Each project has a Forum. A Forum has one or many Moderators, and many Threads. A Thread is created by a user (Author) and has many Replies. A Reply is created by a user (Author).
In the second phase, we could add new features so that a user could help the community by marking a Thread is helpful, and by marking a Reply is helpful or unhelpful.
Mockups
Phase 1
Summary View
Paginated Threads
Thread View
Paginated Replies
Author View
Moderator View
Phase 2
Summary View
Thread View
Files View
Query Result View
...
Removed (Hidden) Replies
New Thread
New Reply
Models
API
Action | Intended User | URI | Method | Request Parameters | Request Body | Response Body | Notification Sent to (Phase 2) |
Get Forum Metadata for a Project | authorized user | /forum/{projectId} | GET | Forum | |||
Update Forum Description | Moderator | /forum/{forumId}/description | PUT | String | |||
Get Threads of a Forum | authorized user | /forum/{forumId}/threads | GET | order, limit, offset | PaginatedThreads | ||
Create a Thread | authorized user | /thread | POST | CreateThread | Thread | ||
Get a Thread by its ID | authorized user | /thread/{threadId} | GET | Thread | |||
Create a Reply | authorized user | /reply | POST | CreateReply | Reply | Thread’s Author | |
Get a Reply by its ID | authorized user | /reply/{replyId} | GET | Reply | |||
Flag a Thread | authorized user | /thread/{threadId}/flag | PUT | Moderator | |||
Flag a Reply | authorized user | /reply/{replyId}/flag | PUT | Moderator | |||
Pin a Thread | Moderator | /thread/{threadId}/pin | PUT | ||||
Unpin a Thread | Moderator | /thread/{threadId}/unpin | PUT | ||||
Remove a Flag on a Thread | Moderator | /thread/{threadId}/unflag | PUT |
| |||
Remove a Flag on a Reply | Moderator | /reply/{replyId}/unflag | PUT | ||||
Remove a Reply | Moderator | /reply/{replyId} | DELETE | ||||
Remove a Thread | Moderator | /thread/{threadId} | DELETE | ||||
Get Replies for a Thread | authorized user | /thread/{threadId}/replies | GET | order, limit, offset | PaginatedReplies | ||
Update a Thread's Message | Author | /thread/{threadId}/message | PUT | String | |||
Get Threads that mentions an Entity | authorized user | /thread/entity/{entityId} | GET | order, limit, offset | PaginatedTheads | ||
Mention an Entity | authorized user | /thread/{id}/mentionEntity | POST | EntityId | MentionEntity | ||
Mention Entities | authorized user | /thread/{id}/mentionEntities | POST | List<EntityId> | List<MentionEntity> |
...