A backend API built to store and dispatch data to the frontend UI
- User can keep track of the amount of water consumption in a day
- User can identify if water intake is less or more than target
- Add more functionalities
- Add more data like weight for accurate results
- Ruby
- Ruby on Rails API
- Heroku
- Postgresql
To get a local copy up and running follow these simple example steps.
git clone https://github.com/addod19/track_it.git
cd track_it
bundle install
rails db:create
rails db:migrate
rails s
- Ruby v2.7.1
- Heroku
- Rails v6.0.3
- To testing the signup page, copy this link into the URL
http://localhost:3000/signup
- Navigate to the params tab, input the key value pairs
name: "Janet"
email: "janet100@gmail.com"
password: "janet@12345"
- After clicking
send
we either expect a success or failure message, in our casesuccess
message as seen below: We expect ajson
response in the format
{
"user": {
"id": 3,
"name": "Janet",
"email": "janet100@gmail.com",
"password_digest": "$2a$12$j/H10rnnLa6K4AP0Eb2tvuMe5sldmMJqnJJMQtT.tXJItxOS4Vpkm",
"created_at": "2020-09-21T16:09:41.400Z",
"updated_at": "2020-09-21T16:09:41.400Z"
},
"token": "eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjozfQ._J97-icyhhe6kDqfNdWK2v-ItBEYDm8fVMT8cpdyzOE"
}
- To Test the Signin page
- copy this link
http://localhost:3000/signin
- Navigate to the params of postman, fill in the key value pairs,
email
andpassword
- Navigate to the
Authorization
tab, chooseOAuth1
as type, chooseRequest headers
underAdd authorization data to
- Navigate to the
Headers
tab, fill in the key value pairs,token
:asdfg.qwertty.cxzcbb.
- If we get a
200
or201
status code, signin successful otherwise401
or404
for failure
- copy this link
- run
rspec
Heroku create
git push heroku master
Heroku run rails db:migrate
Heroku open
👤 Daniel Larbi Addo
- Github: @addod19
- Twitter: @DanielLarbiAdd1
- Linkedin: Daniel Larbi Addo
- Email: Daniel Larbi Addo
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
- Fork it (https://github.com/addod19/track_it/fork)
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Give us a ⭐️ if you like this project!
- Hat tip to anyone whose code was used
- Inspiration
- etc
This project is Apache licensed.