ryandelonhull / 1UP-Videogame-Database

An app that let users find their favorite games, learn more about them, and be able to recommend them to their friends
https://oneupdb.herokuapp.com/
0 stars 2 forks source link

One Up Database

OneUpDB

Description

OneUpDB is an interactive database where video game fans use sign up and login functionality through passport, and bcrypt to create a profile on our database using mysql and sequelize that lets them search for their favorite video games using axios, express, and the IGDB api and curate a list of their favorites. Users can also add friends through our database and send them recommendations for games and also add a bio and profile picture to their profiles.

Motivation

We wanted to create an app that let users find their favorite games, learn more about them, and be able to recommend them to their friends.

Table of Contents

User Story

As a user I want to...

Tech Used

Installation

To install run Npm install while navigated to the directory you download this application to. To run the application locally, initialize a MySQL database called vgdb, then run node server.js in your terminal.

Usage

Simply create a profile with your name, email, password, and date of birth to start searching for video games, saving to your favorites, and recommending them to your friends!

search gif


Guest Account

We have created a guest account for those that wish to use our application but not create their own account.

Login: guest@guest.com

Password: password


Code Snippets

This code snippet displays the backend code to recommend games. Using the /api/recommend route called from the front end using a post method, it checks the database to see if the user you are trying to recommend to is already your friend, then checks the recommendations table to see if the recommendation already exists, then inserts the game id, recommender id and recommendee id into the recommendation table.

rec code snippet rec code snippet

This code snippet displays the code required to get an access token for IGDB. It requires a registered client ID and client secret, and the token it gives expires after a set amount of time. Each time a user logs in, this code is run to get a unique access token and store it in the user table.

access token axios

This code snippet displays the backend code that queries the IGDB database with the user input sent from the frontend. It requires an access token and a registered client ID. After the database is queried, the search html page is loaded and the results displayed.

axios search snippet

This gif displays our api-routes file.

gif of backend


Features

Deployed Link


Authors

Jon SanPedro

AJ Huff

Ry Hull

Credits/Acknowledgements

Thank you to Jerome, Roger, Manuel, and Kerwin for having us ready to take on a project like this.

License

License: MIT