Applying clean architecture to my Next.js project

preview_player
Показать описание

00:00 overview
08:10 start of clean architecture talk

Рекомендации по теме
Комментарии
Автор

Awesome! Really love the part about SST, Docker, and Workflows. Infra is usually being glossed over.

gadgetboyplaysmc
Автор

People should throw money at you for this content to be honest.

naughtiousmaximus
Автор

I am more Angular for Enterprise level architectures, mainly because of its module and integrated DI.
For Solid on frontends (or flutter) I do : DataSource (API/DB/Cache) <-> Repository (Data fetching strategy) <-> UseCase (must be a user action) <-> Controller (State management) <- User. DataSource is the only thing that use DTO's, repository calls the DTO <> Domain entity mappers. UseCase's call abstracted repositories, injected by IoC.

BonBaisers
Автор

You are as knowledgeable as the senior dev I work with. I look at people like you and wonder if I will ever reach this level, I feel I'm too low iq to ever evolve this far.

king-manu
Автор

Wow just the right time. I'm learning Next.js by creating a personal project and this is what I've been looking for.

ottenheimer
Автор

I actually leveled up, few months ago I would not understand a thing about what you said. I'm glad that I can follow your videos ❤

metalfort
Автор

i really like videos about this those advanced topics (clean architecture, DDD), would love to see more of it!

solaaar
Автор

Very nice! I definitely agree dependency injection is the way to go on large apps. Specifically inversion of control. Seems like we've gone full circle on PHP now :D Good times ahead

philheathslegalteam
Автор

I'm using the app router a lot lately too, i like to store the components (the things that the page depends on as you said) in a _components folder, just so you can properly see the page.tsx and inside each folder you have things separated.

appel-
Автор

when it will come to unit test this approach will show all its might and benefits. It should be sooo easy to mock any dependencies and it will look very clean.

cidrgtz
Автор

This is the way! Funny thing is this is how I do backend code in C#. Been getting in to nextjs and was like I need to organize this lol

caseyspaulding
Автор

If you have the time to spend feel free to do this amount of abstraction, it's only over engineered if you have other priorities / work is paying you to deliver value and other features need to be delivered. 100% there are benefits of this.

Jrrs
Автор

Great video as always, a request, a video on setting up ci/cd with different envs (dev, stage, prod) from scratch for a react/next project would be total bomb at this point...

rog
Автор

Something you might noticed. If we are to add data access to other entities we need to add another data-access file to talk to db specifically for that entity... almost duplicate code. I usually use generics to pass entity type. Thou not sure if it's possible with drizzle api.

jora
Автор

This was super helpful and even better that you included the source code for this. Would love to see an example of this using Vertical Slice Architecture using features instead of use cases. Keep up the amazing work!

MikeyUchiha
Автор

Is there a way to implement the new shared/wrapper layout.tsx in a NextJs v14 project but still use the old NextJs "pages" folder instead of "app"?

gmartins-dev
Автор

I don't think it is overengineering, especially for large apps. Very nice content!

viniciustomiokuboyama
Автор

Great content! Would you consider making tutorial similar to this?

Jerac
Автор

It's similar to what we do in the .Net projects. Initialy it is slower to get everything together, but in the long run it's much easier to maintain and fix bugs.

zhenwang
Автор

Damn you really have this figured out. Any good resources on this topic? The Clean Architecture book went a bit over my head 😅

codinginflow