Skip to content

MineMe0812/rails-code-assessment

Repository files navigation

Incubit code assessment

Overview

This is ruby on rails application built for code assessment from Incubit company interview process.

How to run

  • Please be prepared with ruby-2.7.1 if you don't have. You can use any ruby version manager(fyi, i'm using asdf)
  • Clone the repo and update the database connection info You will need the database user with db creation permission.
$ cd incubit-assessment
$ bundle install # install all required dependencies
$ rails db:create db:migrate # Create database and run migration
$ rails s # start server

You can run testing with bundle exec rspec command.

Goals

Here's the list of completed goals

  • As a user, I can visit sign up page and sign up with my email (with valid format and unique in database) and password (with confirmation and at least eight characters).
  • When I sign up successfully, I would see my profile page.
  • When I sign up successfully, I would receive a welcome email.
  • When I sign up incorrectly, I would see error message in sign up page.
  • As a user, I can edit my username and password in profile page. I can also see my email in the page but I can not edit it.
  • When I first time entering the page, my username would be my email prefixing, e.g. (email is “user@example.com” , username would be “user”)
  • When I edit my username, it should contain at least five characters. (Default username does not has this limitation)
  • As a user, I can log out the system.
  • When I log out, I would see the login page.
  • As a user, I can visit login page and login with my email and password.
  • As a user, I can visit login page and click “forgot password” if I forgot my password.
  • When I visit forgot password page, I can fill my email and ask the system to send reset password email.
  • As a user, I can visit reset password page from the link inside reset password email and reset my password (with confirmation and at least eight characters).
  • The link should be unique and only valid within six hours.

Also it meets the demand of following concerns

  • Use PostgreSQL
  • Do not use third party library for user registration. (e.g. Devise)
  • Please use https://github.com/ryanb/letter_opener for the email in development environment.
  • Write test code in any test suite you like.
  • Use Git for version control with WELL commit message.
  • Write README about how to get start for the project.