Note

This version of the template contains some help and explanations. It is used for familiarization with arc42 and the understanding of the concepts. For documentation of your own system you use better the plain version.

1. Introduction and Goals

This document describes the work carried out in the Software Architecture course project. The goal is to create an application called Viade, a decentralized route management system based on the Solid architecture. It will consist of the principle of separating the information from the application giving the user the power to control their data.

Our system will be developed by a team of six students from the University of Oviedo.

In this documentation we will follow the Arc42 template.

1.1. Requirements Overview

The main requirement is to provide a system to store and display routes. The system will be based on a decentralized architecture where data storage is done locally for each user. An overview of the high-level requirements is shown below:

  • Users can store their data related with their routes in their own storage Pods.

  • Users can view the routes on a map.

  • The app will allow a user to share pictures, videos or information about a route with other friends.

  • A user can get notifications when some friend shares a route with him.

  • Users can have groups of friends with whom they may want to share a route.

  • It should be possible to view routes loaded by users that are using a different app, so interoperability with other route management systems should be taken into account.

1.2. Quality Goals

Quality attributes qualify functionality of the application. This table contains the main features Viade looks for.

Quality

Motivation

Decentralized

Avoid security issues, among others.

Usability

We want it to be able to be used and understood by any user.

Clean code and design

Most of our Stakeholders are developers so, it is relevant to maintain a clean product during its implementation.

Testability

The application should be easily testing.

1.3. Stakeholders

The following table shows the people interested in the application.

Role/Name Contact Expectations

Project sponsor

SOLID Team

They establish certain bases to be met in the development and operation of the application, also act as a help factor.

Teaching Staff

Teachers

Proof that the requirements are met and follow the project evolution.

Users

Potential users

Those possible users who use the application for the technologies used and their comfort.

Team

Development team

To develop the application that has been entrusted to us within the framework of the software architecture theme, fulfilling, at least, the basic requirements.

2. Architecture Constraints

2.1. Technical Constraints

Code Constraint Explanation

TC01

Implementation with React

The front-end will be developed with React, which is a JavaScript library for building user interfaces. It allows to compose complex IUs from single small pieces of code called components

TC02

Use of solid

The application must be developed following SOLID specifications with a decentralized control of user data

TC03

Cannot use a default pod

A pod will have to be implemented for each user of the application

TC04

Users will be able to visualize routes on a map

A geolocalization api will be used to show the users' routes

TC05

Friend list

Users can have a friends list, which will be other users to share content with

TC06

Push notifications

The application should allow you to send and receive notifications when another user from an application wants to share a route

TC07

Interoperability

Routes loaded by users from other SOLID applications must be visible by the application

2.2. Organizative Constraints

Code Constraint Explanation

OC01

Time limit

The project must be completed by 04/05/2020

OC02

Project budget

In the absence of a budget, resources are limited

OC03

Testing

The application will be tested during its development to ensure its correct operation

OC04

Team organization

The project will be developed in teams of 5-6 people

2.3. Conventions Constraints

Code Constraint Explanation

CC01

Version control source

Must be performed with Git, using the repository hosted in the GitHub service

CC02

Documentation

Implemented following the Arc42 structure template and using AsciiDoctor

CC03

Travis

We use it to deploy the project and we can test our libraries or applications against different configurations without having to have them installed locally

CC04

Codecov

We use it to check the test coverage

CC05

Codacy

We use it to check the quality of our code

3. System Scope and Context

What are the goals of the system?

The main idea of this project is to create a decentralised application to make routes for either running or whatever you wish plus being able to share this routes that you make with your friends and being able to use theirs aswell, in other words we are creating an application capable of connecting to SOLID, and using the SOLID tecnology, the SOLID pods, to let the users communicate between them in a safe and fast way, based on the principle on not storing any user information, and just allowing them to send it to the SOLID application.

use case
Figure 1. Use case

The communication is done throught the user´s pods. Anytime a user wants to store a route, or access to one his petition is communicated to their pod, and then he is able to access one of their routes, or the one their friends are sharing with them.

3.1. Business Context

This section shows a representation of the communication partners and stakeholders of our system, offering a more easy to understand graphical view of the business, and later explain more indepth in the technical context.

Table 1. Application context
Name Inputs Outputs

Transmitter

-

Routes to the application

The application (Transmitter)

Send routes

Data from transmitter to receivers pod(routes)

Transmitter pod

New data to store

-

Receiver pod

Data from transmitter application

Data to receiver application

Receiver

Received data from de application

-

3.2. Technical Context

For this applicacion we are using a couple of technologies, like SOLID, REACT, etc…​ the main idea is building an applicacion working with the technologies we mentioned earlier capable of working with SOLID and allowing SOLID users to save their routes and sharing them with friends in a safe way, the base part of the applicacion is gonna be done using REACT, while the communication is done using SOLID and its pods.

bussines context

4. Solution Strategy

Contents

For build this application we choice the programing language JavaScript. JavaScript is one of the most used languges in the web, and is adequate lenguage to develop solid applications because JavaScript support modulewise and is consistent with web applications.

We use a JavasCript librarie, React, to create user interfaces. With React we can make this web application in a more orderly way and with less code than if you use pure Javascript or libraries like jQuery focused on DOM manipulation. It allows the views to be associated with the data, so if the data changes, the views also change. This is a good technology to learn. For the user interface also use Bootstrap to save time in the creation of css style sheets.

However we want that our application communicate with the POD’s, removing any unneeded middle server.

We use Node.js, the main idea of ​​Node.js is to use the non-blocking and event-controlled input and output model to remain lightweight and efficient against real-time data usage applications that run on devices.

The path format is ".ttl" saving the paths in one folder and the multimedia in another. The ".ttl" file contains some links that refer to the multimedia, apart from this it stores the author’s name, name and description of the route, as well as the points on the map, which are stored in doublets (altitude and latitude). The repository used was github, which is very useful, since it has a section for assigning tasks as well as issues which are very useful for reporting bugs. Github version control is one of the best options it offers since it allows you to make changes and undo them.

To show the map we use the google maps api, which depending on the visits your application has is paid or not.

Considerations
  • All decisions were chosen to make the project in the best possible way following the principles of SOLID.

  • There are technologies that we have had to learn practically from scratch but they seem very powerful tools for web development.

Technology Decisions
  • Solid: by subject requirements.

  • Solid-file-client: a library for creating and managing files and folders in Solid data stores.

  • Node.js: JavaScript runtime built on Chrome´s V8 JavaScript engine.

  • Github: subject requirements, but still a really nice technology to use for version control.

  • React: by subject requirements, an open source Javascript library used to create and design interfaces.

5. Building Block View

The section shows the static decomposition of the system into building blocks as well as their dependencies.

As we have already said, we will follow SOLID architecture, so it is necessary to use the SOLID PODS. The system will have three main elements which communicate each others:

  • User: users will use Viade to manage their routes.

  • PODS: they will storage information’s users.

  • Viade: the app will communicate with users and pods.

5.1. Whitebox Overall System

Level 1

At a first place, there are two main modules, Viade and Solid Server. All Viade’s components communicate with Solid Sever.

Level 1

Contained building blocks

Name Responsibility

Viade

 The application which allows user manage its routes

Solid Server

Provides PODs that store each user’s information such as routes and friends.

Level 2

In this level there is the main view, In this level you will find all the containers which the user will interact.

Level 2

Contained building blocks

Name Responsibility

Login

It allows to log in to a Solid Server provider. Saves all the information of a route such as its coordinates, name, description, author…​

MyRoutes

Show user-created routes

MyFriends

List user’s friends and allows add and delete them

MySharedRoutes

Shows routes which have shared to user

NewRoute

Creates a route using a map for user can draw the coordinates

UploadRoute

Creates a route using a geojson or gpx file.

Register

It allows to sign up to a Solid Server provider.

NotificationHelp

Allows you to send a notification when a route is shared.

Level 3

This is the lowest level. It provides us the necessary logic to communicate with user’s pod.

Level 3

Contained building blocks

Name Responsibility

ViadeManager

 It is an intermediate layer between the frontend and the backend.Communicates with Storage.js as a service.

ParsePodFiles

To parser files .ttl.

Storage

Save routes.

FriendsHelper

Add and delete friends using LDFlex.

NotificationHelp

Send notifications when a route is shared.

Permisssions

Allows give permissions using ACL

Ldflex-helper

Manage folders and files

6. Runtime View

In this section, we will develop the main runtime views of use cases of our application.

6.1. Log in

Users must log in with their credentials in order to access the application and upload their data.

  1. The user opens the application and accesses the page to enter their data.

  2. The user enters his or her credentials.

  3. Credentials are checked for accuracy.

  4. The server deny the authentication.

  5. The server approve the authentication.

Log in diagram

Once logged in correctly, the user has 2 main options: to create a new route or to view his saved routes.

6.2. New Route

New Route diagram

To create a new route, the user must access the corresponding view of the application where a map is shown on which he must draw his route using points. Once drawn, the user must enter a name, a description, and if desired, photos and/or videos to save along with his route.

New Route diagram

6.3. My Routes

My Routes diagram

In the application, there is a view that shows all the routes that the user has saved so far. For each route you can see: name, author, description, the points of the route on the map and you can also share the route with your friends.

My Routes diagram

6.4. Upload Route

My Routes diagram

You can also create a route through a geojson or gpx file. The user enters the name and description of the route, he can also upload multimedia. Once you press the save button, you will be redirected to my routes, where the new route will appear.

Upload Route diagram

6.5. My Friends

My Friends diagram

This part of the application allows you to view the list of the user’s friends in session. It is also possible to add and remove friends. After these two actions, the page where the friends are seen will be reloaded, allowing us to see the update of the list of our friends.

My Friends diagram

6.6. Adding new friends

You can adding new friends to our list entering their webid and pressing the add button.

Adding Friends diagram

6.7. Deleting friends

If you want to delete a friend from the list, it is also possible by clicking on the delete button.

Deleting Friends diagram

6.8. Share routes

Share routes diagram

Our application allow us to share a route with some friends. When you visualize the routes, each route has a button where you can select the friends who you want to share the route with.

Share routes diagram

6.9. See shared routes with me

We can see the routes that users shared with us by clicking on the shared routes option in the navigation menu. The procedure is the same as loading my routes.

6.10. Notifications

When a route is shared with that friend, this friend receives a notification that follows this procedure:

Notification when share a route diagram

6.11. Some extra features

Although it was not requested we made some functionalities that are detailed below:

6.11.1. Download routes

We allow a route to be downloaded in two formats: in ttl format and in pdf

Download route in ttl format
Download route in PDF format

6.11.2. Modify routes

After creating a route we allow the name, description …​ to be modified.

Modify a route

6.11.3. Delete routes

We also allow a route to be removed.

Delete a route

7. Deployment View

At this section we will show the execution architecture of our system including the hardware and software infrastructure used to execute our application, the execution environement and the middleware connecting them. The overview is as follows in the next diagram.

7.1. Infrastructure

Deployment view diagram
Node Description

Users device

The hardware which the users are going to make use of the application, in the first instance a computer, but depending on the development of the project it could be a mobile device.

Web browser

Web browser to access the application.

ViaDe_es3c

Our application wich contains the index.html that is used by the users to interact with the app and the react components wich create that artifact.

GitHub

Web hosting server where our applications is allocated.

SOLID

The SOLID server where the users POD are contained and which the users have access to.

8. Cross-cutting Concepts

08 Crosscutting Concepts Structure EN

8.1. User Experience concepts (UX)

8.1.1. User interface:

We don’t use the Bootstrap library we thought it would be better to give it our own style. In this way, we decided to make a js file for each component named ComponentName.style.js. Our app has two interfaces: on the one hand, the reused login of inrupt and the other part is found once the session is started. This last part is entirely done by us: it has a navigation bar that allows us to access the list of routes, friends, create new routes …​ and in turn when entering these options we also find components of our creation and design. We have some components in the containers folder: MyFriends that would allow adding, removing and listing friends thanks to the InfoFriends component; MyRoutes that allows us to view the list of routes and see the information of each one thanks to the InfoRoute component; New Route that allows us to create new routes by adding the name, description and multimedia files …​

8.2. Domain concepts

Our domain diagram has three entities: one of them is the route that has a series of points and multimedia files. We also have the Point class that has the attributes longitude and latitude and the Multimedia class that counts on giving us information about the author, the date, the name, the url and the path they belong to since they are saved from that way in the pod the path will have a reference to the media files. Next, we can see this domain model

Domain model

8.3. Design patterns

Although we said that we would analyze this section more carefully later, we do not believe that we have used any specific design pattern.

8.4. Architectural pattern

Something we are sure about is the arquitecture of our project. We are going to work with two arquitectural patterns: n layers pattern and MVC pattern. These patterns will allow us to develop a maintainable and scalable application. On the one hand, we want to use 3-layers pattern. This pattern will allow to separate the presentation of the application, business where we have the logic and the persistence which in our case we will store the information of each user in its pod. Regarding the n-layer pattern, we could say that in some cases it was difficult to separate the business layer from persistence, since in some cases it did not require excessive complexity to obtain the data, for example in the case of friends. In this case, we use some React components that allow showing friends in the interface, but in the case of Routes it is much more complicated and it is necessary to obtain and parse those routes from the pod and then use a manager as an intermediate class as a service. that allows us to list those routes in the front. In other cases, such as adding or removing friends, we do use an intermediate class that allows us to remove and add them, but in this case we do not make a difference between the service layer and the persistence layer.

In addition, we are using React js to develop viade that also have its patterns. Content-container pattern is one of the React´s pattern and it consist on divide the component into two components: one component is responsible for obtaining the information - the container - and another component shows the information that is passed through its properties - the content.

8.5. Development concepts

We have to develop this application using React js and architecture SOLID. Moreover, we want to use Bootstrap library to simplify the design of the frontend. The app must meet the requirements so we are testing with diferent tools but we have not decided yet. In the end, as I said before, we did not use the Boostrap library since we wanted to make a design and a style of our own for our Viade application.

8.6. Security concepts

Today, the development of secure applications is one of the most important points. Therefore, our app is based on SOLID architecture so each user will identified itself with a WebId and it will deal with it personal data. When we are offered the option of sharing routes to maintain both the security and the right of our clients, what we do is give permissions to that route so that the friend can see the route instead of copying the route to his pod since this would imply less security and less privacy since the application would have more permissions than necessary

9. Design Decisions

Constraints
  • Use SOLID, a web descentralization project. Supports the librarie React.

  • Use React to desing the user interface.

Problems
  • We had to decide which libraries we would use to develop the application more easier.

  • We have had to learn new technology for develop our application.

  • We had to agree to choose a programming language to develop our application, taking into account the advantages and disadvantages of the language.

  • We have to decide between sharing routes giving permissions to the user´s friend or copying the route directly into his friend´s pod.

Consequences
  • We face new technologies that most of us either ignored or were not that familiar with, but we didn’t know how to use this technology, so we had to learn how to use it.

  • If we focus on using Node.js and JQuery it is more than enough to develop the application, since if we use more technologies, the project would be complicated because we would have to learn how to use it.

  • If we do not use JavaScript and use another programming language, the project would be very complicated, since JavaScript has a lot of support and SOLID also supports JavaScript.

Discarded alternatives
  • Use Angular.js, beacuse we use React.

  • Use scss, we discard using sccs "saas" because although it is a good technology for style sheets, it is a lot of learning load in two months.

Decisions
  • Using JavaScript because it supports solid and is a language that is not entirely new to us since we have a small idea of ​​how to use it.

  • Using React is not only because it is a condition to develop the application, but also because it is a very powerful JavaScript library that makes our lives much easier and makes the code cleaner.

  • Using the api of google maps for the routes.

  • Using LDflex to add, remove and list friends because its easier.

  • Using a the solid-acl-utils librarie to share routes with friends.

  • Using solid-file-client to manage SOLID files, folders in SOLID datastores.

  • Using solid-auth-client for perfoming autenticate requests to SOLID pods.

  • Using solid-auth-client and ledflex libraries to make notifications when sharing routes and sending them to the user´s inbox.

  • Using bootstrap to make style sheets and give the app and good visual design.

  • Using the microsoft Bing-COVID-19-Data repository excel we parse it using the Papa Parser library and converted to json, we filter it for date and we show the latest release.

10. Quality Tree

QualityScenarios

10.1. Quality Scenarios

Usability

We try to carry out a usable application design. This is reduced to following the principles of web usability, maintaining constant navigation and not forcing users to learn new ways for navigation in the different parts of the application. We also try not to abuse the animation as this could tire your eyes and become overwhelming. In addition to find out if it is also usable we resorted to the completion of a questionnaire that we sent to different people to test the app and tell us what their opinion was.

Modularity

We try to create a modular interface, that is, that each part of the application is a unique component that can have 0 or more within it and that each one takes care of its own functionality, which will allow our application be more maintainable and adaptable to change.

Compatibility

we wanted to create an app that could be viewed and worked with on different devices from computers to mobiles following the adaptive web design

Interoperability

We believe that viade is interoperable with other applications since we follow the specification determined in viadeSpec. Although it may not be interoperable with all applications, we believe that with a part of them it will be.

Accesibility

To test the accessibility of our application, we decided to contact people who may have problems viewing it due to some type of disability.

11. Risks and Technical Debts

The main problem in the development of the application is working with a new technology that isn´t very extended. This collides with the lack of time

Priority Risk Consequence Possible Solution

1

New technology

The project requires the usage of a new technology that is unknown for the developers

Initial period of investigation and learning of the needed tools

2

Time management

The previous point means that the development period has to be delayed(since the devolopers need to learn how to use the tecnology)

Rigurous organization and continuous communication between the members of the development team

3

Team organization

Working with other people in a team always leads to some problems

Productive meetings, establishing the task of each member and writting them in reports

11.1. Technical Debts

There are some aspects of our application that could be improved:

  • Don’t support altitude: We create routes with latitude and longitude, but not with altitude.

  • Group of friends: We don’t have groups of friends to share routes. As an alternative, when you’re going to share a route you can choose more than one friend thanks to a checkbox.

12. Glossary

Term Definition

AsciiDoc

It is a human-readable document format, semantically equivalent to DocBook XML, but using plain-text mark-up conventions.

arc42

arc42 is completely process-agnostic, and especially well-suited for lean and agile development approaches.

LDflex

It is a domain-specific language for querying Linked Data on the Web as if you were browsing a local JavaScript graph.

Node.js

It is a JavaScript execution environment oriented to asynchronous events, Node.js is designed to build scalable network applications.

Notation3 or N3

It it is more commonly known, is a shorthand non-XML serialization of Resource Description Framework models, designed with human-readability in mind: N3 is much more compact and readable than XML RDF notation.

POD

A user has a kind of box in which each of the users stores their data in these boxes, when the user connects to the Internet he can manage the data to which a website has access.

RDF

It is a family of World Wide Web Consortium (W3C) specifications originally designed as a metadata data model.

SOLID

Solid is a new project led by Prof. Tim Berners-Lee, inventor of the World Wide Web. The project aims to radically change the way Web applications work today, resulting in true data ownership as well as improved privacy.

Solid-File-Client

It is a JavaScript library with high-level methods to create, read, and manage files and folders.

Solid-acl-utils

It is a js library for working with acl files. It allows you to add/change/remove permissions of files and folders in solid pods.

Travis

It is a hosted continuous integration service used to build and test software projects hosted at GitHub and Bitbucket.

Turtle

It is a syntax and file format for expressing data in the Resource Description Framework (RDF) data model. Turtle syntax is similar to that of SPARQL, an RDF query language. It is a common data format for storing RDF data, along with N-Triples, JSON-LD and RDF/XML.

About arc42

arc42, the Template for documentation of software and system architecture.

By Dr. Gernot Starke, Dr. Peter Hruschka and contributors.

Template Revision: 7.0 EN (based on asciidoc), January 2017

© We acknowledge that this document uses material from the arc 42 architecture template, http://www.arc42.de. Created by Dr. Peter Hruschka & Dr. Gernot Starke.