{"id":15603400,"url":"https://github.com/alexwebgr/phonebook","last_synced_at":"2026-05-03T12:34:04.570Z","repository":{"id":42607225,"uuid":"198070489","full_name":"alexwebgr/phonebook","owner":"alexwebgr","description":"A Ruby on Rails api-only app with JWT token authentication that exposes a basic CRUD API for managing contacts in a phonebook.","archived":false,"fork":false,"pushed_at":"2022-08-10T14:04:47.000Z","size":44,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-09T00:29:43.056Z","etag":null,"topics":["api","jwt","rspec","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":null,"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/alexwebgr.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}},"created_at":"2019-07-21T15:01:52.000Z","updated_at":"2022-08-10T13:56:10.000Z","dependencies_parsed_at":"2022-09-15T03:20:27.024Z","dependency_job_id":null,"html_url":"https://github.com/alexwebgr/phonebook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexwebgr/phonebook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexwebgr%2Fphonebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexwebgr%2Fphonebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexwebgr%2Fphonebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexwebgr%2Fphonebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexwebgr","download_url":"https://codeload.github.com/alexwebgr/phonebook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexwebgr%2Fphonebook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32569713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","jwt","rspec","ruby","ruby-on-rails"],"created_at":"2024-10-03T03:03:07.225Z","updated_at":"2026-05-03T12:34:04.551Z","avatar_url":"https://github.com/alexwebgr.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Ruby Phonebook\nA Ruby on Rails api-only app with JWT token authentication that exposes a basic CRUD API for managing contacts in a phonebook.\n\n[Hosted in Heroku](https://sheltered-chamber-62543.herokuapp.com)\n#### How to register a user\n\nIn order to create a new user just call `POST /users` with the mandatory fields, first_name, last_name, email, password.\n\nThen try to login by visiting `POST /sessions/authenticate` and supplying the email and password of the user that was just created.\n\nCopy the `auth_token` and keep it somewhere safe, now you can make calls to the contacts API by passing the `auth_token` as a header like so \n`Authorization:Bearer \u003cauth_token\u003e`   \n\n#### Available endpoints\n* `POST /users` with the mandatory fields\n\n* `GET /contacts`\n* `POST /contacts` with mandatory fields\n* `GET /contacts/:id`\n* `PUT /contacts/:id`\n* `DELETE /contacts/:id`\n\nAlso available as a [postman collection](https://documenter.getpostman.com/view/1699252/SVSNKTQQ?version=latest)\n\n#### Instructions for running the app locally\nFirstly you will need ruby installed ideally by using a version manager like [rbenv](https://github.com/rbenv/rbenv)\nthat lets you have different versions of ruby per directory. This app is using Ruby 2.5.1 and Rails 5.1.7 \nit is also depending on postgreSQL to be installed on the host machine.\n\nRun `bundle install` to install all the gems listed in the Gemfile.\n\n#### Database\nA visual representation of the database is available under the `schema.xml` file just navigate \n  to this [URL](https://ondras.zarovi.cz/sql/demo/) and paste the contents of the file in the load window.\n\nMake sure that the database credentials listed in `config/database.yml` match the ones for the local database user.  \nIn order to create the database run `rails db:create` followed by `rails db:schema:load`\n\n#### How to run the test suite\nIn order to run the test suite just run `bundle exec spec`\n\n#### Starting the app\nYou can start the application server called 'Puma' by  running `rails s` in your terminal and stop it by hitting `CTRL + c`.\nAfter making any changes to configuration the server has to be restarted for the changes to take effect. \n\n#### Improvements\n* validate phone numbers with [telephone_number](https://rubygems.org/gems/telephone_number)\n* Add search endpoint in the contacts API\n* Introduce permission groups so only admin level users can manage other users\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwebgr%2Fphonebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexwebgr%2Fphonebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwebgr%2Fphonebook/lists"}