- Ruby version = 5.2.1
- Clone git repository
- Change into root directory of the project
- Install gems by running
bundle install
- Depending on your database configuration, creating the database and migrating to it might be required, not necessary if using SQLite.
- Reset and Seed the database by running
rails db:reset
- Run the server
rails s
- Test in browser
For this MVP, the database was simplified into 4 models:
-
- Contains a survey_id, a survey name (used for listing the survey at the root path '/') and has many questions.
-
- Contains a question_id, a time_in_seconds (which sets the countdown timer for that particular question, if not provided it defaults to 180), a question_text (which is the question that will be shown during the survey), and it belongs to a survey_template.
-
- Contains an answer_id, a text (which holds the text that the user sent or the string 'blank_answer' if nothing is written on the text area and either the countdown timer expires or the user clicks on submit), and it belongs to a survey_submission.
-
- Contains a survey_submission_id, an email (which is validated on the backend to at least look like an email), it belongs to a survey_template and it has many answers associated with it.
The project starts at the root path '/' where a list of all the SurveyTemplates are seen. From here, one can begin a survey by clicking on it.
After completing a Survey Submission all its corresponding answers are saved to the database.