A backend Rails application for the Hifu mobile application. Video presentation of the applicaiton.
Hifu-api supports it's mobile application counterpart via a Rails + GraphQL api and multiple messaging microservices written in sinatra. The mobile application can post a hifu route to the api (see endpoints below), which is then stored in a postgresql database. A background worker checks for any routes that have expired (past the end_time
specified in the route
). Expired routes are then forwarded to the messaging microservices which contact the emergency contact on record.
Repositories related to this project include:
- Frontend mobile application hifu-mobile
- Backend Rails applicaiton (currently viewing) hifu-api
- Email Sinatra microservice sms_service
- SMS Sinatra microservice email_service
- Clone
- bundle
- rails db:{create,migrate,seed}
- rails s
- All endpoints are available at:
api/v1/
- The production version of this API is deployed to https://hifu-api.herokuapp.com/
-
createHifu
- description
- Adds an entire hifu record to the app
- arguments
- user:
- name: String
- email: String
- phone: Int
- address: String
- age: Int
- race: String
- gender: String
- satTrackerAddress: String
- bloodType: String
- allergies: String
- medicalConditions: String
- heightCM: Int
- weightKG: Int
- contact:
- name: String
- email: String
- phone: String
- route:
- startTime: String
- endTime: String
- activity: String
- partySize: Int
- notes: String
- waypoints: [ ]
- latitude: Float
- longitude: Float
- eta: String
- user:
- return fields
- user
- errors
- TBD
- description
checkIn
- description
- Removes a hifu record from the app
- arguments
- userEmail
- return fields
- user record that was removed
- errors
- TBD
- description
-
routeStartTime
- description
- Return info of single hifu
- arguments
- userEmail: String
- fields
- user
- errors
- "No user with email XXXX"
- description