{"id":22622664,"url":"https://github.com/nemwel-boniface/rails_fetch_be","last_synced_at":"2026-04-19T04:33:08.240Z","repository":{"id":241693550,"uuid":"805000474","full_name":"Nemwel-Boniface/rails_fetch_be","owner":"Nemwel-Boniface","description":"The purpose of the project is to serve as an API for my frontend React/ Redux project.","archived":false,"fork":false,"pushed_at":"2024-05-29T05:32:15.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-03-29T02:42:41.078Z","etag":null,"topics":["api","postgresql","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"https://rails-fetch-be.onrender.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nemwel-Boniface.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-23T17:29:13.000Z","updated_at":"2024-06-21T14:00:48.000Z","dependencies_parsed_at":"2024-05-29T18:16:32.947Z","dependency_job_id":"0be8148c-7e62-4c9a-a5df-f9d2410c13b6","html_url":"https://github.com/Nemwel-Boniface/rails_fetch_be","commit_stats":null,"previous_names":["nemwel-boniface/rails_fetch_be"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nemwel-Boniface/rails_fetch_be","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nemwel-Boniface%2Frails_fetch_be","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nemwel-Boniface%2Frails_fetch_be/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nemwel-Boniface%2Frails_fetch_be/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nemwel-Boniface%2Frails_fetch_be/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nemwel-Boniface","download_url":"https://codeload.github.com/Nemwel-Boniface/rails_fetch_be/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nemwel-Boniface%2Frails_fetch_be/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31995005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","postgresql","ruby","ruby-on-rails"],"created_at":"2024-12-08T23:17:23.745Z","updated_at":"2026-04-19T04:33:08.224Z","avatar_url":"https://github.com/Nemwel-Boniface.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails Fetch API\n\nThis repository is a Ruby on Rails-developed backend API-only application named **\"Rails Fetch API\"**. The purpose of the project is to serve as an API for my frontend React/ Redux project. The API features complete user authentication using [devise](https://github.com/heartcombo/devise) and [Devise JWT](https://github.com/waiting-for-dev/devise-jwt) gems that handle authentication. You can sign up to the application, sign in to the API, log out from the API, and fetch cat facts from this URL ```https://cat-fact.herokuapp.com/facts/```. The project also has a Front end repository which can be viewed [here (Cat Facts)](https://github.com/Nemwel-Boniface/cat_facts)\n\n**If you would like to have a better view of each individual feature implemented, please visit the [Pull Requests page](https://github.com/Nemwel-Boniface/rails_fetch_be/pulls) and have a look at the closed PRs where you will be able to see what was changed at what specific point in time.**\n\n\nEnjoy!\n\n\n## Built With\n- Ruby on rails v7.1.3.2\n- Ruby v3 +\n- PostgreSQL\n- Rswag Gem for API documentation (To be implemented)\n- Postman for testing API endpoints\n- Definitely lots of love :heart: and dedication :muscle:\n\n## Link to API Documentation\nTo view the available endpoints visit our ``` To be updated```\n\n## Link to FrontEnd app \nThe project Front end can be found [here](https://github.com/Nemwel-Boniface/cat_facts). To see the live version of the backed API, this is the base URL ```https://rails-fetch-be.onrender.com```\n\n\n## Hosting services\n\nThe project is deployed on [Render](https://render.com/) and is hosted on GitHub. To test the project, you can optionally use the hosted version base URL ```https://rails-fetch-be.onrender.com``` or clone it locally into your local machine as explained below:\n\n## Run the project on your local machine following these steps\n\n1. Clone the project ```git@github.com:Nemwel-Boniface/rails_fetch_be.git```\n\n2. navigate to the project directory ```cd rails_fetch_api```\n\n3. Install all dependencies of the project ```bundle install```\n\n### Setup your database:\n\n1. Create the database ```rails db:create```\n\n2. Load all the project schema ```rails db:schema:load```\n\n3. Migrate the project ```rails db:migrate```\n\n4. Load project seed data ```rails db:seed```. At the moment though there are no seed data.\n\n5. Start your rails server and run it on port 3000 ```rails s```. If port 3000 is occupied, you can load it with port 3001 with the following ```rails s -p 3001```. **This however means you need to update the port number in the front end URL**\n\n6. To check the API endpoints locally visit ```http://localhost:3000/api-docs```. The API URL page will be updated.\n\n\n## Testing the project online\n\nThe project base URL is ```https://rails-fetch-be.onrender.com```. The API allows you to perform a number of operations namely, Signing up, signing in, Fetching the cat facts, logout. Below I will elaborate on these with their endpoints and where applicable provide sample data.\n\n### 1. Sign up\n Endpoints for signing up is ```POST /signup``` sample data for signing up: **If it throws an error it means the user with this email already exists so maybe create with another email.**\n ```\n{\n   \"user\": {\n    \"username\": \"Nemwel Boniface\",\n     \"password\": 12345678,\n     \"password_confirmation\": 12345678,\n     \"email\": \"nemwel@gmail.com\",\n     \"photo\": \"https://images.unsplash.com/photo-1631131431211-4f768d89087d?q=80\u0026w=1470\u0026auto=format\u0026fit=crop\u0026ixlib=rb-4.0.3\u0026ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n   }\n}\n```\n\n### 2. Sign in\n Endpoint for signing in is ``` POST /login```. Sample login (with a valid user)\n ```\n{\n   \"user\": {\n     \"password\": 12345678,\n     \"email\": \"nemwel@gmail.com\"\n   }\n}\n```\n\n### 3. Fetch all cat facts (You need to be authenticated first)\n Endpoint for fetching all the cat facts is ```GET /cat_facts```. Respond with JSON data\n\n\n### 4. Log out from the application\n Endpoint for logging out is ```DELETE /logout```. Respond with JSON data\n\n\n**Please remember to pass the Bearer token in the header after you have logged in when testing from Postman. This will allow you to access the ```/cat_facts``` resources.**\n \n\n# Additional Tools\n  1. Rubocop\n  2. Ruby Gems\n\n### To run rubocop we use:\n\n1. `rubocop`\n\n### To autocorrect offenses with rubocop we use:\n1. `rubocop --auto-correct-all` or\n2. `rubocop -A`\n\n\nHave fun with Crushing any Rubocop offences you get!\n\n## Authors\n\n👤 **Nemwel Boniface**\n\n- GitHub: [@Nemwel Boniface](https://github.com/Nemwel-Boniface)\n- Twitter: [@Nemwel Boniface](https://twitter.com/nemwel_bonie)\n- LinkedIn: [@Nemwel Bonifacej](https://www.linkedin.com/in/nemwel-nyandoro/)\n\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome!\n\nFeel free to check the [issues page](https://github.com/Nemwel-Boniface/rails_fetch_be/issues).\n\n## Show your support\n\nGive a ⭐️ if you like this project!\n\n## Acknowledgments\n- To God be the Glory :pray: \n- Me for believing that I can! :sunglasses: \n\n## 📝 License\n\nThis project is [MIT](./MIT.md) licensed.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemwel-boniface%2Frails_fetch_be","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnemwel-boniface%2Frails_fetch_be","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnemwel-boniface%2Frails_fetch_be/lists"}