Monorepo Journey in Localization Team

Nur Erkartal
Trendyol Tech
Published in
3 min readNov 24, 2022

Well, let me explain what Localization team is doing. Translate content from Turkish to other languages and support Trendyol’s expansion in Europe and MENA.

Our adventure on Monorepo began with a coworker’s suggestion based on previous good experience. We were planning to build an application from scratch and check programming languages, tools and methodologies. One of the coworker shared previous experiences with Monorepo and we started to dig into Monorepo. To be honest with you, I was against the idea of using it first. It sounds crazy that all projects are stored in a single repository. In my previous experience I worked so much on replatform projects to split monolith applications to microservices. I thought we lose advantages like independent releases or freedom on programming languages while working with microservices. When I discover advantages of Monorepo and having hands-on experience with Monorepo, I definitely recommend using it. Let me explain more why I changed my mind.

Definition of Monorepo

Software development strategy where code for many projects is stored in the same repository.

Who is using Monorepo in the industry ?

Google, Meta, Microsoft, Uber, Airbnb, and Twitter all employ very large monorepos with a large volume of code and daily changes.

Pros of Monorepo

  • Atomic commits
  • Simplified dependency management
  • Single source of truth
  • Easy code refactoring
  • Encourage the splitting of the tickets by business value
  • Cross-team collaboration
  • Extensive code sharing
  • New-comer friendly
  • Easy cross service changes

Cons of Monorepo

  • Slightly more complex pipeline than Multirepo
  • Must clone entire repository
  • Monorepo commits tend to be bigger but you need to split tickets smaller

Our Challenges with Monorepo

  • Argo CD/Gitlab deployment issues

In our team, Gitlab is used with Argo CD to manage and deploy applications. It is normal to have cross service changes while working with Monorepo. It means more than one deployment pipeline will be triggered when you are deploying. Gitlab gives a lock error when you change an application’s version in the Argo CD Manifest repository. Thus, to be able to overcome this case we had to retry failing pipelines. If you use other deployment server as Spinnaker you won’t face this issue because Spinnaker uses rest endpoints to trigger a deployment.

Monorepo Details of Localization Team

I would also like to share some information about our Monorepo.

  • 8 applications exist
  • 4 programming languages we use in our Monorepo: Golang, Java, JavaScript and TypeScript
  • All documentation(ADRs, Runbooks) are stored in docs folder
  • Configs and secrets are stored in infrastructure folder
  • Deployment pipelines are stored in infrastructure folder
  • Bash helper scripts are also stored in scripts folder
Monorepo Structure
Monorepo Structure

Suggestions

You can use any programming language as much as you want while working with Monorepo. However it is better to choose 3 main programming languages to maintain complexity

It is easy to manage Monorepo for one or two domains. I cannot imagine to manage all Trendyol applications in one Monorepo. Google is managing all applications in single Monorepo. Why aren’t we one of them? 🙂

Summary

Above points are really effective to change my mind and we have already started to use Monorepo in our team. Our experience with Monorepo looks good so far. I hope you will have a chance to use it in your projects.

References

--

--