make sure to add the api doc& setmore instruction. https://docs.google.com/document/d/1YNHI5z8y6Pia2VBBVT7Z_d1RO0sc_jGLNiaRCrRwlXk/edit?usp=sharing
One of the most effective ways of preventing substance overuse is to make sure someone stays with you while you use a substance. This, however, is not always an option for everybody. This Rails App (FE deployed endpoint) (BE deployed endpoint) was created in hopes of mitigating this issue. It lets a client create emergency contacts and start a timer when they are about to use a substance. If the timer is not stopped before it runs out, it will text their contacts with the client's address, map and other information pre-created by the client.
- Sign up and sign in using Google OAuth 2.0
- Create emergency contacts with their name and phone number
- Create timers with information such as:
- Duration in minutes (the only required information)
- Substance
- Dosage
- Entry Instructions and other notes
- Start a timer
- Cancel the timer before it goes off
- Ruby on Rails, RSpec, Heroku, CircleCI, PostgreSQL, Sidekiq
- Some of the gems: redis, pry, simplecov, vcr, webmock
- Versions
- Rails 5.2.6
- Ruby 2.7.2
- Fork and clone the repository
cd
in your local repo version and run the following commands- To install gems:
bundle
(if this fails, try tobundle update
and then retry)
- This API uses a few external APIs
- Add a local application.yml file at the root (this will be ignored in gitcoverage)
- Sign up for a free Twilio account Twilio
- Get an API key for Mapquest
- Add to your application.yml config:
mapquest_api_key: your_key_here
- To setup database:
rails db:create
rails db:migrate
rails db:seed
- To install gems:
- Run your own development server:
rails s
- BackEnd local server address is: "http://localhost:3000"
- Run the Redis server with
redis-server
- Run Sidekiq with
bundle exec sidekiq
This API consumes the following APIs:
- Twilio to send text messages
- MapQuest Geocoding API to provide map image