Documentation Overview The service is a simple contact API, which follows REST architecture, service connects to the third party client Tools Service is designed on Ruby-on-Rails framework using mongoDB. Deployment Deployment haven’t changed from the first phase. Service architecture Here is table of all actions, routes and controllers in the service, bold – done by us. Prefix Verb URI Pattern Controller#Action contacts GET /contacts(.:format) contacts#index
POST /contacts(.:format) contacts#create
new_contact GET /contacts/new(.:format) contacts#new edit_contact GET /contacts/:id/edit(.:format) contacts#edit contact GET /contacts/:id(.:format) contacts#show PATCH /contacts/:id(.:format) contacts#update PUT /contacts/:id(.:format) contacts#update DELETE /contacts/:id(.:format) contacts#destroy
root GET / contacts#index
new_user_session GET /users/sign_in(.:format) devise/sessions#new user_session POST /users/sign_in(.:format) devise/sessions#createdestroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy user_password POST /users/password(.:format) devise/passwords#create new_user_password GET /users/password/new(.:format) devise/passwords#new edit_user_password GET /users/password/edit(.:format) devise/passwords#edit PATCH /users/password(.:format) devise/passwords#update PUT /users/password(.:format) devise/passwords#update cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel user_registration POST /users(.:format) devise/registrations#create new_user_registration GET /users/sign_up(.:format) devise/registrations#new edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PATCH /users(.:format) devise/registrations#update PUT /users(.:format) devise/registrations#update DELETE /users(.:format) devise/registrations#destroy
GET contacts Contacts#authorise POST contacts Cintacts#sync GET POST Authentification The authentication process was automatically generated by devise library, this allows user to create account, login, logout, uprate profile, change password and delete profile. In phase #2 the user can login with third-party provider (google). The authentication can be done with html or json requests.Contacts use cases The user can create new contact, view, edit and delete already existing contacts. Contact model
field :name, type: String field :address, type: String field :surname, type: String field :email, type: String field :phone, type: String field :birthday, type: Date field :notes, type: String
The user can edit and update any field. Search From the page /contacts user can make a search by any field. The result will show any matches in any field of any contact.