This is the definitive guide on how to implement Clean Architecture in Next.js. We'll start with a short Clean Architecture 101, check out the demo app I created for you, and then get into the layers. If you have any questions, don't hesitate to reach out to me in the comments, or in my Discord server: https://creatures.sh. I hope you like this video!
🔗 Links:
👉 GitHub Repo: https://github.com/nikolovlazar/nextj...
👉 Demo: https://next-clean-arch.vercel.app/
👉 Clean Architecture article: https://blog.cleancoder.com/uncle-bob...
👉 My interpretation diagram: https://app.eraser.io/workspace/fAyjQ...
👉 Configure Inversify in Next.js video: • The missing piece for Clean Architecture i...
👉 Test case naming guide: https://www.epicweb.dev/talks/how-to-...
--
🤝 Become a friend of the channel! Start your membership today and get extra benefits: / @nikolovlazar
💬 A bunch of us are hanging out at https://discord.creatures.sh/. Join us!
🦋 Find me on Bluesky: https://bsky.app/profile/nikolovlazar...
🎥 What I use for coding and making videos: https://nikolovlazar.com/uses
--
Chapters:
00:00 - Intro
00:26 - Clean Architecture 101
07:22 - App Demo
08:04 - Project Structure
11:17 - Frameworks & Drivers Layer (server actions)
13:56 - Interface Adapters Layer (controller)
24:24 - Application Layer (use case)
26:58 - Infrastructure Layer (repository & service)
31:39 - Dependency Injection
35:40 - Unit Tests
42:21 - Sentry and Codecov
43:14 - Tracing
48:21 - Performance Modules
50:03 - Errors
51:15 - Codecov
52:13 - Outro