bespoyasov / frontend-clean-architecture

React + TypeScript app built using the clean architecture principles in a more functional way.
https://bespoyasov.me/blog/clean-architecture-on-frontend/
2.35k stars 258 forks source link

Nextjs version #2

Closed duythien0912 closed 3 years ago

duythien0912 commented 3 years ago

It will be awesome if we have frontend-clean-architecture for Next.js what do you think 😆

bespoyasov commented 3 years ago

I guess so, yeah! Next is a beautiful framework, although a bit opinionated 😃

But I think we don't need to reinvent anything to use clean architecture principles with a Next.js project. All of the basics are gonna stay the same, like:

There might appear some difficulties with pages/ and api/ though since Next requires to keep all of those in the pages' roots. But they can be solved with adapters :–)