Skip to content

Installing & Running FakeFlix on MacOS

Required Software

First, install node, which includes the Node Package Manager (npm):

you can run the installation package that you download from the Node website. Be sure to follow the instructions for running the installer carefully to install the latest LTS version (version 20.17.0 as of the release of this assignment).

If you already have npm installed, you can upgrade to the latest version using the following commands:

  1. Clear your npm cache

  sudo npm cache clean -f
2. Install the n Node version manager

  sudo npm install -g n
  1. Upgrade your version of node to the latest stable version
  sudo n stable

Installing FakeFlix

The following commands should be executed in the terminal. These were tested with the bash shell, although the zsh shell should also function properly.

  1. Clone the project
  git clone https://github.com/UCF-CEN-5016/Fakeflix-UCF
  1. Navigate into the project directory
  cd fakeflix
  1. Install dependencies using the Node Package Manager
  npm install
  1. Create a .env file
  touch .env
  1. Next, we need to get an API key so that FakeFlix can download movie data to dsiplay in the app. We will be using a website called TMDB to accomplish this. Navigate to The Movie Database (TMDB) and sign up for a free account. You can do this by clicking on the menu option highlighted in red in the screenshot below. When asked for the registration reason, you can state that you are learning React programming for a university class.

TMDB API Sign up

  1. After registering for the API, Navigate to the API settings page that contains your API key, as illustrated below. Copy the "API Key", you will not use the "API Read Access Token".

TMDB API Settings and Key

  1. Next, open your .env file that you created in Step 4 (you may need to enable your file explorer to show hidden files) and add the lie below, replacing the right hand side with the TMDB API key that you copied. Save the File and move onto the next step.
REACT_APP_API_KEY=TMDB_API_KEY
  1. Fakeflix uses the Firebase service's real-time database and cloud authentication features to enable sign ups and persist user data across sessions. To get the app to work properly, you will need to sign up for a Firebase account and enable these features. First, navigate to the Firebase website, and sign up for a free account. Then, create project called "FakeFlix" as shown below:

Firebase Create Project Page

On the next screen, you can enable the Google Analytics and click "continue" as shown below.

Firebase Create Project Page

When asked to configure the account for Google Analytics, you can use the default account, as shown below.

Firebase Create Project Page

Within your Firebase project, create a webapp by clicking on the Icon as indicated below:

Firebase Create Project Page

Call your webapp "FakeFlix", do not enable hosting, and then click on the "Configure App" button, as shown below.

Firebase Create Project Page

The next screen will show the API configuration for your app. Copy the Firebase Configuration text as shown below and paste in a temporary text file, we will come back to this information later. Finally, click on the "Continue to Console" button.

Firebase Create Project Page

Once you are back at the Firebase project console screen, it's time to enable the FireStore database. Open the "Build" menu on the left-hand side of the screen and then click on the "Firestore Database" option, as shown below.

Firebase Create Project Page

On the next page, click on the "Create Database" button, as shown below.

Firebase Create Project Page

On the first configuration screen, leave all of the settings as default and click on the "Next" button, as shown below.

Firebase Create Project Page

On the second configuration screen, be sure to change the database mode from "production mode" to "test mode" as shown below. Then click on the "Create" button. It will take a few minutes for Firebase to provision the database.

Firebase Create Project Page

Now that the Firestore database has been provisioned, we need to enable user authentication. To do this, go back to the Firebase console, open up the left-hand menu, and click on the "Authentication" option, as shown below.

Firebase Create Project Page

On the next screen, click on the "Get started" button to set up user authentication, as shown below.

Firebase Create Project Page

On the resulting configuration screen, click on the option for "Email/Password", as shown below.

Firebase Create Project Page

On the second configuration screen, ensure that both options for "Email/Password" and "Password-less Link" are both enabled, as shown below.

Firebase Create Project Page

Your Firebase account is now completely configured, and you can finish setting up your app!

  1. Next, take the Firebase configuration that you copied earlier, and format as shown below, and insert this into your .env file underneath the line that contains your TMDB API key.
REACT_APP_FIREBASE_API_KEY=REACT_APP_FIREBASE_API_KEY
REACT_APP_FIREBASE_AUTH_DOMAIN=REACT_APP_FIREBASE_AUTH_DOMAIN
REACT_APP_FIREBASE_PROJECT_ID=REACT_APP_FIREBASE_PROJECT_ID
REACT_APP_FIREBASE_STORAGE_BUCKET=REACT_APP_FIREBASE_STORAGE_BUCKET
REACT_APP_FIREBASE_MESSAGING_SENDER_ID=REACT_APP_FIREBASE_MESSAGING_SENDER_ID
REACT_APP_FIREBASE_APP_ID=REACT_APP_FIREBASE_APP_ID
REACT_APP_FIREBASE_MEASUREMEMT_ID=REACT_APP_FIREBASE_MEASUREMEMT_ID
  1. Finally, you can start the server! Running the command below should compile and run the app, opening the app in your browser window.
  npm start


🧪 Testing

To run the project linter, run:

  npm run lint

To run the jest test suite, run:

  npm test