Getting Started
Creating Layers
Use the nuxt-osdd CLI to scaffold functional and technical Nuxt layers.
nuxt-osdd includes a generator to create one layer at a time in the correct OSDD bucket.
Command
Terminal
npx nuxt-osdd osdd:layer <layer-name> [--technical|--functional]
Examples
Terminal
# Technical layers
npx nuxt-osdd osdd:layer Authentication --technical
npx nuxt-osdd osdd:layer Permissions --technical
# Functional layers
npx nuxt-osdd osdd:layer Contracts --functional
npx nuxt-osdd osdd:layer Posts --functional
# Interactive mode
npx nuxt-osdd osdd:layer
# Help
npx nuxt-osdd --help
What gets created?
A generation command does not create both functional/ and technical/ every time.
It creates one layer in the appropriate root folder.
Example:
Terminal
npx nuxt-osdd osdd:layer Contracts --functional
creates:
functional/
Contracts/
nuxt.config.ts
app/
README.md
And:
Terminal
npx nuxt-osdd osdd:layer Authentication --technical
creates:
technical/
Authentication/
nuxt.config.ts
app/
README.md
Which flag should I use?
Use this rule of thumb:
--technicalfor shared infrastructure: auth, permissions, database, logging, API clients--functionalfor business and product features: users, contracts, orders, billing, posts
Why the generator matters
The generator gives you a consistent starting point for each new layer:
- a valid Nuxt layer via
nuxt.config.ts - a local
app/directory for components, pages, composables, and assets - a
README.mdto document the layer's responsibility
That way, every new layer starts with the same OSDD conventions from day one.