Backend API for my React application. React Native Repo here (private for the foreseeable future)
Counter
s are the things that you can count, for example, Burger Flips, Deadlifts, or Meditation.
For timed activities such as meditation, the Counter will need dimension: 'time'
.
For weightlifting activities, the Counter may have dimension: 'weight'
.
Otherwise, dimension
will be 'default'
.
An Action
is an instance of a user performing an activity. It ties the Counter
to the User
, along with the number of reps (or minutes/seconds for a timed activity), and the weight (for a weightlifting activity).
/counters
- lists all the user-created counters that are able to be counted
/users/:id/actions
- lists all action entries for given user
Add the following environment variables. View ./sample.env
for examples.
NGROK_HTTP_HOST
DATABASE_USERNAME
DATABASE_PASSWORD
SENDGRID_DEVELOPMENT_KEY
Run rails s -p 3000
to start the app on port 3000.
Set the following using rails credentials:edit
:
sendgrid_production_key: your_key_for_production