• Stars
    star
    141
  • Rank 259,169 (Top 6 %)
  • Language
    TypeScript
  • Created about 3 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lightning Talk at Nuxt Nation 2021. Now updated to Nuxt 3.

πŸ™‹πŸ½β€β™‚οΈ Domain-Driven Design & Nuxt - Using Nuxt Modules to structure large Nuxt Apps

⚑️ Talk at NUXT NATION 2021 by Anton Reindl

In this talk I will introduce Domain Driven Design and talk about structuring apps according to domain modules, and demonstrate how to use Nuxt modules to create independent submodules including Vuex modules and routes.

Nuxt 3

I have implememented a quick proof-of-concept how this can be done using hooks in Nuxt 3

Look into branch: Nuxt 3

Nuxt 2

πŸ‘¨πŸΌβ€πŸ’» Demo

  1. This Nuxt.js 2 app is a barebone create-nuxt-app installation
  2. As a showcase example, the app adds two modules: a blog module and a shop module
  3. The modules are implemented as a Nuxt Module with their individual routing, store, etc.

πŸ“š Resources

  • Slides of this Talk
  • Blog post Domain-Driven Design in Nuxt Apps by Filip Rakowski
  • Recommended DDD-Books:
    • Domain-Driven Design: Tackling Complexity in the Heart of Software - by Eric Evans
    • Implementing Domain-Driven Design by Vaughn Vernon
    • Domain-Driven Design Distilled by Vaughn Vernon

πŸ‘¨πŸ½β€πŸ’Ό Demo Build Setup

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate

For detailed explanation on how things work in Nuxt.js, check out the documentation.