You're given two random fast food menu items to choose from. Which one do you think has the most calories? Each correct answer gets you one point. Pick the wrong answer then it's GAME OVER. Try to make your way to the leaderboard!
Three web scrapers were used to gather data on fast food restaurants and their foods. One scraper was find the restaurant's logo, the second scraper was to scrape the food name and number of calories, and the last scraper was to match that food's name with their image. Any foods with less than or equal to 400 calories were excluded. Foods with a range of calories (e.g. 250-700 calories) were replaced with their average number. There are a total of 423 food items from 9 different restaurants.
Run Bundler
bundle install
Initialize database
rails db:create
rails db:migrate
rails db:seed
Start the backend server
rails s
Start the frontend server
cd frontend
npm start
[optional] Run the web scrapers from the root folder. This will take several minutes to complete and will not affect the game.
- Comment out lines 5-14.
- Uncomment out all lines below line 14.
rails db:migrate
rails db:seed
- Ruby - Backend language
- Ruby on Rails - Ruby web application framework
- React - Javascript frontend library
- React Bootstrap - CSS framework
- Nokogiri - HTML and XML parser
- Fast JSON API - Ruby serializer
This project is licensed under the MIT License.
- Thank you Alex Pugia for originally writing the frontend in plain Javascript.
- Thanks to Brady Pascoe, Ross Wakefield and Terry Sahaidak for helping me out with my code.
- Food data was scraped from Fast Food Nutrition.