How to structure a JS/TS monorepo (From Zero to Turbo - Part 1)

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 131

  • @LanceYoung-j1q
    @LanceYoung-j1q 27 днів тому +1

    As someone who just spent a good amount of time trying to navigate their way through the current ecosystem (it's a jungle), this was like an oasis - thank you

  • @julio.sampaio
    @julio.sampaio 4 місяці тому +9

    Perfect timing! We've just kicked off a cool new mono repo project with Turborepo at work. Can't wait to see what's next!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @deshi-sukuna
    @deshi-sukuna 4 місяці тому +7

    please keep these coming, your way of teaching is too good! I'm already aware of these concepts through error and trial for the past week but I'm struggling on the more intermediate stuff such as using tailwindcss, dockerizing, turbo.json's functionality, etc... Not much videos on youtube regarding this gem of a tool turborepo, and you're a lifesaver.

    • @anthonyshewww
      @anthonyshewww  4 місяці тому +3

      All things I plan on covering! Stay tuned!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @ReinerKnudsen
    @ReinerKnudsen 3 місяці тому +2

    This is the best tutorial I have seen so far regarding Monorepo/Turborepo. Can't wait to see the next videos and learn more. Thanks for sharing!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @pedro-eu-mesmo
    @pedro-eu-mesmo 2 місяці тому +3

    Looking forwards for the remaining of this series :)

    • @anthonyshewww
      @anthonyshewww  Місяць тому +1

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @francismasha7432
    @francismasha7432 4 місяці тому +3

    Awesome. Looking forward for future learnings on this and improvements in Turborepo.

  • @Benjamin-Chavez
    @Benjamin-Chavez 4 місяці тому +2

    Great vid, a few months earlier and this series would have saved me a ton of time and stress!
    That said, if you are looking for more turborepo content ideas, here are a few things that either took me a long time to really figure out, weren't in the docs or example projects from the turborepo team, and/or am still struggling with:
    - Setting up global eslint (I am running two apps: next.js frontend + express API and a series of packages).
    - Setting up/structuring a shared-types while getting intellisense in all apps and packages and getting updated type intellisense without having to restart the server everytime you update a shared type.
    - Linking to the base type definition and not the transpiled `.d.ts` file when you ctrl-click a type/interface.
    - setting up a global testing suite using vitest so that you can run all of your tests from the root and get the vitest vs-code plugin to actually pick up the tests in each app/package.
    Hopefully you can cover some of these, but in any case, thanks for the vid man, I'm looking forward to the rest of the series!

    • @anthonyshewww
      @anthonyshewww  2 місяці тому +1

      Here’s TypeScript go-to-definition: turbo.build/repo/docs/guides/tools/typescript#enable-go-to-definition-across-package-boundaries
      And 👀 on the rest!

    • @Benjamin-Chavez
      @Benjamin-Chavez 2 місяці тому

      @@anthonyshewww Thanks for sharing! I saw this last night in the release notes!!

  • @justBCheung
    @justBCheung 4 місяці тому +1

    This couldn’t come at a more perfect time, thank you! About to start coding my startup.
    Looking forward to the next episode 😁

    • @jostasizzi818
      @jostasizzi818 4 місяці тому

      Hey I might be intruding I am willing to work on a startup if you would like can we connect through some medium
      If you wanna work together

  • @combatninjaturtle
    @combatninjaturtle 4 місяці тому

    I was just too afraid to set up a monorepo… this is a life saver. Thanks.

  • @shashikantmarskole
    @shashikantmarskole 4 місяці тому

    thank you nicely explain. keep it up. now move with Turbo

  • @jenewland1999
    @jenewland1999 4 місяці тому

    Great video, Anthony! Love to see some more content around monorepos and Turbo itself. Looking forward to seeing more too!

    • @anthonyshewww
      @anthonyshewww  4 місяці тому +1

      More to come!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @zabiullahshokuri
    @zabiullahshokuri Місяць тому

    Best tutorial
    I appreciate you

  • @kinsleyo3965
    @kinsleyo3965 4 місяці тому

    I’m literally planning on creating a monorepo today. Thanks

  • @itsyourboyt4683
    @itsyourboyt4683 4 місяці тому

    Love it. Keep up with the good work

  • @isoonfire
    @isoonfire 4 місяці тому

    I'm starting to approach this world, pls give us more interesting videos like this one :)

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      Stay tuned!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @vinception777
    @vinception777 2 місяці тому

    Thanks a lot for the video, it actually helped me debug my monorepo config haha ❤
    I don't know if you're going to do the part 2, but I'll be watching it if you do!

    • @anthonyshewww
      @anthonyshewww  Місяць тому +2

      I’m finishing up parental leave this week so will be back to shipping shortly! 😁

    • @vinception777
      @vinception777 Місяць тому

      @@anthonyshewww Oh that's nice, congratulation :)

    • @anthonyshewww
      @anthonyshewww  Місяць тому +1

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

    • @vinception777
      @vinception777 Місяць тому

      @@anthonyshewww Damn, I appreciate that you took the time to update me ☺
      I'll check it in the evening or tomorrow thank youuu 🙏🔥

  • @AhmedShahram-dw2xp
    @AhmedShahram-dw2xp 4 місяці тому +1

    Looking for future updates in Turborepo. Been loving new update so far. 👍

  • @muhammadisa440
    @muhammadisa440 4 місяці тому

    Thank you for making this video.

  • @vladprodan7010
    @vladprodan7010 4 місяці тому

    Cool video! More about monorepo, please

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      Will do!

    • @anthonyshewww
      @anthonyshewww  Місяць тому +1

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @pedrobrasil892
    @pedrobrasil892 3 місяці тому

    Waiting the next one =D

    • @anthonyshewww
      @anthonyshewww  2 місяці тому

      Same! I’m currently on parental leave but will be swiftly back to shipping these in a month or so!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

    • @pedrobrasil892
      @pedrobrasil892 Місяць тому

      @@anthonyshewww Thanks bro! And congrats for your baby!
      Be a father is challenging but rewarding, as everything that really worth in our live =D

  • @aghileslounis
    @aghileslounis 4 місяці тому

    Time to use Turborepo!

  • @silphen801
    @silphen801 2 місяці тому

    Oh god please more of this hahaha

  • @theJamieBenShaw
    @theJamieBenShaw 4 місяці тому

    I remember having to setup a monorepo for all our frontend applications at work, it was onerous to say the least haha

  • @ashish_prajapati_tr
    @ashish_prajapati_tr 4 місяці тому

    great tutorial

  • @muhammadisa440
    @muhammadisa440 2 місяці тому +1

    Waiting for the next video.

    • @anthonyshewww
      @anthonyshewww  2 місяці тому

      I’m currently on parental leave but will be swiftly back to shipping these in a month or so!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @shepherdspy
    @shepherdspy 4 місяці тому

    Looking forward to the next video(s). You should also do a Vim configuration video, looks interesting.

  • @ErnestOak
    @ErnestOak 4 місяці тому +1

    Last time I failed at dockerizing, I would like to see how deployment works in a monorepo

  • @DestinoDello
    @DestinoDello 4 місяці тому

    Keep ‘‘em coming if you can also explain how to use clean architecture in a monorepo for next apps 🎂

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      Are you meaning Clean Architecture, the capitalized one, or just cleanly architecting best practices in general?

    • @DestinoDello
      @DestinoDello 4 місяці тому

      @@anthonyshewww i mean Clean Architecture

  • @jfhandfield
    @jfhandfield 4 місяці тому

    I've been using turbo for about a year and I wish I had a video like that. On my end I've been struggling with ShadCn and when deploying and something else then Vercel. I know vercel is the logic choice here but my company is using another cloud service. It would be nice to make video on how to do such a thing.
    Thank you for your time!

  • @gokulkrishh
    @gokulkrishh 4 місяці тому

    Good one!

  • @paleo3142
    @paleo3142 Місяць тому

    Love these videos! Are the upcoming videos on this channel as well?

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Soon! Just got back from Parental Leave and will be shipping the rest.

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @ayushshende4290
    @ayushshende4290 3 місяці тому

    When is the next one dropping, monorepos had always been messy to create, waiting for this series.

    • @anthonyshewww
      @anthonyshewww  3 місяці тому

      😁 x.com/anthonysheww/status/1823732138010927193?s=46&t=Qbb4n7Ixuzo4TIFQnqFxfA

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @gold-junge91
    @gold-junge91 3 місяці тому

    Nice video. When is part 2 coming?

    • @anthonyshewww
      @anthonyshewww  3 місяці тому

      😁 x.com/anthonysheww/status/1823732138010927193?s=46&t=Qbb4n7Ixuzo4TIFQnqFxfA

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @sundarpaulD
    @sundarpaulD 3 місяці тому

    Can you show us how to setup development env similar to your.

  • @IkraamDev
    @IkraamDev 4 місяці тому

    Respect for the Neovim.

  • @MinhajulIslam-h8s
    @MinhajulIslam-h8s 16 днів тому

    In our Expo app, we had to patch a dependency, but now that we’ve set up TurboRepo with the Expo app, the patch is no longer working.

  • @rushabhhere
    @rushabhhere 3 місяці тому +1

    When will you be releasing the next video?

    • @anthonyshewww
      @anthonyshewww  2 місяці тому +1

      I’m currently on parental leave but will be swiftly back to shipping these in a month or so!

    • @rushabhhere
      @rushabhhere 2 місяці тому

      @@anthonyshewww Okay, all the best!!

    • @anthonyshewww
      @anthonyshewww  Місяць тому +1

      @@rushabhhere Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

    • @rushabhhere
      @rushabhhere Місяць тому

      @@anthonyshewww Thanks man!

  • @user-bi6gn9ot9o
    @user-bi6gn9ot9o 4 місяці тому

    Great video. I'm new to monorepos and I have a quick question. Can't we just use pnpm workspaces to create monorepos? What's the advantage of using turborepo and pnpm in combination?

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      - Cache work you’ve already done so you stay fast at all scales
      - Ensure task ordering, no matter the complexity of the scripts you need to run

  • @lfbarni
    @lfbarni 4 місяці тому

    what would you say Yarn compares to PNPM in the monorepo context?

    • @anthonyshewww
      @anthonyshewww  4 місяці тому +1

      In my experience, pnpm is by far the best package manager for monorepos.
      In contrast, after helping *so many* people debug in their monorepos, I can usually guess which package manager someone is using based on the bizarre error they’re reporting - and it’s nearly always Yarn. I recommend moving away from it if you can.

  • @filipniklas
    @filipniklas 4 місяці тому

    Great video, but I have a question. How do you manage a scenario where a new version of a type package is committed, and ready to be consumed by the frontend but not the backend (which relies on the old one)? Basically, how to handle different versions of apps in the same codebase?

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      What do you mean by “a type package”? Want to make sure I’m understanding correctly.

    • @filipniklas
      @filipniklas 4 місяці тому

      @@anthonyshewww like a package that just contains typescript types for stuff like API requests, responsed, data structures etc

  • @MuhamadAzizPrasetyo
    @MuhamadAzizPrasetyo 4 місяці тому

    lets go!

  • @PrashantSingh-pw1ze
    @PrashantSingh-pw1ze 4 місяці тому

    today I learned alot. when's the nest part coming.

    • @anthonyshewww
      @anthonyshewww  4 місяці тому +1

      Best feedback! As soon as I can. Trying not to rush these because I want high quality but working as hard as i can at it. 🤞

    • @anthonyshewww
      @anthonyshewww  Місяць тому +1

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @yuyistira
    @yuyistira Місяць тому

    may you share your vim configuration please (also some tutorial) ? :D

  • @indiaandtheworld9181
    @indiaandtheworld9181 4 місяці тому

    Waiting for part 2

  • @ryuichimiyazaki4032
    @ryuichimiyazaki4032 Місяць тому

    Is there a part 2? Can't find it

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @MyGeorge1964
    @MyGeorge1964 4 місяці тому

    Okay, this is a good start... I tried to setup a Turbo repo but..., I want to create a shadcn/ui repo w/ tailwindcss and all that good stuff (not to be confused with the template 'ui repo') as one source of truth while being able to then create UI components in the "ui repo" to be used in the apps/ workspace.Either Turborepo wasn't playing nice or I was... well, let's just say not successful. The same thing happened with setup prisma although it did seem to work... The `client.ts` was giving me squiggles...

  • @not_a_human_being
    @not_a_human_being 3 місяці тому

    Lol, sounds so easy, now please do a video on how to share "tailwind config" across the repos, so you can import some non-trivial button, but some good stuff like ShadCN.

    • @anthonyshewww
      @anthonyshewww  2 місяці тому

      Will do!

    • @not_a_human_being
      @not_a_human_being 2 місяці тому

      @@anthonyshewww I tried my best and failed... if you could do that - it'll be amazing, but at this point - I've gave up. But maybe you can do this, good luck! For me it's a lost cause at this point!

  • @hakanaki
    @hakanaki 4 місяці тому

    Is it possible to add and express app to turborepo ?

    • @anthonyshewww
      @anthonyshewww  4 місяці тому +1

      Yes! Turborepo works with all your favorite tools.

  • @naufalnasrullah6965
    @naufalnasrullah6965 2 місяці тому

    where i can watch the part 2?

    • @anthonyshewww
      @anthonyshewww  2 місяці тому

      I’m currently on parental leave but will be swiftly back to shipping these in a few weeks!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @seannewell397
    @seannewell397 4 місяці тому +1

    im deep in yarn land rn so your definition of workspace is fuuuun lol

    • @anthonyshewww
      @anthonyshewww  4 місяці тому +1

      1. Sorry. 😬 2. Don’t worry, you’re only one `npx @turbo/workspaces convert` command away from not using yarn anymore!
      www.npmjs.com/package/@turbo/workspaces

  • @andreanemet418
    @andreanemet418 4 місяці тому

    would you use biome instead of eslint & prettier?

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      I actually just got done implementing Biome into a really large codebase and liked it! There are still some missing features, but it’s pretty great overall.
      If you’re looking for just a linter, Oxlint from the OXC family of tools is pretty great, too.

    • @andreanemet418
      @andreanemet418 4 місяці тому

      @@anthonyshewww Would be nice to see you using Biome here as there are not many examples, especially with TurboRepo. Your insights on implementing Biome into a large codebase would be valuable.

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      @@andreanemet418 I'm not sure what there is demo beyond their doc: biomejs.dev/guides/getting-started/
      What questions do you have after reading that?

    • @andreanemet418
      @andreanemet418 4 місяці тому

      @@anthonyshewww There are already quite a few examples of ESLint and Prettier with TurboRepo out there. It would be nice to see Biome with TurboRepo, especially with your insights on handling large monorepos. Tips and tricks for bigger codebases would be incredibly valuable because simple examples with exporting three components in UI packages are quite a few over the internet. I hope my suggestions are not taken as pressure; I just wanted to point this out because you asked what people want to see. Pointing me to the Biome docs makes me think about why TurboRepo videos exist if TurboRepo has docs too, you see where I’m going? Thanks!

  • @dgcp354
    @dgcp354 4 місяці тому

    whats you font?, its beautiful

  • @thesobercoder
    @thesobercoder 4 місяці тому

    Nice font. Mind sharing the name?

  • @iamAmeeeeeer
    @iamAmeeeeeer 3 місяці тому

    still waiting on the video where u said u would build a new package in turborepo

    • @anthonyshewww
      @anthonyshewww  3 місяці тому

      😁 x.com/anthonysheww/status/1823732138010927193?s=46&t=Qbb4n7Ixuzo4TIFQnqFxfA

  • @JohnAmao-k3f
    @JohnAmao-k3f 4 місяці тому

    Creative title

    • @anthonyshewww
      @anthonyshewww  4 місяці тому +1

      I’m so glad you said this. I thought it was so clever. 😂

  • @DzintarsDev
    @DzintarsDev 4 місяці тому

    Monorepo != one single Git/Hg repository!

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      Interesting. How do you prefer to define it?

    • @DzintarsDev
      @DzintarsDev 4 місяці тому

      @@anthonyshewww You operate on top of entire Git server and use appropriate tooling to tie things together.

    • @vaisakh_km
      @vaisakh_km 4 місяці тому

      I was thinking like that only... python testing team in the place i work has 1 giant repo with all project in it, and has few internal packages commonly that shared between them (like auth, servicenow-selenium connecter)...
      will it be considered as mono repo?

  • @moosegoose1282
    @moosegoose1282 2 місяці тому

    part 2?

    • @anthonyshewww
      @anthonyshewww  2 місяці тому

      I’m currently on parental leave but will be swiftly back to shipping these in a few weeks!

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @mujibulhaquetanim
    @mujibulhaquetanim 2 місяці тому

    where are the remaining videos, bro? 🙄

    • @anthonyshewww
      @anthonyshewww  2 місяці тому

      I’m currently on parental leave but will be swiftly back to shipping these in a month or so!

    • @mujibulhaquetanim
      @mujibulhaquetanim 2 місяці тому

      @@anthonyshewww Masha Allah, congratulations. I hope to watch you soon.

    • @anthonyshewww
      @anthonyshewww  Місяць тому

      @@mujibulhaquetanim Part 2! Sorry for the delay: ua-cam.com/video/oHag57_zRs8/v-deo.html

  • @thechoephix
    @thechoephix 4 місяці тому

    Is this what vim looks like nowadays?

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      😎

    • @thechoephix
      @thechoephix 4 місяці тому

      @@anthonyshewww No, seriously, how do I make it look like that? XD

    • @anthonyshewww
      @anthonyshewww  4 місяці тому

      @@thechoephixOh, sorry. 😂 Here are my out-of-date dotfiles. Will try to update soon once I settle a couple of things.
      github.com/anthonyshew/dotfiles

    • @thechoephix
      @thechoephix 4 місяці тому

      @@anthonyshewww Thanks! 😎