# EAP: Architecture Specification and Prototype
> Project vision
## A7: High-level architecture. Privileges. Web resources specification
The architecture of the web application to delevop is documented indicating the catalogue of resources and the properties of each resource, including: references to the graphical interfaces, and the format of JSON responses. This page presents documentation for Online Music Shop, including the following operations over data: create, read, update and delete.
The specification adheres to the OpenAPI standard using YAML.
### 1. Overview
> Identify and overview the modules that will be part of the application.
| Module | Description |
| -------- | -------- |
| M01: Authentication and User Profile | Web resources associated with the authentication of an user, along with resources associated with user information (name, adresses, etc). |
| M02: Management Area | Web resources associated with the management of the website. This includes viewing orders, editing, adding and deleting properties and categories. It also includes adding and deleting faqs. |
| M03: Products and Categories | Web resources associated with actions involving products (search, filtering and listing). |
| M04: Product and Reviews | Web resources associated with products (adding, editing and deleting products). It also includes all resources associated with products' reviews. |
| M05: Cart and Wishlist | Web resources associated with the cart and with the wishlist. |
| M06: Static Pages | Web resources with static content. These are the about, contact and faq pages. |
### 2. Permissions
> Define the permissions used by each module, necessary to access its data and features.
| Abbreviation | Name | Description |
| :--------: | -------- | -------- |
| PUB | Public | Users without privileges |
| USR | User | Authenticated users |
| OWN | Owner | Group of users that can update their profiles and have privileges regarding their purchases and reviews |
| BUY | Buyer | Authenticated user priviliges to add a review to purchased products |
| ADM | Administrator | Administrators |
### 3. OpenAPI Specification
OpenAPI specification in YAML format to describe the web application's web resources.
Link to the `.yaml` file in the group's repository.
Link to the Swagger generated documentation (e.g. `https://app.swaggerhub.com/apis-docs/...`).
[Online Music Shop OpenAPI specification in Swagger](https://app.swaggerhub.com/apis-docs/Online-Music-Shop/OnlineMusicShop/1.0.0)
```yaml
c
```
---
## A8: Vertical prototype
The Vertical Prototype includes the implementation of two or more user stories (the simplest) and aims to validate the architecture presented, also serving to gain familiarity with the technologies used in the project.
The prototype includes the implementation of pages of visualization, insertion, edition and removal of information; the control of permissions in the access to the implemented pages.
### 1. Implemented Features
#### 1.1. Implemented User Stories
The user stories that were implemented in the prototype are described in the following table.
| User Story reference | Name | Priority | Description |
| -------------------- | ---------------------- | -------------------------- | ----------------------------- |
| US01 | Homepage | High | As a Visitor, I want to access the homepage, so that i can reorient myself.|
| US02 | View product | High | As a Visitor, I want to view a product's page, so that I can see a detailed representation of it.|
| US03 | View product Reviews | High | As a Visitor, I want to view reviews of a product in the product's page, so that I can determine my purchase. |
| US07 | FAQ | Medium | As a Visitor, I want to be able to access the FAQ page, so that I can clarify my questions easily. |
| US09 | Sign in | High | As an Unauthenticated User, I want to authenticate into the system, so that I can access privileged information. |
| US10 | Sign Up | High | As a Unauthenticated User, I want to register into the system, so that I can authenticate myself into the system.
| US16 | Sign Out | High | As an Authenticated User, I want to sign out of the system. |
...
#### 1.2. Implemented Web Resources
> The web resources that were implemented in the prototype are described in the next section.
> Module M01: Authentication and Individual Profile
| Web Resource Reference | URL |
| ---------------------- | ------------------------------ |
| R101: Login Form | /login |
| R102: Login Action | POST/login|
| R103: Logout Action| POST /logout |
| R104: Register Form | /register |
| R105: Register Action | POST/register |
| R106: User Profile | /profile |
| R107: Edit User Profile Action | PUT/profile/edit |
| R108: Cancel User | PUT/profle/cancel |
> Module M02: Management Area
| Web Resource Reference | URL |
| ---------------------- | ------------------------------ |
| R201: Admin Area | /admin |
| R202: Add Category Action. Access: ADM. | POST/admin/category |
> Module M03: Products and Categories
| Web Resource Reference | URL |
| ---------------------- | ------------------------------ |
| R301: Products by category | /products/{category}|
> Module M04: Product and Reviews
| Web Resource Reference | URL |
| ---------------------- | ------------------------------ |
| R401: Add product review. Access: User. | POST/products |
| R402: Product id page | /product/{id} |
> Module M05: Cart and Wishlist
| Web Resource Reference | URL |
| ---------------------- | ------------------------------ |
| R01: Web resource name | URL to access the web resource |
> Module M06: Static Pages
| Web Resource Reference | URL |
| ---------------------- | ------------------------------ |
| R601: FAQ Page | /faqs |
| R602: About Page | /about |
| R603: Contact Page | /contact |
| R604: Contact Action | /POST/contact |
### 2. Prototype
> URL of the prototype plus user credentials necessary to test all features.
> Link to the prototype source code in the group's git repository.
---
## Revision history
Changes made to the first submission:
***
GROUP2165, 23/04/2021
* Carolina Rosemback Guilhermino up201800171@fe.up.pt
* Diogo Oliveira Reis, up201405015@fe.up.pt
* João Paulo Silva da Rocha, up201806261@fe.up.pt
* Henrique José de Castro Ferreira, up201605003@fe.up.pt