Local Fruits & Vegs: a Sinatra portfolio project

As second portfolio project for Flatiron School, we had to build a Sinatra based web application. I chose to build a basic market place for people to buy and sell fruits and vegetables from their garden, neighbours’ gardens.

Where did the idea come from? My garden of course! I love gardening and we have quite a big garden here in London. I like growing flowers, but I also like growing fruits and vegetables. Last year, my organisation in the garden was not the best, and we ended up eating lettuce three times a day for way too many days in June. Not ideal. We gave plenty to our neighbours and our neighbours gave plenty to us in return. Later in the summer, we had so many raspberries that we did not know what to do with them. It got me thinking that it would be great if there was a way to sell, buy or exchange the food people grow in their garden when they have too much of something or too little of some other thing.

When working on the Sinatra section, it became obvious that the belongs_to and has_many associations could be applied to a marketplace where people could buy and sell stuff. So when the portfolio project came up, I figured I could create a marketplace… for fruits and vegetables!

If the models and matching database tables that had to be created were rather simple to come up with and creating the routes was similar to some of the difficult labs in the section, testing the routes in every possible way required a little bit more brain gymnastics, but it was so much fun!

What I really focused on when testing the routes is:

  • Have all pages interconnect as much as possible so that there is always a link or a button to click on and help you navigate the application
  • Create buttons and link on the appropriate pages so that user experience is as smooth and logical as possible

I tried to put myself in a random user’s shoes= and that helped me create simple but nice features. But as we all know it is never easy to behave as a user who does not know the application when you created it. Since we know our programs pretty much by heart we sometimes forget that a user does not.

All in all, working on this project was a great experience and I look forward to working on the next section: Rails!

N.B. This article was initially published on March 25, 2019

Software Developer — yogi, swimmer, cyclist, gardener and scuba diver