Monorepos - What, Why, When and How | Full Stack React + Hono Example

Поделиться
HTML-код
  • Опубликовано: 11 янв 2025

Комментарии •

  • @shaked1233
    @shaked1233 14 дней назад +6

    This is probably the best guide on monorepos on youtube. thanks!

  • @Ikakoo2410
    @Ikakoo2410 18 дней назад +5

    probably one of the best channels around tech, also CJ man thanks!

  • @ts3798
    @ts3798 18 дней назад +6

    A christmas miracle. This is literally what I was looking for. Thanks.

    • @dalanxd
      @dalanxd 18 дней назад +1

      Same here hahah 🥳

  • @Next-Js
    @Next-Js 6 дней назад

    I like the Spanish audio and the material that includes Hono , Thank you!

  • @xseman
    @xseman 18 дней назад +7

    in my experience, primarily use of monorepo was making atomic changes to decoupled parts of an application that might also not be in same language

  • @omomer3506
    @omomer3506 18 дней назад

    Wow just wow, i think of a question you answer it in the next section, and most of the things i didnt know or think of how useful they could be, this is much appreciated, thanks syntax and specifically CJ

  • @rebelmachine88
    @rebelmachine88 18 дней назад +1

    Another excellent video CJ! I appreciate the insights and the details.

  • @gokulnarayan6778
    @gokulnarayan6778 18 дней назад +1

    Lots of cool stuff in this one! Thanks CJ! Merry Christmas!

  • @uchennaofoma4624
    @uchennaofoma4624 18 дней назад

    I've been doing this for a while, but you really opened my eyes to a lot of things like the pnpm task runner and parallel tasks. Thanks for this vid 🙏

    • @justinoneill2837
      @justinoneill2837 13 дней назад

      Yeah that was a golden nugget! I was always reaching for the package npm-run-all. Deno also has built-in task runners

  • @derciojds
    @derciojds 18 дней назад

    I was just looking for a in depth monorepo video, Thank You CJ
    I love your content.

  • @NoahCuz
    @NoahCuz 15 дней назад +2

    thanks CJ! can we get a video going over how to efficiently manage a database package using Drizzle in this monorepo setup? ie. shared schemas, etc

  • @joshfoley
    @joshfoley 17 дней назад

    Its like you guys knew what I needed help figuring out! Thank you guys for all the amazing content!

  • @EIsenah
    @EIsenah 9 дней назад

    Excellently explained. Nice guide

  • @MrAndreEsteves
    @MrAndreEsteves 18 дней назад

    Thank you for the Christmas gift CJ
    Always happy to watch your videos 💙

  • @bastianwegge
    @bastianwegge 17 дней назад

    Awesome work! Was just looking for something like this, thanks a lot!

  • @steftrando
    @steftrando 18 дней назад +7

    Is there a playlist with all the videos made by this guy? Extremely good content

    • @syntaxfm
      @syntaxfm  18 дней назад +1

      Thanks! All my Syntax videos are here: ruclips.net/p/PLLnpHn493BHEF02eKUy4fdFv1RP-2q3SF
      You can also check out www.youtube.com/@CodingGarden

  • @iamparmjeetmishra
    @iamparmjeetmishra 16 дней назад +1

    Your template video is very amazing.. thanks CJ,
    and Please make this monorepos tutorial in depth like Hono Backend or Nextjs like. Please pleaseee

  • @MrAndreEsteves
    @MrAndreEsteves 17 дней назад +2

    Web build output is placed in apps/api, what happens if there are multiple web apps, will they be all placed in api package?
    What was the reason for this decision?

  • @belkocik
    @belkocik 18 дней назад

    24:40 how to add custom messages (i18next) to zod validation on client/backend? Right now is just a variable with default messages for validation constraints. Is it possible to use i18next like in express/fastify/deno?

  • @davidsiewert8649
    @davidsiewert8649 18 дней назад +3

    Does the IDE autocomplete speed suffer? Typescript aliases in monorepos are prone to causing performance issues.
    How much Memory does you setup consume to run all processes the background? Monorepos are notorious memory hungry, because each workspace has to run it's own isolated typescript LSP server and you recommend running the dev mode in watch mode that will increase your system memory usage even futher.
    All the examples and recommendations can work nicely on small toy projects, but have you tried measuring it on bigger ones like react or tldaw, you showed in the beginning?
    Why its important: many of these tools and solutions are incredibly memory hungry -> and you just flat out can't run everything at once if you do not have 64-128 gb of memory on bigger projects.

    • @justinoneill2837
      @justinoneill2837 13 дней назад +1

      I think that's where a turborepo really shines. It caches everything after build and won't rebuild it unless it changes. You can get a pretty nice performance boost from this. I agree though, you can definitely run into memory issues if you're not careful

    • @davidsiewert8649
      @davidsiewert8649 13 дней назад

      ​@@justinoneill2837
      I tried Tuborepo. My system chocked on the memory requirements. I now seriosly think about upgrading my system (24 GB currently). Seems like anything less than 64 GB of ram is not enough for *simple* web dev stuff....
      That a strange world we live in there we have to have 64 GB RAM to output some simple text/html.....

  • @tapka2tapka
    @tapka2tapka 17 дней назад +1

    It would be interesting to see how you can combine deno js and pnpm in one monorep

    • @justinoneill2837
      @justinoneill2837 13 дней назад +1

      This is a question I have to.. But I believe Deno replaces PNPM for this stuff.

  • @Danielo515
    @Danielo515 18 дней назад +5

    I really need a good explanation why is all the tooling around mono repos needed. Just put things on different folders, and define different entry points to the same application. Why something more complicated is needed ? It only makes sense a medium to big scale

    • @zzej
      @zzej 12 дней назад

      I know right! Like just let me share types, it shouldn’t be that difficult

    • @alejonanez
      @alejonanez 12 дней назад

      @@zzej @danielo515 if you are only sharing types with one app, then it really doesn’t make sense.
      The tooling is necessary _mostly_ because of CI. Without tooling like Nx/Turbo you’ll build AppA and AppB everytime you push changes to Github let’s say. You only want to build the app that actually changed.

  • @madmaxdev
    @madmaxdev 18 дней назад

    Very informative.

  • @VinayKumar-vu3en
    @VinayKumar-vu3en 16 дней назад

    what a perfect timing

  • @gaddp
    @gaddp 13 дней назад

    nice content!

  • @starrynight72
    @starrynight72 18 дней назад

    Is there any difference if I use bun instead of pnpm?

  • @rtorcato
    @rtorcato 18 дней назад +1

    working with a mono repo is fine for a small team working one big project, but I found that eventually the packages should be moved to it's own repo and developed separately. The other main problem with mono repos is the CI/CD pipelines get super confusing. Even as a small solo developer if you build out @solo/shadcn and @solo/utilis npm packages the next time you start even a demo app you can just import from your packages and not have to bother setting up a mono repo structure.

    • @StingSting844
      @StingSting844 18 дней назад +1

      Mono repos are very good in places where product wide changes are required. I'm able to implement security compliant tools and standards easily for our whole product in one go. We have 7 UI applications in our monorepo all sharing lots of common code and incredibly low barrier to get started. The tooling complexity in CI pipelines exists but if you understand tools like Nx or Turborepo, you can get really far with just the basic features.
      I have performed 6 or 7 huge migrations and refactors in the past 4 years which would have been impossible without a monorepo.

    • @derproka
      @derproka 18 дней назад

      Google used a specialized monorepo

    • @justinoneill2837
      @justinoneill2837 13 дней назад

      ​@@StingSting844yeah I totally agree with you. It's kind of like the atomic design concept. Make a change one place and it reflects everywhere.

  • @iambasanta
    @iambasanta 13 дней назад

    well explained.

  • @dendogramination
    @dendogramination 17 дней назад

    Thank you for this videos! I apreciate. I was just looking for something like this. is it possible de disable the Auto dubing ? comming on th vidéo and ear an AI generated voice disturb me.

  • @cylewaitforit
    @cylewaitforit 18 дней назад +1

    16:35 The general feeling that I’ve gotten is that subpath imports are the preferred go forward instead of typescript path aliases, even for typescript since 5.4.

  • @tom.watkins
    @tom.watkins 18 дней назад

    I had an issue where using drizzle-zod meant my database schema ended up in my client bundle. Is that still an issue?

    • @syntaxfm
      @syntaxfm  18 дней назад

      Yes, that still seems to be the case. I think the only way around it would be to generate the Zod schemas at build time. Haven't found anything for that though.

    • @tom.watkins
      @tom.watkins 16 дней назад

      @syntaxfm yeah it's the one thing I think prisma does have over Drizzle, having that generation step allows for things like Zod schemas to be generated at build time

  • @toyama14
    @toyama14 16 дней назад

    this is gold

  • @IkromAuliaFahdi
    @IkromAuliaFahdi 18 дней назад

    can I change react to other framework to create this monorepo?

    • @MrAndreEsteves
      @MrAndreEsteves 17 дней назад

      Yes, inside apps/* you can have as many applications as needed

    • @justinoneill2837
      @justinoneill2837 13 дней назад

      Yep, that's the beauty of using a Monorepo. Every project inside of apps is its own project. If you're in the root you can just write pnpm dev and it spin all of them up at the same time

  • @tririfandani1876
    @tririfandani1876 17 дней назад +1

    It doesn't make sense to me to put eslint config as another workspace, i prefer one eslint flat config in root project and use "files" and "ignore" to apply lint to specific workspace instead
    It makes more sense to create typescript config workspace instead

  • @St0rMsk
    @St0rMsk 18 дней назад

    Christmas came early 🙂

  • @jackjameson6826
    @jackjameson6826 18 дней назад

    no turborepo?

  • @ColdStoneBoy
    @ColdStoneBoy 13 дней назад

    Thanks!!!

  • @Deus-lo-Vuilt
    @Deus-lo-Vuilt 18 дней назад +1

    Pista en español wow , Gracias, aunque la voz es de mujer, se agradece completamente

  • @mrlectus
    @mrlectus 18 дней назад

    i like the manual setup

  • @felixallistar
    @felixallistar 18 дней назад

    why would you use one for a dashboard of the normal site? why wouldnt i just make a dashboard route with auth/middleware? srs question, im new.
    i was told about monorepos when i tried making a react native port of my nextjs project, so i could share stuff but ive just makin a protected route for admin stuff. did i do this all wrong lmao

    • @OranjeDiscoDancer
      @OranjeDiscoDancer 18 дней назад +2

      That's fine to do, my company has it like that currently. I would prefer to have it a separate app in a monorepo though because it's leading to a ton of code sitting side by side in our components folder for example that have virtually nothing to do with each other. And when you go searching for code in the client you're getting files that are for the dashboard that you might not even realize are just for the dashboard.
      I think it's a better dev organization experience basically.

    • @felixallistar
      @felixallistar 18 дней назад

      @@OranjeDiscoDancer ahh ok thank you, that makes sense; was worried it was a security thing. but i have deff accidentally changed the file called layout.tsx instead of layout.tsx. or actually no, i think it was layout.tsx.... god i love nextjs app router.

  • @kambaalayashwanth123
    @kambaalayashwanth123 17 дней назад

    please make another one without drizzle, with mongodb and sst dev
    Thank you for the code I starred it and forked it.