You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To migrate the current repo to a monorepo setup using Turborepo. This will allow us to have multiple different applications (like marketing, Discord Bot, so on) in the same repo, while having shared common packages between each other.
Pros
Improved DX for repetitive tasks such as building, linting, and formatting.
Will allow us to keep the main 100x dashboard, (future) Discord Bot, marketing sites, and other apps in the future in one place. Ensuring all apps can share packages across each other (such as various configs and Tailwind for example).
Saving both time and money in CI - by leveraging Turborepo's Remote Cache.
Improved local dev experience since build caches can be reused by all contributors.
...and not to mention, every other benefit of having a monorepo fundamentally such as allowing shared packages to be updated locally and seeing live changes on the apps importing shared packages.
Cons
Deployments will need to be updated to new directory inside the monorepo (updating deployment directory to apps/web for example)
Will need to update the Docker Compose script to ensure it works with the new Turborepo setup.
The Plan
Make a very minimal migration to Turborepo. By this, I mean we use a 2 step approach to the migration in order to keep minimal diffs and manageable PRs/reviews.
Step 1. Move the main Nextjs application as is to a folder like apps/web first. This is done to produce as little diffs in the PR as possible, ensuring the first PR is very focused and can be reviewed better.
Step 2: Later, refactor common packages like ESLint, TS config, Tailwind, and so on to their respective packages in subsequent PRs later on.
My Experience
I've incrementally migrated from a single Next.js app to a monorepo setup with Turborepo with 3 different Next.js apps here.
The text was updated successfully, but these errors were encountered:
For now, I have managed to successfully migrate the entire codebase to Turborepo (with pnpm workspaces). Everything works well in my fork for the time being (link here). However, there are several blockers that need to be addressed before I submit my PR.
Blockers
There are currently 2 blocking issues/PRs:
There are a large number of conflicting ESLint and Prettier config rules.
I will make my PR after these changes have been merged to ensure minimal overlapping changes and cleaner diff during the (huge - around 195 files currently) monorepo migration PR.
Summary
To migrate the current repo to a monorepo setup using Turborepo. This will allow us to have multiple different applications (like marketing, Discord Bot, so on) in the same repo, while having shared common packages between each other.
Pros
Cons
apps/web
for example)The Plan
Make a very minimal migration to Turborepo. By this, I mean we use a 2 step approach to the migration in order to keep minimal diffs and manageable PRs/reviews.
apps/web
first. This is done to produce as little diffs in the PR as possible, ensuring the first PR is very focused and can be reviewed better.My Experience
I've incrementally migrated from a single Next.js app to a monorepo setup with Turborepo with 3 different Next.js apps here.
The text was updated successfully, but these errors were encountered: