Reedik Tuuling: Leveraging monorepos to build web-apps at Ridango

Reedik Tuuling is a software developer at Ridango, a solution provider for public transport with a focus on automated fare collection (AFC) and real-time passenger information (RTPI) systems. Before joining Ridango, Reedik worked at many big companies like Skype, Cybernetica, GrabCAD, Postimees, and Creditstar. He’s primarily focused on full-stack web development. He has experience in Angular, PHP backend (Yii2 Framework), frontend (Bootstrap, Foundation, LESS/SASS, Tailwind CSS), cloud infrastructure (Ansible, Vagrant, Rackspace, Docker, Kubernetes), and Postgres database development.

At Digit 2022, Reedik will be talking about building Angular web applications in a monorepo. Monorepo solved Ridango’s problem of making sure web applications and code look similar across departments. We talked to Reedik about his diverse software dev experience and of course, also about monorepo.

The interview was conducted and written by Tejas Shah, a member of the Digit marketing & communications team.

You've been a software developer for over 15 years now. You've worked at Postimees, Skype, and you are currently at Ridango. Could you share how you got into software development and what the journey has been like so far?

I got into software development out of a natural interest in computers. I think I was 15 when I made my first website. When I finished 9th grade, I decided to skip high school and go to a vocational school to study computers and networking. So, by the time I was 20, I already had a profession and started working while others my age only started university. I consider myself lucky because I have a natural talent for what I do, so the journey so far has been interesting and fulfilling. Looking back at all the different companies I have worked at, I can say that this job is much more about the people you work with than technology.

What are the things that you like to do in your free time? I believe we are all more than just software developers, and it would be nice to have more to the speaker profiles than just the technologies that they work with.

Well, I agree with you, and whenever I am not working, I make it a point not to engage in work-related things. This has led me to have plenty of hobbies, from those I’ve been consistent with snowboarding for over 10 years now. Infact, I’ll be heading to Finland for a snowboarding vacation soon.

Your talk is going to be about monorepo, could you explain like I’m 5 (ELI5) what is a monorepo?

I have a five-year-old and I know it will be tough to explain it to her. So I will bear someone who has a little bit of software development experience in mind when explaining. A monorepo is a repository (like a Git repo or a different VCS) that contains more than one project. To make it more straightforward, it is helpful to think of the opposite which is a polyrepo setup. A polyrepo setup is when each project has its own repository. In contrast to that, a monorepo is where all the projects are in the same repo, all the commits happen to the repo, and everyone can see each other’s code.

How is this better than a classical polyrepo setup?

Well, it is better when you have specific problems. For example, you have multiple projects which are somehow connected – they want to reuse some of the code, or they use similar technology. Using a monorepo allows these projects to reuse the framework since all the projects live in the same repo. This allows you to keep things in sync because there is a single source of truth so to speak. Essentially when you have projects which are somehow connected to each other, a monorepo is something that could help.

How did the shift to monorepo happen at Ridango?

To be honest, it was like a semi-accident. We were looking for a new tech stack to build our front-end code. We were going to build it from scratch and we were looking at the different ways of doing it and we found monorepo. It seemed like a cool idea but also it felt a little scary. It was scary because it is essentially keeping all the projects and code in one place, which sounds like a terrible idea because it can create a lot of mess. We found out Nx, which is a tool that allows us to manage the monorepo very well. It separates the projects from each other and allows us to create links between them. We didn’t know that monorepo would be the winner, we tried it out, it worked really well so we stuck with it.

How is monorepo used at Ridango?

We use monorepo to manage three back office-related projects. These projects are code for the UI that the admins use, not the actual customers on the streets. The views are similar, but there is a lot of reusable UI code that each application uses. They get data from different API endpoints, and there is a little bit of logic like validation rules and the like. We use Angular Material, a UI library developed by Google. It gives us many UI elements like input, dialogue, pop-ups, etc., that we have customized with our Ridango theme. We’ve also built additional components which merge multiple Angular features. The different projects use all these as a monorepo library. Now when we want to tweak something, we can simply tweak it in the library, and the changes propagate across the projects. This automation is the most significant advantage that we get from monorepo.

What tools are used for the monorepo setup?

We use Nx, which is essentially a tool that lives inside the repo itself and it has a little bit of configuration. Let’s say you want to generate something in the project. With Nx, you can use the right command to generate what you need. Also, it helps you manage the dependencies for each of the projects. Although it has the ability to track multiple dependencies, at Ridango all of our projects use the same version of dependencies.

What were the challenges to setting up monorepo?

The main challenge was figuring out how much code we want to share between the projects. At first, the plan was to share as much as possible and keep everything really DRY. We ended up sharing as little as possible and as much as required. We only put things in common libraries if we see that they are used by more than one project.

How is testing done?

One of the advantages of Nx and Angular, in general, is that it generates a lot of test scaffolding automatically. The app developer just needs to fill the generated test files with real test cases. The tests are run automatically on pull requests.

To end on a lighter note, I noticed that you were working at Skype when the Microsoft acquisition happened in May 2011? How was this experience for you?

It was quite an exciting time to be at Skype. To be honest, we didn’t know that Microsoft was acquiring us. Sure, rumors were floating around, but we didn’t think it would happen. We only got clued in a day before they shared the official announcement with the entire world. One of the things I remember well was that there was a slight resistance to the acquisition because we felt that Skype was our Estonian startup and the accession would dilute this culture. The funny thing is that this resistance quickly evaporated when Steve Balmer, the then-CEO of Microsoft, came down to the office to talk with the team. We all got some Microsoft goodies, even an Xbox and a Windows Phone. After the acquisition, a lot of the people left to work at other companies. Now I don’t know what it is like at Skype as it has been 11 years since.

PS: For those who are curious to learn more about monorepo you can take a look at The site claims to have “everything you need to know about monorepos and the tools to build them.” It is built by the parent company of Nx (Nrwl), the tool that Ridango uses for their monorepo needs.

You could also catch Reedik during the conference and chat more about software development and/or snowboarding.