Skip to content

Cougar Craves is a simple Node.js program targeted at BYU students that will generate either a place to eat or a random meal recipe, based on their preference of eating out or in.

Notifications You must be signed in to change notification settings

sherylgiovanni/cougar-craves

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cougar Craves

Cougar Craves is a simple Node.js program targeted at BYU students that will generate either a place to eat or a random meal recipe, based on their preference of eating out or in. The program can also store the student's dining preferences, along with the time stamps, that they can retrieve again later or even delete.

APIs

This program utilizes three APIs:

  • PersonsAPI (requires an access token)
  • MobileDiningServices API (requires an access token)
  • TheMealDB API (does not require an access token)

User Guide

Running the Program

1. Subscribe to the needed APIs

Before you start, you will need to subscribe to these two APIs in the WSO2 store and get a valid access token. image image

2. Connect to the AWS TRN, Oracle DB, and turn on VPN

This program requires connection to the AWS TRN, Oracle DB as well as VPN. Make sure that you are in AWS us-west-2 (Oregon) then copy and paste the PowerShell code to your terminal. Also, turn on the GlobalProtect VPN in order to be able to perform database functions within this program.

3. Clone this repository

On your terminal, run these lines of code separately. It will clone this repository, switch your current directory to the program's, and install NPM packages.

git clone https://github.com/byu-oit/tania-technical-challenge.git 
cd tania-technical-challenge
npm install

4. Run the program

Still on your terminal, type node index.

Congratulations, you have successfully run the program! Now, let's see how to navigate around and what functionalities it has.

Navigating Around the Program

When you first run node index, you will be prompted to type in an API token. Copy and paste it directly from the WSO2 API Manager. After that, you will be asked to type in your BYU ID.

image

Once the program validates both your API token, VPN connection, and BYU ID, it will greet you and display the main menu.

image

Now, you can either choose whether to log a dining idea, view your old records, or exit the program.

Get dining ideas

If you choose get dining ideas, you will be asked if you want to eat in or eat out today.

image

If you choose to eat in, you will be given a random recipe from TheMealDB API.

image

If you choose to eat out, you will be given a random place to eat around campus from Mobile Dining Services API.

image

You can also save these ideas to the database for future references. But if you do not wish to save them, you can just say No and you will be asked either to go back to main menu or exit the program.

Viewing previous records

If you choose to view your old records, the program will display a table with all the records we have of you in the database. On the other hand, if you have never saved any records before, it will simply tell you that we can't find any records in the database.

image

You can view/delete a specific record, delete all records, or go back to main menu. If you choose to view/delete a specific record, the program will give you a list of choice IDs to choose from.

image

If you choose to delete all records, you will be given a warning.

image

Exiting the program

Once you are satisfied with playing around the program, you can go back to main menu and exit.

About

Cougar Craves is a simple Node.js program targeted at BYU students that will generate either a place to eat or a random meal recipe, based on their preference of eating out or in.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published