This goal of this interview is to learn more about what it would be like to work together, especially:
- How you break down complex problems
- Your knowledge of web applications in general and Ruby on Rails in particular
- What it's like to pair program with you for a couple of hours, which is something we do relatively often as a team
We are excited to work with folks transitioning from other stacks, but we'll be working on a Rails-based project for this interview. If you are more familiar with another stack, we will help you translate the idioms and concepts during the interview. :)
- Read the sections below and take a glance at the models, views, and controllers
- Make sure you can boot the application and run test suite of this project
If you have worked with Ruby on Rails recently, you shouldn't need to spend more than 15-20 minutes to prepare for the interview.
- Run
bundle install
to install gem dependencies - Run
rails db:setup
to create the dev/test databases, load the schema, and create some seed records - Run
bin/dev
- Visit
localhost:3000
and ensure that you see the "You're on Rails!" page - Run
bin/rspec
to run the test suite
We'll spend the first few minutes of the interview answering any questions you might have about the project. After that we are going to go over the specific requirements for the interview problem.
For our backend-leaning interview, be ready to extend the data model below to support a new feature.
For our frontend-leaning interview, be ready to evolve the design of a page and add some new functionality to it.
Note that this is a Rails 8 project, which means it uses
importmap
andhotwire
(Turbo, Stimulus, etc) by default. We don't expect you to have any specific knowledge of these technologies, but they are available if you would like to use them for anything.
Note that we tried to keep this application as simple as possible. This also means that there are some quirks and missing pieces - for example authentication.
The application is divided into two main components:
- A admin component used by our employees (people that work at Brightline)
- A member component used by our members (people we provide care for)
You can find the respective controllers for each component in app/controllers/admin
and app/controllers/members
.
At Brightline we assign homework to a Member
in the form of an ExerciseAssignment
. Some important things that you should know:
- Each
ExerciseAssignment
is assigned to aMember
- An
ExerciseAssignment
references anExercise
- An
Exercise
encodes common information of the homework that we assign - for example the URL of the handout / video / ... - The same
Exercise
can be assigned to aMember
multiple times by creating multipleExeciseAssignment
s - An
ExerciseAssignment
can be completed by setting thestatus
tocompleted
- We define
Exercise
s in a YAML file
We've omitted some lower-level details of Exercises
that don't really apply to this scenario, such as per-exercise data schemas or permissions. You can assume that ExerciseAssignments
generally work as follows:
- A admin assigns an
Exercise
to aMember
- The member logs into their account and sees a list of pending assignments
- They select an assignment and are presented with a multi-step UI for completing it
- They fill out several fields and submit the assignment
- A Rails controller sets the status to
completed
and populatesresponse
columns for the relevantExerciseAssignment
As a specific example, here's how "Learning to Relax" might work:
- "Before we start - how are you feeling?" (slider from 1-10 where 1 = very stressed, 10 = very relaxed)
- Member completes a guided meditation exercise presented via video
- "How are you feeling now?" (slider from 1-10 again)
Then the backend would persist starting_feeling
and ending_feeling
in the JSONB response
column on ExerciseAssignment
.
Each exercise may collect unique data points, which is why it uses an unstructured JSONB column.