We will design and implement a simple version of StackOverflow.
Read about how the real StackOverflow works on their tour page.
Our system will have only one type of user (two types if you also implement the bonus features). No actions should be possible if the user is not logged in.
Users shall be able to ask questions. Each question must have an author, title, text, creation date / time and one or more tags. If an appropriate tag does not exist, the user must be able to create one.
The list of questions shall be displayed, sorted by creation date. The most recent question should be displayed first.
The user must be able to filter questions by tag or via a text search. The text search should match against the question title.
Each question may be answered one or more times by any user (including the original author).
Each answer must have an author, text and creation date / time.
Answers may be edited or deleted by their author.
When displaying a question individually, the list of answers must also be displayed.
Users may vote questions and answers (upvote and downvote).
Each user may only vote once on each question or answer, but may change his vote later on. Users cannot vote on their own answers or questions.
On each voted question or answer, the vote count must be displayed (vote count = upvote count - downvote count).
The answers for a question must be sorted by their vote count. Answers with the highest vote count must be displayed first.
Based on upvotes and downvotes, the system must compute a user score with the following rules:
The user score shall be displayed next to the author's name on each question / answer.
Moderators are users with special privileges. They shall be able to:
Banned users must see a message indicating that they were banned when trying to login and should be unable to perform any other actions.