GithubHelp home page GithubHelp logo

juliamazey / foodroulette Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nagerz/foodroulette

0.0 1.0 0.0 15.84 MB

Ruby 76.47% JavaScript 1.52% CoffeeScript 0.49% CSS 6.82% HTML 14.63% Shell 0.08%

foodroulette's Introduction

Food Roulette

Food Roulette is an app designed to help users decide where to eat, either alone or in a group. Users can ‘roulette’ to get a random restaurant selected for them from the Yelp API based on their location. They can also get a selection of three restaurants that they can send to their friends via text as a survey. Survey participants can then vote for a winner using text messaging and will be alerted when a winning restaurant is selected.

Prerequisites

  • Requires PostgresSQL database

Local Setup

Clone the project and enter the directory

git clone https://github.com/csvlewis/foodroulette.git
cd FoodRoulette

Bundle, migrate, and seed the database

bundle
rake db:{migrate, seed}

Launch redis and sidekiq in separate terminal windows

redis-server
bundle exec sidekiq

Launch a local server

rails s

Install Figaro to create a config/application.yml file

bundle exec figaro install

In order for the server to run locally, you will need keys from the Yelp API, Google OAuth, Twilio, and Google Places API. The appropriate keys will go in your config/application.yml file under the following names:

YELP_API_KEY: 
GOOGLE_CLIENT_ID: 
GOOGLE_CLIENT_SECRET: 
TWILIO_ACCOUNT_SID: 
TWILIO_AUTH_TOKEN: 
TWILIO_PHONE_NUMBER: 
GOOGLE_PLACES_API_KEY:
API_URL: http://localhost:3000

The API_URL is needed for an internal api endpoint uri that is different in production.

Site Functionality

When you visit the site for the first time, you will be asked to login by connecting to your Google account.

Google OAuth Login Page

After doing so, you will be directed to the home page, where your browser may ask to use your current location. If you do so, that location will be used as your default location in searches. At any point, you can access the nav bar to return to the home page, view the site’s ‘About’ section, or visit your profile page which will keep track of your last few restaurant visits.

Home Page

If you want a restaurant recommendation, you can type a location in the search bar and click ‘Roulette Now’. You will be taken to a new page where a selected restaurant is displayed.

Roulette Now Page

On this page you can see some basic information about the restaurant. From this page you can do a few things. You can click the name of the restaurant to open a tab with that restaurant’s Yelp page. You can click ‘Take Me There!’ to get Google Maps directions from your search location to the restaurant. Finally, you can click ‘Roulette Again’ to get another restaurant recommendation.

If you want to send out a group survey, you can go back to the main page, type a search location into the search bar and click “Survey Them!”

You will be taken to a new page where three selected restaurants are displayed. Each restaurant’s name is a link to that restaurant’s Yelp page, and you can click “Roulette Again” to get three new recommendations.

Group Roulette Page

If you click “Send to Friends”, you will be taken to a form where you can enter some information to create a survey. After entering your name, your friend’s phone numbers separated by commas, an event name, and an optional event time, a survey for the three restaurant recommendations will be sent out to each phone number that was entered.

Survey Form Page

The user who created the survey will be presented with a page where they can vote for a restaurant in the survey.

User Voting Page

Then they will be redirected to a survey results page where they can see the voting results for the survey updating as their friends submit votes.

Survey Results Page (active)

Each friend whose phone number was listed in the survey creation form will receive a text describing the restaurant voting options with directions on how to vote. After they respond with a 1, 2, or 3, they will receive a confirmation text with a link to the same voting results page that the user sees.

Sample Voting Texts

After all votes for the survey have been received or the original user manually ends the survey, the survey results page will update to show the winning restaurant.

Survey Results Page (closed)

Each friend will also get a text message letting them know that the survey has ended and informing them of the winning restaurant.

Testing

Sweater Weather uses RSpec for testing. To run the full test suite, run RSpec from the terminal.

    bundle exec rspec

Individual tests can be run by specifying the desired file path and line number. For example,

    bundle exec rspec spec/features/nav_bar_spec.rb:28

will run the item model test that is found in that file on line 28.

Live Site

Built Using

  • Ruby on Rails
  • PostgreSQL
  • Redis
  • Sidekiq
  • HTML, CSS, JavaScript

Created By

foodroulette's People

Contributors

csvlewis avatar aprildagonese avatar juliamazey avatar nagerz avatar

Watchers

James Cloos avatar

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.