Ruby on Rails | Backbone.js | PostgreSQL | Docker | Typescript

About the project

This was the last project of the common branch of my 42 cursus, we were a group of 4.
We had to build a Single Page Application using Ruby on Rails, Backbone.JS and PostgreSQL.
Users should be able to play the famous pong game, have friends, guilds, chat with each other, and a bunch of other features.

What I learned

Ruby on Rails

I never wrote ruby nor used Ruby on Rails before and I loved it.
It boosted my productivity a ton because their is no need to write boilerplate which simplified my life a lot.
However, setting the whole project up was kinda messy at first, especially to get webpacker to work nicely with everything else.


Coming from React.js, developing using Backbone was hard, really hard.
I had just so much more things to handle myself, managing views lifecycles, remove events, and so much more...
Nevertheless, it increased my web knowledge tremendously.

As I love Typescript, I had to try to fit it in and I did.
Looking back on it, I don't know if it was a good decision as in my group I was the only one with javascript and typescript knowledge.
Of course, typescript helped us a lot by providing static analysis on the codebase but it added complexity for my mates. Moreover, 99% of backbone examples online were not using ES6 classes, and of course were written in javascript.


It was my first time implementing an OAuth authentication ever.
I used the 42 API, and I really enjoyed it.
The fact that you don't have to worry about storing the users password or even the signup logic, is of great help.


Ruby on Rails comes with a lovely library to handle websockets : Action Cable.
It has a nice API and allowed me to add real time updates to the website.
I used it to build the real time chat interface and also for the pong game itself.
My previous experiences with websockets were limited and it was my first time building a chat.


This was my biggest 42 project so far, I loved it but I do have some regrets :

  • not introducing unit and integration tests sooner.
  • not taking enough time to choose my mates, out of our 4 people group, only 2 of us were really working on it so it was not cool nor motivating.