This a simple web app to store secrets online. It was made using the Ruby on Rails framework.
The following URIs are what I used in the web application:
Prefix Verb URI Pattern Controller#Action new_user_session GET /users/sign_in(.:format) devise/sessions#new user_session POST /users/sign_in(.:format) devise/sessions#create destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy user_registration POST /users(.:format) devise/registrations#create new_user_registration GET /users/sign_up(.:format) devise/registrations#new root GET / pages#home new_user_secret GET /users/:user_id/secrets/new(.:format) secrets#new edit_user_secret GET /users/:user_id/secrets/:id/edit(.:format) secrets#edit user_secret GET /users/:user_id/secrets/:id(.:format) secrets#show PATCH /users/:user_id/secrets/:id(.:format) secrets#update PUT /users/:user_id/secrets/:id(.:format) secrets#update DELETE /users/:user_id/secrets/:id(.:format) secrets#destroy POST /users(.:format) users#create new_user GET /users/new(.:format) users#new user GET /users/:id(.:format) users#show
But these are all the currently supported URIs in the app of which only the ones listed above were used. The list was generated using the rake routes
command in Ruby on Rails.
Prefix Verb URI Pattern Controller#Action new_user_session GET /users/sign_in(.:format) devise/sessions#new user_session POST /users/sign_in(.:format) devise/sessions#create destroy_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 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 root GET / pages#home user_secrets GET /users/:user_id/secrets(.:format) secrets#index POST /users/:user_id/secrets(.:format) secrets#create new_user_secret GET /users/:user_id/secrets/new(.:format) secrets#new edit_user_secret GET /users/:user_id/secrets/:id/edit(.:format) secrets#edit user_secret GET /users/:user_id/secrets/:id(.:format) secrets#show PATCH /users/:user_id/secrets/:id(.:format) secrets#update PUT /users/:user_id/secrets/:id(.:format) secrets#update DELETE /users/:user_id/secrets/:id(.:format) secrets#destroy users GET /users(.:format) users#index POST /users(.:format) users#create new_user GET /users/new(.:format) users#new edit_user GET /users/:id/edit(.:format) users#edit user GET /users/:id(.:format) users#show PATCH /users/:id(.:format) users#update PUT /users/:id(.:format) users#update DELETE /users/:id(.:format) users#destroy
Testing was done manually as well as using the Cucumber testing framework. Assuming Ruby on Rails is installed, you can run the app by running the rails s
command in your terminal and then in a browser going to the following url: localhost:3000
.
Some refinements to add later: Add more to the front end to make it less plain and more attractive to users. Add the ability for users to edit or destroy their accounts. This would allow users to change/recover passwords, change usernames, etc. and also get rid of their account and all secrets stored in the database if they no longer wish to store them. Another feature to consider adding, is a feature to share or unshare all or individual secrets with another user/“friend” as sometimes we wish to share secrets with friends. Also, related to the secret sharing feature I would possibly add a user-search feature to find “friends”. Additionally, currently, the app uses SQLite as the database for backing storage which is okay for testing purposes but may not scale well if I were to deploy the web app to Heroku, AWS, Azure, etc. So I would want to consider changing the database to MySQL, Postgres, or MongoDB or even consider a NoSQL database.