# ER: Requirements Specification Component
Our platform's purpose is to be a place where people can help each other learn about topics like law, politics and economics so that they can be more active, caring and well-informed citizens.
## A1: hELP - home of Economics, Law and Politics
hELP is a web-based information system whose purpose is to help people by answering their questions about several topics from law to economics.
It is being developed by a group of four students with the guidance of the teachers of the LBAW course who stipulated the project, all of whom constitute the stakeholders.
This website is made for everyone who has questions and is not sure where to find the answer or is too afraid to ask them in person.
Thus, this platform aims to spread different perspectives and approaches about topics that may not be as accessible to anyone trying to improve their knowledge in these unclear topics.
The main goal of this platform, besides the mutual help between individuals, is to create a community of active users - people that write/answer questions - who create trustworthy content for anyone interested. In that way, both active people and visitors can find their answers in hELP.
Users are separated into groups with different permissions. These groups include the administrators, moderators, and the "normal" users, that can be authenticated users or non-authenticated ones.
A non-authenticated user (or visitor for short) can view the top and most recent questions, and browse through the questions by their name/content and by their tags. When browsing questions, a visitor can sort the questions by multiple attributes (eg.: newest, recent activity, highest score...) and filter the questions that do not have answers. Besides, a visitor can search for specific questions using full-text search and exact match search. A visitor can view question details (such as answers and comments), report the question or the details to the moderation and view the authenticated users' profiles. To become an authenticated user, one must register or login into an existing account.
An authenticated user can do all the actions a visitor can do (trivially excluding the login and register, as he is already logged in). This user has a personal feed with the recommended questions, and they can post their own questions and answers. This user can upvote or downvote questions and answers, as well as comment on them both. A user can view and edit their profile, where they can share some personal information and have a profile picture. They have also available a list of their questions and answers. To never miss an update on a topic of interest, a user can follow both questions and tags and receive notifications when there is any activity in a followed question or tag.
When a user produces content (questions, answers, or comments) they are the author of said content. An author can edit and delete their content whenever they wish to do so. Additionally, in the case of a question, the author can also edit the question tags and mark the answers as correct. An author receives a notification when someone answers their questions or votes on their content. One of the answers can be marked by the author of the question as the solution. They can also decide not to post their question and save it as a draft. By accomplishing certain milestones like getting many upvotes or getting several answers marked as the solution, a user can receive badges that are displayed next to their username.
An administrator is also an authenticated user, in the way that they have to log in to have available the administrative powers. Having said so, he can do all the actions the "normal" authenticated user can, being an active member of the community. The administrator can administrate user accounts (search, view, edit, create), block and unblock user accounts and delete user accounts. The administrator can manage tags (create or delete tags).
A content moderator is an authenticated user. In a similar fashion to the administrator, a moderator can do everything a user can, as well as delete content (questions, answers, or comments), edit question tags and see reported items.
Naturally, an authenticated user can at any time log out, return to the non-authenticated user condition, and log in again at any time.
The platform will provide easy and intuitive navigation, with contextual error messages and help, to give the user feedback and support. The form inputs will contain adequate and elucidative placeholders. Any user may find more information about the platform, its feature, and the administrative contacts on the "About Us" page.
## A2: Actors and User stories
This artifact specifies the possible actors and their corresponding actions in the form of user stories.
### 1. Actors
For the hELP platform, the actors are represented in Figure 1 and described in Table 1.
<figure>
<img src="https://i.imgur.com/dk4k70e.jpg" align = "center">
<figcaption align = "center"><b>Figure 1 - Actors</b></figcaption>
</figure>
| Identifier |Description|
| :----: | :----: |
|Visitor|Non-authenticated user that can see and browse questions and has the possibility to register or login into an existing account|
|Authenticated User|User who is authenticated, can ask and answers questions as well as vote and comment on them both|
|Administrator|Authenticated user that can manage user accounts and question tags|
|Moderator|Authenticated user that can delete questions, answers, comments and edit tags|
<figure>
<figcaption align = "center"><b>Table 1 - Actors description</b></figcaption>
</figure>
### 2. User Stories
For **hELP** the user stories are the following:
#### 2.1. Visitor
| Identifier | Name | Priority |Description|
| :----: | :----: | :----: | :----: |
| US001 | Sign-in | High | As a *Visitor* I want to authenticate into the platform so that I interact with other users |
| US002 | Sign-up | High | As a *Visitor* I want to register myself in the platform so that I can authenticate myself|
| US003 | See Home | High | As a *Visitor* I want to access the home page so that I can see a brief presentation of the website |
| US004 | View top questions | High | As a *Visitor* I want to view top questions so that I can see interesting topics|
| US005 | Search questions | High | As a *Visitor* I want to search questions so that I can find the answers I'm looking for|
| US006 | Sort questions by attributes | High | As a *Visitor* I want to sort questions by score and recent activity so that I can better choose what questions to open|
| US007 | Browse questions | High | As a *Visitor* I want to browse questions so that I can see recommended questions|
| US008 | View recent questions | Medium | As a *Visitor* I want to view recent questions so that I can be up-to-date with current topics|
| US009 | View unanswered questions | Medium | As a *Visitor* I want to view questions that do not have any answers so that I can be the first to reply|
| US010 | Browse questions by tags | Medium | As a *Visitor* I want to browse questions by tags so that I can see questions of specific themes|
| US011 | View question details | Medium | As a *Visitor* I want to view question details, so I can know more about who wrote the question and when |
| US012 | See authors' profiles | Medium | As a *Visitor* I want to see authors' profiles so that I can read their content and profile information |
| US013 | Consult contacts | Medium | As a *Visitor* I want to access contacts so that I can come in touch with the platform creators |
| US014 | See about | Medium | As a *Visitor* I want to access the about page so that I can see a complete description of the website and its creators |
| US015 | See rules | Medium | As a *Visitor* I want to access the rules page so that I can follow them |
| US016 | Report questions | Medium | As a *Visitor* I want to be able to report questions so that a Moderator can evaluate them ||
| US017 | Report answers | Medium | As a *Visitor* I want to be able to report answers so that a Moderator can evaluate them ||
| US018 | Report comments | Medium | As a *Visitor* I want to be able to report comments so that a Moderator can evaluate them ||
#### 2.2. Authenticated User
| Identifier | Name | Priority |Description|
| :----: | :----: | :----: | :----: |
| US101 | See personal feed | High | As an *Authenticated user* I want to access my home feed so that I can see question recommendations |
| US102 | Add question | High | As an *Authenticated user* I want to create new questions so that they can be answered |
| US103 | Add answers | High | As an *Authenticated user* I want to answer other people's questions so that I can help them |
| US104 | View profile | High | As an *Authenticated user* I want to view my profile so that I can see what information I am publicly sharing |
| US105 | Edit profile | High | As an *Authenticated user* I want to edit my profile so that I can change my information or profile picture |
| US106 | Delete my questions | High | As an *Authenticated user* I want to delete my posted questions so that they cannot be viewed anymore |
| US107 | Delete my answers | High | As an *Authenticated user* I want to delete my answers so that they cannot be viewed anymore |
| US108 | Delete my comments | High | As an *Authenticated user* I want to delete my comments so that they cannot be viewed anymore |
| US109 | Edit my questions | High | As an *Authenticated user* I want to edit my posted questions content so that I can correct them or add new information |
| US110 | Edit my answers | High | As an *Authenticated user* I want to edit my answers so that I can correct them or add new information |
| US111 | Edit my comments | High | As an *Authenticated user* I want to edit my content so that I can correct them or add new information |
| US112 | Sign-out | High | As an *Authenticated user* I want logout so that I am no longer authenticated|
| US113 | Add comments | Medium | As an *Authenticated user* I want to comment on other people's questions and answers so that I can add more information |
| US114 | Vote questions | Medium | As an *Authenticated user* I want to upvote or downvote other people's questions so that I can give feedback |
| US115 | Vote answers | Medium | As an *Authenticated user* I want to upvote or downvote other people's answers so that I can give feedback |
| US116 | Follow tags | Medium | As an *Authenticated user* I want to follow tags so that I can be notified of new questions posted with that tag|
| US117 | Follow questions | Medium | As an *Authenticated user* I want to follow questions so that I can be notified of new answers or edits |
| US118 | Mark answer as correct | Medium | As an *Authenticated user* I want to mark an answer as correct so that other people can see that it was a good answer|
| US119 | Edit question tags | Medium | As an *Authenticated user* I want to change the tags in my question so as to assure they are the relevant ones|
| US120 | Recover Password | Medium | As an *Authenticated user* I want to be able to recover my password in case I forget about it|
| US121 | Save question as draft | Medium | As an *Authenticated user* I want to be able to save a question I wrote as a draft so that I can post it at a later date|
| US122 | View my drafts | Medium | As an *Authenticated user* I want to be able to view the drafts I have saved so that I can edit and/or post them||
| US123 | Receive answers notifications | Medium | As an *Authenticated user* I want to be receive notifications of answers to my submissions so that I can go read them||
| US124 | Receive followed questions notifications | Medium | As an *Authenticated user* I want to be receive notifications of answers to questions that I follow so that I can go read them||
| US125 | Receive followed tags notifications | Medium | As an *Authenticated user* I want to be receive notifications of new questions that include tags that I follow so that I can go read those questions||
| US126 | Receive "marked as answer" notifications | Medium | As an *Authenticated user* I want to be receive notifications of answers I wrote that were marked as the solution so that I can know I helped||
| US127 | Receive new badges notifications | Medium | As an *Authenticated user* I want to be receive notifications of the badges I receive so that I know what I accomplished||
#### 2.3. Administrator
| Identifier | Name | Priority |Description|
| :----: | :----: | :----: | :----: |
| US201 | Administrate Accounts | High | As an *Administrator* I want to administer user accounts so that I can have access to their information and edit it if needed|
| US202 | Create user accounts | High | As an *Administrator* I want to create new user accounts so that I can have access to their information and edit it if needed|
| US203 | Edit user accounts | High | As an *Administrator* I want to edit user accounts so that I can keep their information relevant
| US204 | Delete user account | Medium | As an *Administrator* I want to delete a user account from the platform so that they can lose access to all their access to the platform and their account information |
| US205 | Search user accounts | High | As an *Administrator* I want to search for a user so that I can manage it|
| US206 | View user accounts | Medium | As an *Administrator* I want to view user accounts so that I can check if everything is alright |
| US207 | Unblock user | Medium | As an *Administrator* I want to unblock a user from the platform so that they can gain access to restricted contents of the site |
| US208 | Create tags | Medium | As an *Administrator* I want to create new question tags so that questions can be well categorized |
| US209 | Delete tags | Medium | As an *Administrator* I want to delete questions tags so that I can maintain only the relevant ones |
#### 2.4. Moderator
| Identifier | Name | Priority |Description|
| :----: | :----: | :----: | :----: |
| US301 | Delete questions | Medium | As a *Moderator* I want to delete the questions so that I can keep only the good and well-intended ones.
| US302 | Delete comments | Medium | As a *Moderator* I want to delete comments so that I can keep only the good and well-intended ones. |
| US303 | Delete answers | Medium | As a *Moderator* I want to delete the answers so that I can keep only the good and well-intended ones. |
| US304 | Edit questions | Medium | As a *Moderator* I want to edit questions so that I can make sure site rules are followed without having to delete the question. |
| US305 | Edit answers | Medium | As a *Moderator* I want to edit answers so that I can make sure site rules are followed without having to delete the answer |
| US306 | Edit tags | Medium | As a *Moderator* I want to be able to edit question tags so that I can keep the questions well identified |
| US307 | See reported questions | Medium | As a *Moderator* I want to be able to see which questions were reported so that I can edit or delete them |
| US308 | See reported answers | Medium | As a *Moderator* I want to be able to see which answers were reported so that I can edit or delete them |
| US309 | See reported comments | Medium | As a *Moderator* I want to be able to see which comments were reported so that I can edit or delete them |
### 3. Supplementary Requirements
Here are presented the business rules, technical requirements, and restrictions that will be taken into account.
#### 3.1. Business rules
| Identifier | Name |Description|
| :----: | :----: | :----: |
| BR01 | Administrator as User | Administrators are participating members<br> of the community, i.e. can post or <br> on questions or answers. |
| BR02 | Deleted User | The content created by the deleted account is preserved but its identity is made anonymous |
| BR03 | Date | Editions' date is later than the date from the original post |
| BR04 | Edited posts | Questions and answers edited after being posted should have a clear indication of the editions.|
| BR05 | Badges | User badges are dependent on the likes and dislikes received on his questions and answers, and also on actions made by the user (the first question, first answer, etc). |
| BR06 | Question author cannot answer own question | A question author should not be able to answer his own question, they can instead mark an answer as correct, edit the original question or delete it. |
#### 3.2. Technical requirements
| Identifier | Name |Description|
| :----: | :----: | :----: |
| TR01 | Performance | The system should have response times shorter than 2s to ensure the user's attention |
| TR02 | Robustness |The system must be prepared to handle and continue operating when runtime errors occur |
| TR03 | Scalability |The system must be prepared to deal with the growth in the number of users and their actions |
| TR04 | Accessibility |The system must ensure that everyone can access the pages, regardless of whether they have any handicap or not, or the Web browser they use |
#### 3.3. Restrictions
| Identifier | Name |Description|
| :----: | :----: | :----: |
| R01 | Deadline | The project must be operational at the end of the semester |
---
## A3: Information Architecture
This artifact presents a brief overview of the information architecture of the system to be developed. It aims to identify and describe the user requirements and preview and empirically test the user interface, as well as quickly iterate on it's design.
This artifact enables a brief exploration of the information architecture of the system to be developed, in particular the identification of the content, how it is organized and made available, and how it is presented.
### 1. Sitemap
Overview of the information architecture from the viewpoint of the users.
<figure>
<img src="https://i.imgur.com/ypzqF3U.png">
<figcaption align = "center"><b>Figure 2 - Sitemap </b></figcaption>
</figure>
### 2. Wireframes
In this section we can see some drafts of the main pages of our application and their main links and features.
#### UI01: Homepage

#### UI12: Question Page

#### UI16: Profile Page

---
## Revision history
Changes made:
1. 2022/09/22 - File creation. Started and finished A1 and started A2;
2. 2022/09/28 - Finished A2. Started A3;
3. 2022/10/01 - Finished A3;
4. 2022/10/03 - Last verifications before submission.
***
GROUP2214, 22/09/2022
* Dinis Sousa, up202006303@edu.fe.up.pt
* Francisca Silva, up202005140@edu.fe.up.pt
* João Matos, up202006280@edu.fe.up.pt
* José Gaspar, up202008561@edu.fe.up.pt (Editor)