Skip to content

Listen-Up-2210/listen_up_be

Repository files navigation

download (1)Listen Up Backend Service

Github CI Ruby Style Guide listen-up-preview animation of website

Table of Contents

About Listen Up

Our backend is the core of the sound-guessing game that powers the app. It holds and manages data on the various sounds that the user can play, and responds to requests from the front end to generate decks of sounds and track scores on the leaderboard.

When the front end requests a new game, the backend randomly selects 8 sound cards from the available pool of sounds and combines them into a deck. This ensures that each game is unique and challenging.

Once the deck is created, the front end can request sounds from the deck until it is empty. The backend keeps track of the user's score after the game, so they can compare their scores across other players and their past games.

Overall, our backend provides a seamless and engaging user experience, with a variety of sounds and challenging gameplay that keeps users coming back for more.

Deployed Sites

Learning Goals

  • Working with separate frontend and backend teams using agile methodologies
  • Self teach and implement GraphQL
  • Utilize PR templates and comments as part of managing git workflow
  • Implement Continuous Integration & Continuous Delivery
  • Focus on open and frequent communication across teams via Slack, Zoom, Miro board, & Github Project Board

Setup

This project requires Ruby 2.7.4

  1. Fork and clone this repository
  2. cd into the root directory
  3. Run bundle install
  4. Run bundle exec figaro install
  5. In app/config/application.yml add your API key
    FREE_SOUND_KEY: <API KEY GOES HERE>
    
    You can sign up for a freesound.org API key here
  6. Run rails db:{drop,create,migrate} to setup the databases
  • To run the test suite: Run bundle exec rspec
  • To load data into the development database via csv files: Run rake csv_load:all
    • If you wish to use your own data you can enter your own data in the csv files located in db/data/sound_cards.csv and db/data/wrong_answers.csv
  • To load data into the development database via google sheets: Run rake sheets_load:all
    • If you use Google Sheets you will also need to create a Google API key and add that to app/config/application.yml as GOOGLE_API_KEY: <API KEY GOES HERE>
    • Additionally if you want to create your own questions you will need to follow the format of the Sound Cards and Wrong Answers sheets and add your id into the URI in app/services/sheet_service.rb in the get_sheets method.
  • To enter queries via Postman: In the terminal run rails s and use the URL http://localhost:3000/graphql
  • To enter queries in GraphiQL: In the terminal run rails s and navigate to http://localhost:3000/graphiql in your browser

Tech Stack

Tech Stack flow chart

Database Schema

data base schema

API Queries and Mutations

As a graphQL API all requests should be sent as post requests to /graphql with the header "Content-Type": "application/json", click on a link below to see examples of query/mutation

APIs Used

freesound logo image

Backend Contributors

Ryan Canton Sam Cox Joe King
“” “” “” “” “” “”

Frontend Contributors

Angie Wirth Matt Rowan Natalie Kinsaul Robert Aiken Zac Walters
“” “” “” “” “” “” “” “” “” “”

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published