---
# System prepended metadata

title: 'ER: Requirements Specification Component'

---

# ER: Requirements Specification Component

#### Project Vision:

Providing a client with a fast, reliable and efficient website for autonomously selling products to large number of clients. The website should be able to integrate basic online commerce funcitonalities, as well as advanced features, in order to provide users with a unique, and positive, experience.

## A1: "SmArt" Online Shop

#### Business Context:

Smart is a online art retailer with a vision to provide easy access to diverse and exclusive pieces.

#### Goals and Objectives:

Providing a simple but feature-rich online shop interface with intuitive UI and consequent UX. Users should be able to find the product they are looking for in a efficient manner, without loosing out on advanced features and appealing UI. Online shop web interface where users can easily search and browse products using a search bar and filters. The website should also be simple to manage by it's administrators, and easy to modify or upgrade by future web developers.

#### Motivation:

Providing a client with a fast, reliable and efficient website for autonomously selling products to large number of clients. The website should be able to integrate basic online commerce funcitonalities, as well as advanced features, in order to provide users with a unique, and positive, experience.

#### Stakeholders:

- Client
- Users
- Administrators
- Web Developers (for future website modifications and/or updates)

#### Main Features:

1. **Sign-up page** for customers to create an account. To do so, customers will have to fill in the following fields: 1.1. Email, which will be the unique identifier; 1.2. First and last names; 1.3. Password; 1.4. Address (optional).
2. User authentication (**login page**) for customers, using an email and password fields to login. Furthermore, customers will be able to login using external authentication via their Google account.
3. Customers will then have access to a **profile page** where they will see their account details and purchase history.
4. The main website page (the **Product Feed**) will be a display of products available to purchase in a grid format. This will be the browsing page where customers can find and select the products they'd like to acquire.

   4\.1. Products will be displayed inside the browsing page inside rectangular cards containing the product's attributes: 4.1.1. Photo or image; 4.1.2. Product title; 4.1.3. Product price;

   4\.2. The browsing page will have a side menu bar containing **filter options** such as: 4.2.1. Price range; 4.2.2. Type of product (using an attribute that the product class will have but not display);

   4\.3. There will be a **search** bar allowing customers to also search products by their titles;
5. Each product will have a **product page:**

   5\.1. Displaying the product's 5.1.1. Title; 5.1.2. Image and 5.1.3. Price;

   5\.2. Giving the customer the option to add the product to their shopping cart in order to purchase it;

   5\.3. Containing a **review** section where customers who have purchased the product will be able to write comments about it and also read the previous reviews received by that product.
6. **Admins** will have a separate login page at a different URL and also authenticate by email and password.
7. Once logged in, admins will be lead to a backoffice for the ecommerce platform where they will be able to manage users, products and access other administration features. The **backoffice** will:

   7\.1.1. Display a table of all **user accounts** and their properties except password (Read); 7.1.2. Allow editing accounts' information (Update) and 7.1.3. Delete an account (Delete);

   7\.2.1. Display a table of all **admins** and their properties except password (Read); 7.2.2. Create admin accounts (Create); 7.2.3. Allow editing account information (Update); 7.2.4. Delete accounts (Delete);

   7\.3.1. Display a table of all **products** available in the shop; 7.3.2. Create new products (Create); 7.3.3. Allow editing product information (Update); 7.3.4. Delete products available (Delete);
8. There will be a **shopping cart** to which customers will be able to add products they want to purchase while they browse the website (in particular the Product Feed and Product Pages).
9. In order to finalize an order, a user will open their cart and choose to proceed to the payment, via the **checkout page**.

---

## A2: Actors and User stories

Presenting the actors and their relationship with the website as well as the main user stories.

### 1. Actors
| Identifier | Name | Description |
|------------|------|-------------|
| 1 | Visitors (Non-authenticated Users) | Users who aren't logged in or/and not registered on the website database. These users can still browse products but require registration and consequent login in order to add items to card and complete purchase. |
| 2 | Customers (Authenticated Users) | Users who registered and logged in on the website database. These users can not only browse products but add items to cart, create a wishlist and complete an order. |
| 3 | Reviewers | Customers which partake in the act of reviewing a product previously bought by them. Reviewers have to rate a product out of 5 stars, and optionally publish a writen evaluation for a more detailed and complete review. |
| 4 | Administrators / Managers | Users with higher privilages who can access hidden information such as items in stock, coupon codes, orders, etc. These users can also modify certain information, such as product information (description, price, images, etc). |
| 5 | Google API | External APIs that can be used to register or authenticate into the system. |


**Table 1:** Actors' description

![image](uploads/eefce754d14b0534306e29ca5a1f1bd5/image.png)

**Figure 1:** Actors' Diagram

#### Relationship a)

Administrators / Managers will have privileged access and are able to allow and restrict content made available to unauthenticated users, such as account page or cart. Adminstrators / Managers can also limit actions available for unauthenticated users, such as purchase completion.

#### Relationship b)

As with relationship a), Administrators / Managers have priviledged access and are able to allow and restrict content made available to authenticated users, such as account page or cart, and can also limit actions available for unauthenticated users, such as purchase completion. Administrators / Managers are also able to view, modify or delete certain information stored on each indiviudual authenticated user, such as associated username, email, shipping/billing address, order history, etc.

#### Relationship c)

Authenticated user's are basically unauthenticated users, with access to additional content on the website. They also have extra information stored on the website's database, such as personal details, payment methods, or other KYC related information.

### 2. User Stories

#### 2.1 Guest Users
| Identifier | Name | Priority | Description |
|------------|------|----------|-------------|
| US11 | See Homepage | High | As a Guest User, I want to access the homepage, so that I can see the website's presentation. |
| US12 | Search | High | As a Guest User, I want to search for specific posts, users, groups and categories, so that I can view the information I want. |
| US13 | Filter | High | As a Guest User, I want to filter and sort the results of a search, so that I can find information more easily. |
| US14 | See about | High | As a Guest User, I want to access the about page so that I can learn more about the website's origin. |
| US15 | View product | High | As a Guest User, I want to view all information of a specific product, so that I can get all the information about it. |
| US16 | View similar products | High | As a Guest User, I want to view similar products on a product's page, so that I can discover new products I may like. |
| US17 | Read product review | High | As a Guest User, I want to read all reviews of a product, so that I know what other people think about it. |
| US18 | Sing-up | High | As a Customer, I want to register myself into the system, so that I can then authenticate myself. |

**Table 2:** Guest User's user stories

#### 2.2 Customers
| Identifier | Name | Priority | Description |
|------------|------|----------|-------------|
| US201 | See Homepage | High | As a Guest User, I want to access the homepage, so that I can see the website's presentation. |
| US202 | Search | High | As a Guest User, I want to search for specific posts, users, groups and categories, so that I can view the information I want. |
| US203 | Filter | High | As a Guest User, I want to filter and sort the results of a search, so that I can find information more easily. |
| US204 | See about | High | As a Guest User, I want to access the about page so that I can learn more about the website's origin. |
| US205 | View product | High | As a Guest User, I want to view all information of a specific product, so that I can get all the information about it. |
| US206 | View similar products | High | As a Guest User, I want to view similar products on a product's page, so that I can discover new products I may like. |
| US207 | Read product review | High | As a Guest User, I want to read all reviews of a product, so that I know what other people think about it. |
| US208 | Sing-in | High | As a Customer, I want to authenticate into the system, so that I can add products to cart and complete purchases. |
| US209 | Add product to cart | High | As a Customer, I want to add products to cart, so that I can purchase them. |
| US210 | View shopping cart | High | As a Customer, I want to view my shopping cart, so that I can view the list of products that I'am buying. |
| US211 | Complete purchase | High | As a Customer, I want to complete purchase, so that I can checkout and receive my products. |
| US212 | Recover my account | High | As a Customer, I want to recover my account in case I forget one of my credentials so that I can use it again. |
| US213 | Login using external API | Low | As a Customer, I want to sign-in through my external account, so that I can authenticate myself into the system. |
| US214 | Write review | High | As a Customer, I want to write a review, so that I can help future customers about the product they are buying. |
| US215 | View profile | High | As a Customer, I want to view my profile to check if stored information is accurate and update. |
| US216 | Remove product from cart | High | As a Customer, I want to remove products from cart, so that I can help future customers about the product they are buying. |
| US217 | Edit review | High | As a Customer, I want to edit a review in order to correct or update a past review on a product which I changed opinion on. |

**Table 3:** Customers's user stories

#### 2.3 Reviewers
| Identifier | Name | Priority | Description |
|------------|------|----------|-------------|
| US21 | Review Product | High | As a Reviewer, I want to be able to publish a review on a product i have purchased. I can submit a simple 1-5 star rating and additionally write a small paragraph describing the reasoning behind my review.  |
| US22 | Edit Review | Medium | As a Reviewer, I want to be able to edit a past review i published, in order to update my thoughts on a product. |
| US23 | Delete Review | Medium | As a Reviewer, I want to be able to delete a previously published review, if i consider it to not be accurate anymore. |

**Table 4:** Reviewers' user stories


#### 2.4 Administrators / Managers
| Identifier | Name | Priority | Description |
|------------|------|----------|-------------|
| US41 | Dashboard | Medium | As an Administrator / Manager, I want to be able to view a dashboard which displays relevant business metrics. |
| US42 | Search Users | High | As an Administrator / Manager, I want to be able to search for a specific registered user, and access certain information about him/her. |
| US43 | Edit Users | High | As an Administrator / Manager, I want to be able to edit specific registered user's information manually, and override the one created by him/her. |
| US44 | Restrict Users | High | As an Administrator / Manager, I want to be able to restric specific users from performing certain tasks, in case of abuse. |
| US45 | Manage Stock | High | As an Administrator / Manager, I want to be able to manually edit stock available for one or more products listed. |
| US46 | Edit Product | High | As an Administrator / Manager, I want to be able to edit specific product information, such as price, product description and product images. |
| US47 | Product Management | High | As an Administrator / Manager, I want to be able to create, delete, or temporarily list (or unlist) a product from the product page. |
| US48 | Manage Coupons | Medium | As an Administrator / Manager, I want to be able to create, modify or delete coupon/discount codes created for users to purchase one or more products at a discounted price. |

**Table 5:** Administrator's user stories

#### 2.5 Google API
| Identifier | Name | Priority | Description |
|------------|------|----------|-------------|
| US51 | API Login | Medium | As the Google API, I want to allow users and Administrators to login to their website account using their Google account credentials. |



**Table 6:** Google API's user story

### 3. Supplementary Requirements

#### 3.1. Business rules
| Identifier | Name | Priority | Description |
|------------|------|----------|-------------|
| BR1 | Single User Email | High | An authenticated user must only have one email associated to its user account. |
| BR1 | Unique User Email | High | An authenticated user must have an unique email associated to its user account. |
| BR2 | Unique Product ID | High | A product must have an unique ID associated to it. No two products may have the same product ID. |
| BR3 | Unique Order ID | High | A order must be identified by a unique order ID. This order ID is unique to a specific order and can never be re-utilized. |
| BR4 | Product Stock Purchase Limit | High | A user must be limited to purchase, at most, the total stock of a specific product at any given time, and never more, including in a stock rupture event. |
| BR5 | Authenticated User Purchase | High | A purchase can only be completed if the user is registered and logged in. |
| BR6 | Admin Ban | High | An administrator / manager is able to ban certain users from utilizing the website if terms & conditions are not followed. |
| BR7 | Purchase Review | Medium | A user can only review a product which they have previously bought. |
| BR8 | Valid Date | High | A product publication date should precede any orders placed regarding that specific product. |
| BR9 | Remove User | Medium | An administrator / manager is able to remove a user from website database. |

**Table 7:** Business Rules

#### 3.2. Technical requirements
| Identifier | Name | Description |
|------------|------|-------------|
| TR01 | Availability | The system must be available and operational 99 percent of the time in each 24-hour period. |
| TR02 | Performance | The system should have response times as minimal as possible (shorter than 2s) to ensure the user's attention. |
| TR03 | 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. |
| TR04 | Usability | The system should be simple, intuitive and easy to use. |
| TR05 | Portability | The server-side system should work across multiple operating systems (Linux, Mac OS,Windows, etc.). |
| TR06 | Web application | The system should be implemented as a Web application with dynamic pages (HTML5, JavaScript, CSS3 and PHP). |
| TR07 | Database | The PostgreSQL database management system must be used. |
| TR08 | Security | The system shall protect information from unauthorised access through the use of an authentication and verification system. |
| TR09 | Scalability | The system must be prepared to deal with the growth in the number of users and their purchases. |
| TR10 | Robustness | The system must be prepared to handle and continue operating when runtime errors occur. |
| TR11 | Ethics | The system must respect the user by respecting the ethical principles in software development. |
| TR12 | Reability | The system must be functional without failure. |
| TR13 | Maintainability | The system must prepared to be repaired in a defined environment within a specified period of time. |

**Table 8:** Technical requirements

The three most important technical requirements are:

1. **Security**: Since there are payments and purchases envolved, the website's security is a must.
2. **Usability**: The website's layout and UX should be intuitive so that customers don't drop off due to a bad shopping experience.
3. **Ethics**: Since the website is dealing with sensitive user data such as addresses, passwords, contacts and shopping info, the website should safeguard and be responsible when handling it.

#### 3.3. Restrictions
| Identifier | Name | Description |
|------------|------|-------------|
| C01 | Deadline | The system should be fully implemented and ready to use by the end of the 1st semester. |

**Table 9**: Restrictions

---