Skip to content

CodeURJC-DAW-2022-23/webapp9

Repository files navigation

webapp9 | TripScanner

Showcase video

Showcase video

Index

  1. Phase 0 additions
  2. Phase 1 additions
  3. Phase 2 additions
  4. Phase 3 additions
  5. Phase 4 additions

Phase 0 additions

Team members and info

Here you can find information about the members that form the developer team for TripScanner

Name Surname URJC Mail Github
Marcos Ferrer Zalve m.ferrer.2020@alumnos.urjc.es @LovetheFrogs
Anna Trofimova a.trofimova.2020@alumnos.urjc.es @anna-trofimova
Iván Penedo Ventosa i.penedo.2020@alumnos.urjc.es @xIvqn
Adaya María Ruíz Mayoral a.ruiz.2020@alumnos.urjc.es @AdayaUwU

Team Organization

The team will be organized using the intregration with the native GitHub Projects. That way, team members can use GitHub Issues and other GitHub options to automate the workflow of the web application development. GitHub Project can be accessed through the following link.

App features

Here you can see the features of our web application TripScanner.

Entities

We'll have the following entities users, places, destinations and itineraries.

Shows an illustrated sun in light mode and a moon with stars in dark mode.

User privileges

Our web app will have the following types of users:

  • Unregistered users: Not registered users can search for itineraries, destinations and places, but can not save them anywhere.

  • Registered users: Registerd users can do the same as unregistered ones, but they can also create new itineraries (either public or private), save public ones and edit them privately. Registered users also have a personal account in the website where they can create a biography and change their profile picture and how they appear to other users.

  • Administrator: Administrators can do all the previous tasks. They can also edit the public itineraries and create new ones, add new places and destinations.

Images

Out of our four entities, three of them will have images asociated to them. Users will have a profile picture of their liking, places will have a photo of them and destinations will have a picture of an iconic landmark they have.

Graphs

Inside each destination, users will be able to see a bar graph containing the most popular places inside them. There will also be a graph in the main page where you can see the most popular destinations.

Aditional technologies

The app will be able to send confirmation emails to users when they register, and anytime they save or edit an itinerary.

It will also be able to generate pdf documents with a selected itinerary that a user has saved.

Our app will use the OpenStreetMap API which is an Open Source map API. We will also be using SkyScanner's and TripAdvisor API to get information about hotels, destinations and flights.

Advanced algorithms

TripScanner will have a selection of algorithms. These are:

  • An algorithm to search for the shortest path between places of an itinerary.
  • A search algorithm with different search criteria, for both places and destinations.

Back to top

Phase 1 aditions

Webpage screenshots

Here you can see screenshots of the webpage developed during phase 1.

image

The main page will show popular itineraries, destinations and places. Those are the ones most seen by the users. It will also allow for manual search using the search bar, and login into your account.

image

The login popup allows users to log into their account or create an account if they don't have one.

image

The registration page allows for unregistered users to create a new account to get all the features of TripScanner.

image

Results are shown after using the search bar and can be filtered by public results or private ones you have created as a registered user. You also have a number of filters to narrow down the search results.

image

The details of an item are shown when you click on it and show some more information about it.

image

Registered users can see their profile information here, as well as editing it, and their itineraries.

image

At last, administrators can see a panel with the options they have. This panel (as well as the user information one) is not accesible yet by navigating through the webpage.

Navigation diagram

Diagrama DAW-3-1

Back to top

Phase 2 additions

Webpage screenshots

image

The main page will show popular itineraries, destinations and places. Those are the ones most seen by the users. It will also allow for manual search using the search bar, and login into your account.

image

The login page allows users to log into their account or create an account if they don't have one.

image

The registration page allows for unregistered users to create a new account to get all the features of TripScanner.

image

The search page allows to search for an specific keyword, as well as filter the results showed.

image

The details of an item are shown when you click on it and show some more information about it.

image

Registered users can see their profile information here, as well as editing it, and their itineraries.

image

This page shows a registered user created and saved itineraries, as well as allowing them to create new ones.

image

Administrators can see a panel with the options they have. Here they can filter by users, itineraries, places or destinations, as well as editing existing entries or creating new ones.

image

The views for adding a new element or user to the webpage are all the same, so the add new destination one is shown for reference.

image

Users can edit the itineraries they own, similarly to admins being able to edit all itineraries.

image

They can also edit their profile. This view is similar to the register page.

image

Users can generate a pdf of an itinerary and download it.

image

An email is sent when a user registers to the app.

image

An email is also sent if you change the email you have linked to your account.

navigation

Finally, above is the updated navigation diagram of the webpage.

Executing instructions.

In order to execute the app, you will need to follow this steps:

  1. Install all the needed dependencies. This are:

    • Git bash. Use command sudo apt get install git to install.
    • Java version 11. Use command sudo apt get install openjdk-11-jdk to install.
    • Maven. Use command sudo apt get install maven to install.
  2. Once you have all the required dependencies, clone the repo from github using the commad git clone https://github.com/CodeURJC-DAW-2022-23/webapp9 and login to your github account.

  3. After cloning the repo to your local machine, go to the directory where the repository was cloned and navigate to the root directory of the spring-boot project by using the command cd webapp9/TripScanner.

  4. Finally, use the command mvn spring-boot:run to boot up the project and navigate to https://localhost:8443 to use the website.

Database entity diagram

Below there is an entity-relationship diagram that shows the database entities, its fields and the relations between them.

Entity-Relationship Diagram

Class and templates diagram

This is the class diagram of TripScanner.

Diagrama de clases y templates

Members participation

Here, each member of the team shows what they have contributed to during the development of this phase.

  1. Adaya María Ruiz Mayoral

  2. Ivan Penedo Ventosa

  3. Anna Trofimova

  4. Marcos Ferrer Zalve

Back to top

Phase 3 additions

API REST Documentation

The API REST documentation has been generated using OpenAPI specification. As so, it has been automatically generated into a .yml and .html file. Both files are accessible from this repository, through the following links:

Updated classes and templates diagram

The classes and templates diagram has been updated with the new @RestController classes. Please note that the @Service classes have been implemented before, in the Stage 2.

Phase3DAW

Docker

In the following sections, it'll be explaned everything about the Docker usage in the application, including the execution of the dockerized webapp and the building of the docker image

Executing dockerized application

To run the Docker image using the docker-compose.yml file you might need to install Docker first:

These are the instructions to run it:

  1. Open a terminal.
  2. Clone this repository using git clone https://github.com/CodeURJC-DAW-2022-23/webapp9.git.
  3. Go to the docker folder using cd webapp9/docker.
  4. If you use Mac M1, you also need to run command docker pull --platform linux/x86_64 mysql.
  5. Run the docker-compose.yml file using docker-compose up.
  6. Now you've got both webapp and API running on https://localhost:8443.

Building docker image

To build the Docker image using the create_image.sh file you might need to install Docker first as the previous step shows.

After that, you should:

  1. Cretae an account on DockerHub and log-in locally.
  2. Open a terminal.
  3. Clone this repository using git clone https://github.com/CodeURJC-DAW-2022-23/webapp9.git.
  4. Go to the docker folder using cd webapp9/docker.
  5. Run ./create_image.sh %username%/tripscanner-webapp replacing %username% with your DockerHub username.

Members participation

Here, each member of the team shows what they have contributed to during the development of this phase.

  1. Adaya María Ruiz Mayoral

  2. Ivan Penedo Ventosa

  3. Anna Trofimova

  4. Marcos Ferrer Zalve

Back to top

Phase 4 additions

Development Environment Instructions

Follow the steps to set up your environment to develop the Angular application:

  1. Open a terminal.
  2. Clone this repository using git clone https://github.com/CodeURJC-DAW-2022-23/webapp9.git.
  3. Go to the angular project folder using cd frontend/angularclient/.
  4. Initialize the node project using npm i.
  5. Install Angular CLI using npm i -g @angular/cli.
  6. Run the angular application on development mode using ng serve --proxy-config proxy.conf.json.
  7. Now you've got the Angular applciation running on https://localhost:4200.

For the Angular application to work properly, make sure you have the API and the MySQL database up and running on its specified ports. See documentation above for help.

Classes and templates diagram (SPA)

New classes and templates diagram has been created with Angular componenets, templates and services.

Phase4DAW

Deployment instructions

In this section we will explain the steps that we have taken to achieve the deployment of our app on a URJC virtual machine.

  1. We connected to the machine via SSH using the following command: ssh -i appWeb-09 vmuser@10.100.139.31
  2. We installed Docker and Docker Compose on said machine. Since the machine's operating system is Ubuntu 22.04, we followed the instructions provided on the Docker docs website for that operating system.
  3. We cloned our app repository using the following GIT command: git clone https://github.com/CodeURJC-DAW-2022-23/webapp9
  4. We finally deployed our application by using the docker-compose.yml file and, in order for the app to keep running after closing the SSH connection, we ran it in background by using the following command: docker compose up -d

In order to connect to our app, these are the links that can be used:

Notes:

  • The appWeb-09 file might need execute permissions for step 1. Use chmod 600 appWep-09 to change them on a Unix terminal.
  • Both web application and virtual machine are only accessible through the private URJC network.

Showcase video

Showcase video

Members participation

Here, each member of the team shows what they have contributed to during the development of this phase.

  1. Adaya María Ruiz Mayoral

  2. Ivan Penedo Ventosa

  3. Anna Trofimova

  4. Marcos Ferrer Zalve

Back to top