given ai wave and rapidly changing js landscape and size of small company (< 3 devs), i need to re-evaluate monorepos

i think i can kind of make monorepos work by figuring out the following

  1. Make sure frontends and backends are properly partitioned and isolated this time.
  2. Moving to latest convention and keeping up with underlying monorepo version and style faster - for example one thing is to get rid of apps and libs way of doing things and mirror the latest nx monorepo style.
  3. Ensuring buildability and publishability with proper semver - this is important in cases where external consumers might need us (for example a vantage sdk to be consumed by zapier and w3 backend)
  4. investing effort at appropriate times to move to latest versions of packages, moving to newer runtimes when it makes sense (example deno) and building great and fast ci cd pipelines (and properly understanding things like caching and affected files)

The Benefits

It might be easier to hate on monorepos , but with some effort invested on build systems and devops, monorepos may give better experience than having to do the same thing across multiple repos.

They start becoming bad when you have no one to do the version migrations and stuff, and actually learn how the mono-repo system works.

Its not like monorepos are a pain. Anything when scaled is a pain.

A good question to ask yourself to actually know if something is useful or not is :

  1. Dont ask - would it be simpler to re-do new and fresh things with this other technology?
  2. Ask - if I were to re-construct the exact thing you have now without this current technology and use something else instead?

This is kind of like the paradox pointed out in Complexity Unavoidable - Not All Lost by Luke and Theo. Anything under 20k lines of code seems easy. After that no matter how good of a tool you pick, there will be parts of it which are painful.

Svelte seems easy because probably the amount of hard shit that has been done in react, just hasn’t been pulled off broadly enough in svelte. Imagine re-creating a tool like figma in svelte, not saying it cannot be done, but the point being made here is, when you reach that point, almost any tool will be a headache to code with.

Vaibhav’s Law: Ultimately DX Has to go to shit, its about how much you can squeeze out (features) before it does.

Other remarks

Luke’s Law - any app becomes 3x easier to develop after 3 years. Insight : so technically software built in 2022 should become 3x easier to re-build in 2025.

References

https://news.ycombinator.com/item?id=17605920 https://www.youtube.com/watch?v=U8L_KOQmDj4