Got Monorepos Instead of Microservices? This is How Harness IDP Has Got You Covered
Tags: developerportal, backstage, idp, developer
Published: 2023-10-27 16:24:48

Software development is ever-changing, and so are the tools and methodologies developers use. While microservices are the recent buzz and discussions on [mono vs polyrepos](https://www.harness.io/blog/intro-to-gitops-source-patterns) are ongoing, monorepos have been a staple for a long time. These monolithic repositories, which house code for multiple projects in a single location, have their merits. They simplify dependency management, make code reviews efficient, and offer a unified versioning system.

However, the rise of Cloud Native tools and technologies has shifted the focus towards microservices, influencing tools like Backstage. Backstage, an open-source developer portal, has become a favorite for many organizations, especially those leaning towards microservices. But what about those still using or transitioning from monorepos?



![Monorepo usecase in Harness Internal Developer Portal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yksmmwytolhadb17ojut.png)


Monorepos, while beneficial in many ways, come with their set of problems for backstage/Internal Developer Portal use case:

**Plugins:** Tools like Backstage have plugins, such as GitHub insights, that are designed with the assumption that a single repo corresponds to a single software component. In a mono-repo setup, this can lead to inaccurate results, as multiple components might reside in the same repository.

Here's where the Harness Internal Developer Portal comes in. While it's true that our primary design has been microservice-first, and mono-repos might seem like an afterthought, the IDP is equipped to handle both. The Harness Developer Portal is versatile enough to cater to both microservices and mono-repos, ensuring no organization is left behind in their development journey.


### How IDP takes special care of monorepos 

This Harness Internal Developer Portal aims to enable organizations to handle mono-repos as efficiently as microservices, especially given the challenges they present. Here's How:



1. **Location Flexibility with catalog-info.yaml:** One of the standout features of the Harness Internal Developer Portal is its ability to recognize the catalog-info.yaml file, irrespective of its location in the repository.In a mono-repo, the YAML definition can be placed anywhere, offering immense flexibility in structuring. Fun fact - we love mono-repos here at Harness and our [harness-core](Link to Harness Core) is managed using a mono-repo.
2. **Localized Documentation**: With mono-repos, documentation can reside within specific sub-directories, ensuring that related code and its documentation are closely knit. Backstage even offers a [plugin](https://www.google.com/search?q=techdocs+mono-repo&sourceid=chrome&ie=UTF-8) to facilitate this, emphasizing the importance and ease of this setup.
3. **Simplified Service Onboarding:** When onboarding new services, there's no need to create entirely new repositories. Instead, new directories can be created within the existing mono-repo. 
4. **Path-Aware Scorecard Checks:** Scorecards in a mono-repo are aware of specific paths. This means that as long as the backstage.io/source-location is configured correctly to include the sub-path where a particular project resides, everything functions seamlessly. Also the ability to verify Library version and whether a file exists or not, ensures that each project within the mono-repo is treated as a distinct entity, with its checks and configurations

**Conclusion**

In conclusion, mono-repos offer a flexible and efficient approach to software development. With the ability to place YAML definitions anywhere, keep documentation organized, streamline service onboarding, and have precise path-aware checks, tools like Harness Internal Developer Portal make managing monorepos simpler and more effective. Whether you're a large enterprise or a growing startup, embracing these advantages can significantly enhance your development workflow.

Try out [Harness Internal Developer Portal (IDP)](https://www.harness.io/products/internal-developer-portal), we've got a wealth of resources to help you dive deeper. Please reach out to us [for a demo](https://www.harness.io/demo/internal-developer-portal). For a comprehensive understanding, our [release blogs](https://www.harness.io/blog/internal-developer-portal-public-preview) detail the latest features and updates. And if you're more of a visual learner, our [video tutorials](https://youtu.be/r9urqE--aNs?si=P9g972jtvbtM_8Cd), and [documentation](https://developer.harness.io/docs/internal-developer-portal) offer step-by-step guides to get you started. Dive in and discover the transformative power of Harness IDP!