Giter Club home page Giter Club logo

comp-2406's Introduction

COMP-2406 Project Submission R Routly (101183371), Z Ali (101186150)

The project report can be found in this folder under the name: Razara_Movie_Database_Project_Report

Running the Server

  • Ensure the mongod daemon is running on your computer but navigating to the ‘bin’ file of the MongoDB program and running the command ‘mongod’. This must remain open in a separate terminal window while the project is tested.
  • Navigate to the base folder of the project in a terminal window
  • Run the command ‘npm install’ to install all required dependencies for the project.
  • Required dependencies: mongoose, pug, express, express-session, csv-parser
  • Initialize the mongo server with the provided base data and the beginning user data by running ‘node initialize.js’.
  • The initialize.js file currently will initialize the database with the 2500 film dataset provided. If this must be changed, find the constant “fileName” and change the path.
  • After the database is initialized, run the command ‘node server.js’ to start the server.
  • Open Google Chrome and go to ‘localhost:3000’ to see the application

Supported URL endpoints for pages that can be accessed in the application:

  • ‘/’ → Homepage of the application, offers links to the signup and login pages if no one is logged in. If no user is authenticated they will be redirected to this page
  • ‘/signup’ → Contains fields for username and password and a button to submit. Will not allow duplicate usernames.
  • ‘/login’ → Same format as signup but will log in a user that already exists in the database
  • ‘/logout’ → Redirects to the homepage and logs out the currently authenticated user.
  • ‘/addmovie’ → Contains form and instructions to submit a new user to the database, only accessible if the currently authenticated user is a contributing user.
  • ‘/addperson’ → Contains field for the new person’s name and a button to submit to the database, only accessible if the currently authenticated user is a contributing user.
  • ‘/advancedsearch’ → Three fields to enter information about title, cast, genre and a button that redirects to ‘/movies’ with the given parameters.
  • ‘/users/:id’ → Shows the page and information of the user with the id in the url. Page is different depending on if the requested user is currently logged in or not. If the user is the one currently logged in, further endpoints for accountType, watchlist, and following lists can be retrieved in json format with a GET request, or changed with a PUT request.
  • ‘/movies/:id’ → Shows the page and information of the movie with the id in the url.
  • ‘/movies’ → Accepts url parameters ‘title’, ‘person’, ‘genre’, and ‘page’ and parses then creates a database query for those parameters, resulting in a search result.
  • ‘/people/:id’ → Shows the page and information of the person with the id in the url.

comp-2406's People

Contributors

zaraahlie avatar

Stargazers

Nageeta Kumari avatar  avatar

Watchers

razz (they/them) avatar

Forkers

zaraahlie

comp-2406's Issues

addMovie endpoint functionality

Required: title, release year, runtime, plot, genre keywords

AT LEAST ONE OF EACH: writer, director and actor
(dynamically search for people within the database to add to the movie (e.g., using AJAX). The user should not be required to type in the full name of the person, but instead should be able to add the person as a writer, director, or actor directly from the search results)

addPerson endpoint functionality

Add a new person to the database by specifying their name. If the name already exists, the user should not be able to add the new person.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.