Badget
Badget copied to clipboard
Improvments: Make it into a monorepo / Turborepo
Convert Existing Repository into a TurboRepo Monorepo
Improvement Description
This issue proposes the transformation of our current repository into a TurboRepo, reorganizing it into a monorepo structure. This change aims to streamline our development workflow, enhance build performance, and improve the management of interdependent projects within our codebase.
Rationale
The primary motivation for this transition is to leverage TurboRepo's efficient task runner and smart caching mechanisms. These features will significantly speed up our build and test processes. Given our growing codebase and the increasing interconnectivity of our projects, adopting a monorepo structure will facilitate better project management and collaboration.
Proposed Solution
-
Initialize Turbo: Run
npx create-turbo@latest
at the root of the project to set up Turbo. -
Configure Turbo: Edit the
turbo.json
file to define tasks and pipelines. - Reorganize Codebase: Structure the repository into separate folders for each project or package, ensuring a clean monorepo setup.
-
Update
package.json
: Ensure each project has apackage.json
with the necessary scripts. - Adopt Yarn/npm Workspaces: Use Yarn or npm Workspaces for managing dependencies across our projects.
- Testing and Debugging: Extensively test the new setup to ensure compatibility and efficiency.
Additional Context
The transition to a TurboRepo will be a significant change in our development process, requiring thorough testing and potential adjustments in our CI/CD pipelines. Documentation will be updated to reflect these changes and guide the team through the new workflow.
hi @meglerhagen I am interested in working on this - is it possible to get a description on this when you have a moment?
Hi @2wce I made the description above. Thank you for the message. And do you have any issues please dont hesitate to contact me :)
Hi @meglerhagen,
I am now familiar with Turborepo (to be honest, never heard of it before), but I have been using Nx.dev for some time now and can only recommend it.
I have also roughly looked at some benchmarks and Nx is usually a lot faster there too.
Reference: https://nx.dev/concepts/more-concepts/turbo-and-nx#tech-and-performance
@meglerhagen Has anybody picked this up yet? Otherwise i'd like to take a crack at it.
Hi @Littletonconnor ! Nobody has taken it up yet. Would be great if you could look at it 👏 I assigned you the task ✨
@meglerhagen Hello 👋 . Just wanna give an update on this. I have started this and am making good progress, but it will likely take about 3 days to finish things up and raise a PR!
Thanks for the update! Take your time 👏🏻 Lets gooooo
#82 This PR will resolve the last conflicts
Together with @matteobad, have improved all the project structure in this PR: #90
Very good! Its up and running AND working ✨