Click to open the PenPal app hosted on Heroku
PenPal is an interactive Rails web application built from conception to completion that authenticates with a third-party service (Google), consumes multiple APIs (Spotify and Pexel), and provides a solution to an identified problem.
PenPal is intended to support users in times when they are feeling down, unmotivated or alone. Interacting with the app, users are asked to complete a personal survey, after which they can record their current mood and receive a catered suggestion based on their stated preferences. Identified close friends are sent an introductory email notifying them that the user may occasionally connect with them. Suggestions from PenPal include a specific activity, song, image, a friend's contact information, or place to journal. Eventually, the app will have the ability to track moods and activities to help users learn more about themselves.
Object Oriented Programing principles, Restful Routing, Test Driven Development, Behavior Driven Development, Authenticated API calls, OAuth process
- Clone down this and the micro-service repo into a directory of your choice
$ git clone https://github.com/Not-Zorro/penpal
$ git clone https://github.com/Not-Zorro/penpal_api
- Change into the following directory
$ cd penpal_api
- Install the gem packages
$ bundle install
- Change into the other directory
$ cd penpal
- Install the gem packages
$ bundle install
- Set up the database
$ rake db:{create,migrate,seed}
- Run redis-server
$ redis-cli
- In a separate terminal tab, run the sidekiq process
$ bundle exec sidekiq
- In a third terminal tab, launch your local server
$ rails s
- Finally, visit
http://localhost:3000
in your web browser
Environment variables and required API keys/tokens:
- Google Token defined as
ENV['GOOGLE_TEST_TOKEN']
- Google client_id defined as
ENV['GOOGLE_CLIENT_ID']
- Google client_secret defined as
ENV['GOOGLE_CLIENT_SECRET']
- Spotify client_id defined as
ENV['SPOTIFY_CLIENT_ID']
- Spotify client_secret defined as
ENV['SPOTIFY_CLIENT_SECRET']
- Spotify Access Token defined as
ENV['SPOTIFY_ACCESS_TOKEN']
- Spotify Refresh Token defined as
ENV['SPOTIFY_REFRESH']
- Pexel API key defined as
ENV['PEXEL_API_KEY']
withinpenpal_api
- Whitelisted Spotify Redirect URI defined as
ENV['SPOTIFY_REDIRECT_URI']
- Penpal micro-service URL defined as
ENV['PENPAL_URL']
Run the full test suite:
$ bundle exec rspec
Run a single test file:
$ bundle exec rspec <path-to-file>
- Ruby 2.5.0
- Rails 5.2.4