Cypress

Posted on Apr 28, 2022

Cypress

4 months gone. I mean four months since the beginning of the year.

Since then I’m fully focused on the engineering side of Smart People: a medium-sized marketing company, operating in Italy.

I mentioned that in the previous post, without going too much into the details. Time to do that right now!

What?

When I was a freelance, Smart People was one of my favourite clients. I met them in 2017. They were looking for a custom-built CRM, so ended up choosing my solution. But that was only the start since they also invested in closing the mobile gap with a PWA - again designed by me from the beginning. Smart People also invested in a lot of automation, to continuously keep their network updated on the deal status and notify about issues. With them you always have control over your performance/income.

That’s not enough

Yep, that’s not enough. Never. In the last years, I had the chance to take part in great projects, while challenging complex problems and becoming a better professional. The same happened for Smart People, which at some point needed to grow. In the middle of 2021, the Head of Engineering position has been opened and I was the best candidate. And it happened: since the third of January, I’m in charge of driving the engineering side of the company. Great!

First step

Our apps were completely missing the end-to-end test layer. That’s unacceptable. So I started designing that part with Cypress in the beginning of January while blocking all tasks related to the business logic. The minimum set of tests was there before the end of the month, giving us the chance to trust the most important features.

Infra changes

Company systems were running on-premise, with all the pros and cons related to that scenario. In the last days of January, I started to test for cloud migration, with an initial lift-and-shift approach. In the first decade of February, a bunch of droplets were running in a Digital Ocean region, taking care of the majority of our services.

Architecture

The CRM is a monolith, written in PHP while leveraging a MySQL database. After taking care of the tests and the infrastructure side, it was time to think about the architecture overview. I decided to start splitting the system into smaller pieces, divided by business unit and written in TypeScript. In this way, it’ll be easier to move from our frontends to the microservices since they’ll use the same language. Everything should grow with a test suite - both on the unit and end-to-end side - to avoid mistakes made in the past.

Syncing with our vendors

Smart People sells third-party services to final customers and other companies, there’s a need to keep our information always in sync with the vendors. Things like checking if the deal ended up successfully, or if there’s an issue. Vendors are used to sending reports daily, with all the information needed. There was a procedure for keeping these things in sync with our systems, but that was not performing at its best. A complete redesign has been scheduled, starting from the end of February. It ended in the middle of March, resulting in a faster process. The payment flow is tightly coupled to the reports, so even that was part of the redesign. This resulted in some days per month saved, which were previously spent in manual operations.

Queues

A growing company needs to review its internal processes and eventually redesign them to accomplish new needs. That was the case with the Back Office process. So in the second half of March, a new system has been designed, to take care of all the queues needed to manage the process. The new system rollout started in the first week of April. The last step has been deployed in production a few days ago. It changed the way the business unit works, giving a performance boost that will make us ready for the huge load we expect in the upcoming months.

Tomorrow?

We’ve built a lot of things in this first quarter of the year. Uncertain things - like the Back Office redesign - now are in place, giving us some confidence in the way they work. But what about tomorrow? Some technical debt needs to be addressed. It’s part of the lifecycle. You need to grow on the business side, review the technical part and start back again. New exciting features need to be built. And I can’t look forward to writing the next post. See you soon!