Cocoliche

Ruby on Rails team for a second-hand clothes marketplace

1 — About Cocoliche

Cocoliche is a quality second-hand clothes shop. They have several physical shops in La Plata and Buenos Aires, Argentina, as well as an online marketplace.

2 — The challenge

Brenda and Constanza, founders of the brand, approached us with an exciting opportunity to improve their back-office operations. They were looking to increase performance and introduce new features, including Inventory Control and Barcode Scanner Integration. Moreover, their staff was frustrated by some back-office pages due to extremely slow response times (in the order of minutes).

It was necessary to assess the application before introducing new features, so we agreed to review the code and conduct a performance and tech debt analysis. The goal was to estimate how much effort it would require to modernize the application and then introduce the new features.

To perform the assessment, we needed to have access to the application, the code, and the APM (Application Performance Monitoring system) to be able to make meaningful recommendations. In this first meeting, we learned that:

  • This application was 9 years old.
  • The infrastructure management was inconsistent.
  • The application had some issues when it was first developed: unmet deadlines and rushed code, which resulted in poor implementation or broken features.
  • The application had a good deal of technical debt.
  • They weren't using an APM.

After a week of performing the assessment, we were able to deliver an Actionable Insights Report, including our findings and recommendations on performance issues, tech debt, and infrastructure improvements like:

  • Slow-loading pages that either took too long to display or timed out.
  • We suggested uniformizing and simplifying the infrastructure management using a PaaS provider. We analyzed different options and laid out a minimal plan to port the application to one of these.
  • We recommended a high-level plan with several steps to upgrade Ruby and Ruby on Rails to the latest versions.
  • We analyzed the performance of the application and proposed solutions and debugging strategies for the most critical and most used features of the application.
  • We detected several issues that could be solved using a proper caching strategy or needed database query optimizations.

This report allowed us to lay out a roadmap, and adjust it to Cocoliche's IT budget.

"Their efficiency, kindness, and punctuality were impressive. They delivered excellent solutions."

Constanza Darderes | Founder

3 — The solution

The solution consisted of 3 parts. The first one was updating Ruby and Ruby on Rails so we could take care of the infrastructure. We recommended transitioning both the production and staging environments to Heroku. This move not only simplifies maintenance compared to the current setup but also enhances security and cost-efficiency.

The second part of the solution consisted of improving the overall performance of the application. Years of accumulated technical debt had significantly contributed to the poor performance of certain key modules that Cocoliche's staff relies on daily.

Lastly, the new features: Inventory Control and Barcode Scanner Integration. Cocoliche sells unique garments, there aren't two of the same kind and they frequently move between stores, most of them exposed to the public. Keeping track of each garment manually was a tedious and time-consuming process. Integrating a Barcode Scanner was necessary not only for the Inventory Control, but also for simplifying the staff when selling clothes.

4 — The outcome

After 2 months of hard work, the Ruby on Rails application was upgraded from version 5.0 to version 7.0, and along with it the Ruby interpreter from version 2.3 to 3.1. Two separate production and staging environments were deployed to Heroku, and as a byproduct of these, we migrated the old MySQL database the application was running to a newer PostgreSQL database.

The performance improved greatly: the application had some technical debt that made some pages load in over 30 seconds. By fixing this technical debt, we took these pages to load in less than 500ms.

We built the Inventory Control module and integrated the Barcode Scanner. These two features allow printing product codes to barcodes and scanning them to make sales and perform searches. It also provides comprehensive control over stock across all branches, allowing for individual item tracking and historical analysis. These features reduced the amount of work each store needed to do every single day before closing, from hours to minutes.

screenshot of the app

Technologies

Ruby on Rails Postgres