Rendezvous: An Appointment Booking Platform written in Ruby

Sean Slaughter Thompson
4 min readJul 22, 2020

This was by far the most I’ve challenged myself with a programming related project, and I am actually very pleased with what I was able to pull off in one week. I decided to create an appointment booking platform for service providers to connect with their clients. After deciding on a name for it, I got to work with the planning.

The first problem that I ran into with the project was getting the ActiveRecord associations to work properly. I knew that I was going to need models for providers, clients, and appointments. These relationships were pretty straightforward: providers can have many clients, clients can have many providers, all through appointments. I also decided at this point to create a model class for services, and had some difficulty figuring out how this association would work. I decided to create a join table AppointmentServices, to use for the relationships between Providers, Services and Appointments.

The next step was to get the layout figured out for styling I decided to use the Materialize CSS framework. I had done a project using Bootstrap in the past and ran into some issues so I thought that I would try something new. Turns out, it wasn’t Bootstrap that was the issue but just me having a hard time trying to figure out their grid structure and how to make things responsive. After a couple hours of work I was able to get a landing page and login/registration up, running and looking pretty good.

By far the most challenging part of this project was keeping track of an appointment’s state throughout its existence. I needed to do this to keep track of when to notify users about requests for new appointments, updates to appointments, and cancellation of appointments. I had to go back and create a migration to add boolean values for confirmed, notified, provider_cancelled, client_cancelled, provider_request_change, and client_request_change to my Appointment table in the database. Then I created a logic table to keep track of the state of the appointment at each part of its life cycle, and even with only 6 rows I was able to determine 8 different states. Afterwards I wrote some helper methods in my models and was able to condense it all down into one method get_changes.

The Materialize framework really did come in handy when styling the forms for appointment booking. I was able to use the date picker and time picker and I think it really made the UI/UX aspects of this project a lot better. I ran into an issue at first getting a DateTime object created from the params, but I figured it out and I’m pretty proud of the result. I had to concatenate the date and time from the form:

date = “#{params[:date]} #{params[:time]}”

And then use that to create the DateTime object with the right formatting:

date: DateTime.strptime(date, “%m/%d/%Y %H:%M %p”)

The end result is a very cool looking form to create appointments and store them in a database.

This impressed my girlfriend. Finally.

All in all, I had a lot of fun with this project and definitely learned a lot about creating an MVC application. If you’re interested at all the code can be found here and below is a short walk through of the project and its functionality. Onto the next one!

--

--