# [SpotMe](https://spotme-app.herokuapp.com/)
[![Contributors][contributors-shield]][contributors-url]
[![Issues][issues-shield]][issues-url]
[![Stargazers][stars-shield]][stars-url]
[![Forks][forks-shield]][forks-url]
![Build Badge][build-badge]
Finding a gym buddy to help maintain motivation for a long-term fitness regimen can be a challenging (and sometimes awkward) task... enter SpotMe!
SpotMe is a database-driven web application in which users can register with their gym(s) of choice, and find other registered users to share in their collective workout experience.
---
## Contributors
|Brian Fletcher|Caroline Tan|Ezzedine Alwafai|Gunnar Runkle|Scott Borecki|Taylor Varoglu
|--- |--- |--- |--- |--- |--- |
|[GitHub](https://github.com/bfl3tch)|[GitHub](https://github.com/carolinectan)|[GitHub](https://github.com/ealwafai)|[GitHub](https://github.com/gunnarrunner)|[GitHub](https://github.com/Scott-Borecki)|[GitHub](https://github.com/tvaroglu)
|[LinkedIn](https://www.linkedin.com/in/bfl3tch/)|[LinkedIn](https://www.linkedin.com/in/carolinectan/)|[LinkedIn](https://www.linkedin.com/in/ezzedine-alwafai/)|[LinkedIn](https://www.linkedin.com/in/gunnar-runkle/)|[LinkedIn](https://www.linkedin.com/in/scott-borecki/)|[LinkedIn](https://www.linkedin.com/in/taylorvaroglu/)
## Table of Contents
|Links
|--- |
[Tools Used](#tools-used)
[Setup](#setup)
[Learning Goals](#learning-goals)
[Database Schema](#database-schema)
[Wireframes](#wireframes)
## Tools Used
|Development|Development|Testing|Deployment
|--- |--- |--- |--- |
|[Ruby 2.7.2](https://www.ruby-lang.org/en/downloads/)|[Git](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)|[RSpec for Rails](https://github.com/rspec/rspec-rails)|[Heroku](http://virtual-watch-party.herokuapp.com)|
|[Rails 5.2.6](https://rubygems.org/gems/rails/versions/5.2.6)|[Github](https://desktop.github.com/)|[Capybara](https://github.com/teamcapybara/capybara)|[CircleCI](https://circleci.com/)|
|[Pry](https://rubygems.org/gems/pry/versions/0.10.3)|[Bootstrap](https://rubygems.org/gems/bootstrap/versions/4.0.0)|[Webmock](https://github.com/bblimke/webmock)
|[PostgresQL](https://www.postgresql.org/)|[HTML5](https://developer.mozilla.org/en-US/docs/Web/HTML)|[VCR](https://github.com/vcr/vcr)
|[Postico](https://eggerapps.at/postico/)|[CSS3](https://developer.mozilla.org/en-US/docs/Web/CSS)|[Launchy](https://rubygems.org/gems/launchy/versions/2.4.3)
|[OmniAuth Google OAuth2](https://github.com/zquestz/omniauth-google-oauth2)|[Rubocop](https://rubygems.org/gems/rubocop/versions/0.39.0)|[FactoryBot](https://github.com/thoughtbot/factory_bot)
|[Figaro](https://github.com/laserlemon/figaro)|[Atom](https://atom.io/)|[Faker](https://github.com/faker-ruby/faker)
|[Faraday](https://github.com/lostisland/faraday)||[SimpleCov](https://rubygems.org/gems/simplecov/versions/0.12.0)|
|[Postman](https://www.postman.com/product/rest-client/)|
## Setup
This project requires Ruby 2.7.2.
- Fork this repository
- From the command line, install gems and set up your DB:
bundle install && bundle update
rails db:{create,migrate}
- Run the test suite with
bundle exec rspec -fd
- Run your development server with
rails s
to see the app in action.
Project Configurations
-
Ruby version
$ ruby -v
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]
-
System dependencies
$ rails -v
Rails 5.2.6
-
Database creation
$ rails db:{drop,create,migrate,seed}
Created database 'spot_me_frontend_development'
Created database 'spot_me_frontend_test'
-
OAuth setup
#Gemfile
gem 'omniauth-google-oauth2'
gem 'omniauth-rails_csrf_protection'
$ bundle install
-
Google API setup
Visit https://console.developers.google.com
- Select your project
- From the Credentials section:
- Select the "OAuth consent screen" tab on top, and provide an 'EMAIL ADDRESS' and a 'PRODUCT NAME'
- Wait 10 minutes for changes to take effect.
-
Yelp API access
Visit https://www.yelp.com/developers/documentation/v3/get_started
- Sign up for an account
- To register for an API key, from within your account settings page:
- Click on your avatar or initials in the main navigation
- Click the "Settings" link
- Click the "API" link in the left sidebar
- Click "Create" or "click here" on the API page
- This repo will be utilizing the `v3` token.
-
API key configuration
$ bundle exec figaro install
Add your credentials & API keys to config/application.yml
:
#Frontend Repo:
GOOGLE_CLIENT_ID: <your client id>
GOOGLE_CLIENT_SECRET: <your client secret>
#Backend Repo:
yelp_api_key: 'Bearer <your v3 token>'
-
How to run the test suite
$ bundle exec rspec -fd
-
Local Deployment, for testing
$ rails s
=> Booting Puma
=> Rails 5.2.6 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.6 (ruby 2.7.2-p137), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
-
Heroku Deployment, for production
## Learning Goals
⭐ Consume two or more external APIs which require authentication
⭐ Build APIs that return JSON responses
⭐ Use an external OAuth provider to authenticate users
⭐ Create a project with a separate frontend and backend
⭐ Organize and refactor code to be more maintainable
⭐ Implement a self-referential relationship in ActiveRecord
⭐ Use Rails to create web pages that allow users to CRUD resources
⭐ Create instance and class methods on a Rails model that use ActiveRecord methods and helpers
⭐ Write model and feature tests that fully cover data logic and potential user behavior
⭐ Utilize Continuous Integration via Travis CI or CircleCI
⭐ Deploy to Heroku
⭐ Implement a production-quality user interface using Bootstrap or other common CSS styling framework
⭐ Implement project management by using project boards, participating in daily stand-ups and retros
⭐ Utilize quality workflow practices: small commits, descriptive pull requests, and code reviews
⭐ Write thorough, understandable documentation
⭐ Apply RuboCop’s style guide for code quality
Acknowledgements