Special feature generator
Generate a complete auth flow
Naming a feature auth activates the dedicated generator. It creates the full authentication flow and adapts the implementation to the stack saved in fsd.config.json.
Commands
npx create-fsd-architecture --generate feature authnpx create-fsd-architecture -g feature authnpx create-fsd-architecture --generate feature auth --forceGenerated flow
Stack-aware output
Axios or Fetch
Creates API functions using the configured client.
TanStack Query
Adds React Query hooks, Vue Query composables, or Svelte Query accessors for the selected framework.
Framework-native stores
Creates Zustand, Redux Toolkit, Pinia, or Svelte store auth state and reusable helpers.
Redux Toolkit
Creates a reducer, actions, selectors, and registers the reducer.
Typed form validation
Uses React Hook Form, VeeValidate, or Superforms with Zod for every auth step.
Minimal stack
Keeps the generated feature UI-focused when optional tools are disabled.
SvelteKit output
In sveltekit projects, the command generates native Svelte 5 components for all five auth steps, TanStack Svelte Query v6 accessors, a Svelte auth store, and Superforms + Zod 4 validation. Forms use SvelteKit progressive enhancement while keeping their server-ready validation contract.
Vue output
In vue-vite and nuxt projects, the same command generates Vue single-file components for login, registration, password recovery, reset, and verification, plus Vue Query composables, a Pinia store, and VeeValidate + Zod forms when enabled. Nuxt uses its configured modules and SSR-aware Vue Query plugin.
Generated structure
src/features/auth/
├── api/
├── lib/
├── model/
├── ui/
└── index.tsExact files vary with the configured API, state, and forms choices. Existing auth files are protected unless you pass --force.
Nuxt writes the same feature under app/features/authbecause its framework adapter owns the app/ source root. SvelteKit writes it under src/features/auth.