About The Project | Created By | Built With | Setup | Endpoints | Tests | Roadmap | Acknowledgements
Welcome to Walk Safe! Created to empower individuals to walk alone, Walk Safe brings a user's community along from the trip. Utilizing Geolocation and SMS messaging APIs, we keep a user's community informed of their trip status from start to finish. Should an unforeseen trip interruption arise, Walk Safe will immediately alert the user's contact. We've got your back.
This repository contains our backend Rails app. This app makes calls to Google's Distance Matrix API and exposes API endpoints to our frontend React API. This project is deployed on Heroku (https://walk-safe-backend.herokuapp.com/ , endpoints only).
Caroline Eubanks GitHub LinkedIn
Peter Muellerleile GitHub LinkedIn
This project was tested with:
Continous Integration:
Deployed with:
git clone git@github.com:Walk-Safe/walk-safe-backend.git`
cd walk-safe-backend
bundle install
rails db:{create,migrate,seed}
bundle exec figaro install
from your terminal.config/application.yml
file and also adds it to your .gitignore
file so it won't get pushed to Github. config/application.yml
as shown belowgoogle_api_key: <your Google Maps API key>
account_sid: '<your Twilio SID>'
auth_token: '<your Twilio auth token>'
twilio_number: '<your Twilio phone number>'
rails s
bundle exec rspec
/graphql
Endpoints use a POST
method, relying on GraphQL to perform queries and mutations of data.
Find all users
{
allUsers {
firstName
lastName
username
contacts {
firstName
lastName
phoneNumber
}
}
}
Find one user (requires user id)
{
oneUser(id: 1) {
firstName
lastName
username
contacts {
firstName
lastName
phoneNumber
}
}
}
Create new user (requires: first_name, last_name, username)
mutation {
createUser(input: { firstName: "Claire", lastName: "Littleton", username: "lemonade" }) {
user {
id,
firstName,
lastName,
username
}
errors
}
}
Create new contact (requires: first_name, last_name, phone_number, user_id)
mutation {
createContact(input: {
firstName: "Charlie",
lastName: "Pace",
phoneNumber: "+12625558333"
userId: 10
}) {
contact {
id
firstName
lastName
phoneNumber
}
errors
}
}
Create new trip (requires: start_point, end_point, travel_mode, user_id) Note: possible travel modes are walking, bicycling, or driving
mutation {
createTrip(input: {startPoint: "Boulder CO", endPoint: "Longmont CO", travelMode: "bicycling", userId: 10}) {
trip {
startPoint
endPoint
travelMode
eta
etaString
userId
}
errors
}
}
Text messages are sent utilizing a restful route: https://walk-safe-backend.herokuapp.com/sms_messages
New SMS to contact
The team utilized a github project board to organize project issues and coordinate workflow across six members, two teams and two repositories. See the open issues for a list of proposed features (and known issues).
See the open issues for a list of proposed features (and known issues).
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Thank you to Google and Twilio for their free tiers allowing us to use their APIs in this project. We'd also like to thank @dionew1 and @Kalikoze of Turing School of Software and Design for their guidance and support during the development process!