Group 14 Cloud Computing Coursework

Group Members:

Michael Capaldi - 210641428

Daniel Crake - 210744246

Philip Wurzner - 210930632

A fun web app which allows users to generate random Owen Willson movies and rate them. Rating the movies will add them to their own private user-specific lists which they can amend by changing scores and deleting entries. This webapp makes use of the external Owen Wilson API: https://owen-wilson-wow-api.herokuapp.com/wows/random

Hopefully this project will make you go: Alt Text

REST API Functions

The REST API is based on Python's Flask module and SQLAlchemy is used for object-relational mapping. The Google Cloud Platform is used to deploy the app and to home the persistent databases.

This web app features:

  1. User accounts (with personal user functions)
  2. Hashed passwords
  3. A Persistent cloud database (using GCP)
  4. Dynamically generated REST API
  5. Makes use of an extral database API
  6. Two Unique Datasets (Users and Movie_review)
  7. Advanced HTML Functionality

RESTful Services

1 GET

The GET request is preformed when a the homepage is visited and when the WOW button is pressed. THis function gets a randomly generated owen wilson movie from the extral API.

HTML Form on the homepage:

image

app.py handling of the GET method form:

image

2 POST

The web app makes use of 3 POST operations.

The first POST operation is used to allow a user to create an account on the /signup/ route.

HTML form (signup):

image

app.py handling of the User Signup POST:

image

the second POST operation is to allow a user to login:

HTML form (login):

image

app.py handling of the User Login POST:

image

the final POST operation is to allow a user to post a review to their list:

HTML form (homepage):

image

app.py handling of post request:

image

3 PUT

One PUT request is present to allow for the editing of personal list entries.

HTML form (homepage):

image

app.py handling:

image

4 DELETE

One DELETE request is present to allow for the removal of personal list entries.

HTML form (homepage):

image

app.py handling:

image

Setup

To set up the application you will need to start off by installing python to your machine as well as installing the required packages with the requirments.txt. Once this has been done you can clone the repository using the following command "git clone https://github.com/dancrake1/cloud_computing". This will include the application itself as well as the HTML templates reqired to run the app. Using the following command you will be able to run the app and display the Web Page WOW!: "python3 app.py". The below screenshot shows this being run in the termminal. For the purposes of our app and to ensure the functionality and storage of our databases we have run this on our virtual machine within the Google Cloud Platform.

image