Skip to content

Installation and Configuration (Testing)

Akshat edited this page Apr 23, 2018 · 6 revisions

Setup Instructions

  • Clone this project repository in a local directory.
  • Open Intellij IDEA (recommended) or STS.

  • Click on import project and select the moovi folder.

  • Import this as a Maven Project. Click next.

  • Leave the default settings as it is. Click next.

  • Click finish and the project now opens up, loading the dependencies.

  • Go to File>Project Structure>Modules and select the Dependencies tab on the right. Add the dependency for JSON parser as follows:

  • Select json-simple-1.1.1.jar file which is inside the moovi directory and add this JAR file to the project.



Schema Creation and Running

  • Open MySQL Workbench and on your localhost, create the schema named moovi.
  • In the project, navigate to moovi>src>resources>application.properties and enter your localhost username and password to access the schema you created in the step before.

  • Run the MooviApplication file. This will populate the moovi schema in the localhost with all the required tables.
  • Go to MySQL Workbench and refresh the schema. Create a new query:

INSERT INTO `moovi`.`user` (dtype, dob, email, first_name, last_name, password, username) VALUES ("Admin","22-04-2018","[email protected]","admin","admin","admin","admin");

  • Open your browser and enter URL as:

https://localhost:8080/ This opens the Moovi Application for you. Welcome!

Create Users based on Roles

  • Go to Registration tab from the Navigation Bar above. Create a Role1 User(Fan) as follows:

First Name: Alice, Last Name: Alice, Username: alice, Password: alice, UserType: Fan, EmailId: [email protected], Date: 22-06-1887, Description: i am a fan

After submission of the form, the login window appears. Again click on Registeration window and repeat these steps for the following users: (For Role2 User(Critic))

First Name: Bob, Last Name: Bob, Username: bob, Password: bob, UserType: Critic, EmailId: [email protected], Date: 12-09-1987, Description: i am a critic WebsiteURL: bobimcritic.com

(For Role3 User(Ad Recruiter))

First Name: Charlie, Last Name: Charlie, Username: charlie, Password: charlie, UserType: Advertisement Recruiter, EmailId: [email protected], Date: 09-05-2011, Description: i am an ad recruiter

(For Role4 User(Theatre Manager))

First Name: Dan, Last Name: Dan, Username: dan, Password: dan, UserType: Theatre Manager, EmailId: [email protected], Date: 31-03-1999, Description: i am a theatre manager

OR

  • Run the following SQL queries in MySQL Workbench:
  1. INSERT INTO `moovi`.`user` (dtype, dob, email, first_name, last_name, password, username, fan_description) VALUES ("Fan","22-06-1887","[email protected]","alice","alice","alice","alice","i am a fan");
  2. INSERT INTO `moovi`.`user` (dtype, dob, email, first_name, last_name, password, username, critic_description, website_url) VALUES ("Critic","12-09-1987","[email protected]","bob","bob","bob","bob","i am a critic","bobimcritic.com");
  3. INSERT INTO `moovi`.`user` (dtype, dob, email, first_name, last_name, password, username, recruiter_description) VALUES ("AdRecruiter","09-05-2011","[email protected]","charlie","charlie","charlie","charlie","i am an ad recruiter");
  4. INSERT INTO `moovi`.`user` (dtype, dob, email, first_name, last_name, password, username) VALUES ("TheatreManager","31-03-1999","[email protected]","dan","dan","dan","dan","i am a theatre manager");
  • After creating the above users, click on the Moovi tab on the navigation bar to go to the homepage of the application.

Exploring Moovi Application

Note:

The Moovi Application is based on retrieving data from TMDb API (https://www.themoviedb.org/documentation/api) and clicking on the Search Movie or Search Actor tab again and again might not give any results if done in swift intervals because of Error Code 429 (Too many request calls). Please be patient while the initial data loads and kindly do not keep switching tabs between Search Movie and Search Actor swiftly as it will result in too many API calls and will retrieve no data. If the data is not loading, it is certainly because of Error Code 429 and to fix this, just go back to the homepage by clicking on the Moovi tab on the navigation bar and then try again.

Anonymous User Functionalities

  • Whenever any anonymous user clicks on the Search Movie tab on the navigation bar, the page loads up with Now Playing movies by default.
  • Similarly, when anonymous user clicks on Search Actor tab on the navigation bar, the page loads up showing the most popular actors.
  • The MySQL database table movie and actor get populated and also their relationship in the table movie_cast gets populated accordingly. The role of the API is just to fetch and initially populate the tables of MySQL database based on queries by user.
  • The anonymous user can freely browse Movies and Actors and even navigate to their official IMDb link provided corresponding to every movie and actor.
  • The anonymous user can click on any movie title or actor name to view more details about them which is retrieved from the MySQL database as they movies and actors searched have already populated the database tables.
  • If the anonymous user wants to recommend/review, follow another user/actor or like/dislike any movie or recruit an actor, he/she can navigate to the Login tab in navigation bar and login as either Fan/Critic/Advertisement Recruiter/Theatre Manager.

Fan

  • After logging in as the Fan, you will get navigated to the HomePage of the fan, with different cards having different functionalities. Initially, you might not see any data when you click on any card as the user data is empty. In order to view the data, you will need populate the user data.
  • First, click on Search Movie tab. After the page has loaded with the Now Playing movies, you can like or dislike any movie out of the ones already loaded or you can search for any movie and like or dislike the movie.
  • Second, click on Search Actor tab. After the page has loaded with the Most Popular actors, you can follow any actor out of the ones already loaded or you can search for any actor and follow him/her.
  • If you have multiple registered users as Fans in your database, you will be able to see all of them in the Search Fan tab and from there on, you can follow them too. Initially, only Alice is a fan, so no data is shown in Search Fan tab.
  • Thrid, click on Search Critic tab to see the list of all the registered critics in the database. Initially you will see Bob as critic. You can follow Bob and any other critic shown in the list.
  • Lastly, you can go to your Home tab and click on any of the card to see the above results reflected.
  • In each of them, you can revert the actions you took eg. you can unfollow an actor or a critic, or remove a liked movie or a disliked movie, etc.
  • Click on Logout tab to continue as another user.

Critic

Clone this wiki locally