<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ashraf qopiah</title>
    <description>The latest articles on DEV Community by ashraf qopiah (@ashraf_qopiah).</description>
    <link>https://dev.to/ashraf_qopiah</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4136388%2Fa5df49aa-38d2-4998-87aa-275dbd2d3a8e.png</url>
      <title>DEV Community: ashraf qopiah</title>
      <link>https://dev.to/ashraf_qopiah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ashraf_qopiah"/>
    <language>en</language>
    <item>
      <title>Introducing create-fsd-architecture: Start with Feature-Sliced Design from Day One</title>
      <dc:creator>ashraf qopiah</dc:creator>
      <pubDate>Mon, 21 Sep 2026 20:32:39 +0000</pubDate>
      <link>https://dev.to/ashraf_qopiah/introducing-create-fsd-architecture-start-with-feature-sliced-design-from-day-one-3i1o</link>
      <guid>https://dev.to/ashraf_qopiah/introducing-create-fsd-architecture-start-with-feature-sliced-design-from-day-one-3i1o</guid>
      <description>&lt;p&gt;Starting a frontend project is easy.&lt;/p&gt;

&lt;p&gt;Keeping its architecture clear after the first few features is the hard part.&lt;/p&gt;

&lt;p&gt;At the beginning, almost every folder structure looks reasonable. Then the project grows. A shared component starts containing business logic. A feature imports directly from another feature. Route files become responsible for everything. Every developer has a different answer to the same question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Where should this code live?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the problem I wanted to reduce with &lt;strong&gt;create-fsd-architecture&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is an open-source CLI that creates frontend projects with a complete &lt;a href="https://fsd-docs.vercel.app" rel="noopener noreferrer"&gt;Feature-Sliced Design structure&lt;/a&gt;, remembers the stack selected for the project, and generates framework-aware slices later without asking the same setup questions again.&lt;/p&gt;

&lt;p&gt;The project is available on &lt;a href="https://www.npmjs.com/package/create-fsd-architecture?activeTab=readme" rel="noopener noreferrer"&gt;npm&lt;/a&gt;, and the source code is on &lt;a href="https://github.com/FSD-CLI/cli" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This article describes version &lt;code&gt;2.5.0&lt;/code&gt;, the current release at the time of writing.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is a CLI?
&lt;/h2&gt;

&lt;p&gt;CLI stands for &lt;strong&gt;Command-Line Interface&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of opening a visual setup screen and configuring a project manually, you run a command in your terminal. The tool asks for the decisions it needs, creates the project, configures the selected stack, and gives you a consistent starting point.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest my-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That command starts an interactive setup where you can choose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The framework&lt;/li&gt;
&lt;li&gt;The API client&lt;/li&gt;
&lt;li&gt;The server-state solution&lt;/li&gt;
&lt;li&gt;The client-state solution&lt;/li&gt;
&lt;li&gt;The forms and validation stack&lt;/li&gt;
&lt;li&gt;The package manager&lt;/li&gt;
&lt;li&gt;Whether dependencies should be installed&lt;/li&gt;
&lt;li&gt;Whether the development server should start&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The CLI is not only a folder generator. It owns the full project-creation lifecycle and can continue helping after the project is created.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why build a CLI around Feature-Sliced Design?
&lt;/h2&gt;

&lt;p&gt;Feature-Sliced Design gives frontend projects a clear set of architectural layers and boundaries. But understanding the methodology and applying it consistently are two different things.&lt;/p&gt;

&lt;p&gt;A starter repository can give you the first structure, but it does not automatically answer what should happen when you add a new feature, entity, widget, or page three months later.&lt;/p&gt;

&lt;p&gt;The goal of this CLI is to make the architectural decision repeatable:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create the complete FSD structure from day one.&lt;/li&gt;
&lt;li&gt;Save the selected technical stack in the project.&lt;/li&gt;
&lt;li&gt;Generate future slices based on that saved configuration.&lt;/li&gt;
&lt;li&gt;Respect the routing and runtime conventions of the selected framework.&lt;/li&gt;
&lt;li&gt;Protect existing work when generation or setup fails.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It is intentionally opinionated. The point is not to generate every possible project shape. The point is to give the project a clear map from the beginning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Supported frameworks
&lt;/h2&gt;

&lt;p&gt;The current release includes five stable templates:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Template ID&lt;/th&gt;
&lt;th&gt;Framework&lt;/th&gt;
&lt;th&gt;Template source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;react-vite&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;React + Vite&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/FSD-CLI/FSD" rel="noopener noreferrer"&gt;Open template&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;nextjs&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Next.js with App Router&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/FSD-CLI/FSD-NEXTJS" rel="noopener noreferrer"&gt;Open template&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;vue-vite&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Vue + Vite&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/FSD-CLI/fsd-vue" rel="noopener noreferrer"&gt;Open template&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;nuxt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Nuxt 4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/FSD-CLI/fsd-nuxt" rel="noopener noreferrer"&gt;Open template&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sveltekit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;SvelteKit&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/FSD-CLI/fsd-sveltekit" rel="noopener noreferrer"&gt;Open template&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You can inspect the available templates at any time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest &lt;span class="nt"&gt;--list-templates&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or select one directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest my-app &lt;span class="nt"&gt;--framework&lt;/span&gt; nextjs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  A complete FSD structure from day one
&lt;/h2&gt;

&lt;p&gt;The generated project contains the six primary FSD layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/
├── app/          # App setup, providers, routing, and global styles
├── pages/        # Route-level compositions
├── widgets/      # Large reusable interface blocks
├── features/     # User interactions and business actions
├── entities/     # Business entities and their representations
└── shared/       # API, assets, config, utilities, types, and UI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The core segments are present from the beginning. Documentation placeholders keep intentionally empty architectural directories available after cloning the Git repository.&lt;/p&gt;

&lt;p&gt;There are two framework-specific details worth calling out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nuxt&lt;/strong&gt; keeps the complete layers under its official &lt;code&gt;app/&lt;/code&gt; source directory. Thin file-based route wrappers live separately in &lt;code&gt;app/app/routes&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SvelteKit&lt;/strong&gt; keeps the FSD layers under &lt;code&gt;src/&lt;/code&gt; and reserves &lt;code&gt;src/routes&lt;/code&gt; for thin route wrappers. Because SvelteKit already owns the &lt;code&gt;$app&lt;/code&gt; alias, the generated project uses &lt;code&gt;$fsd-app&lt;/code&gt; for the FSD app layer, plus aliases such as &lt;code&gt;$pages&lt;/code&gt; and &lt;code&gt;$shared&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The framework keeps control of its routing convention. FSD keeps control of application structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the stack once
&lt;/h2&gt;

&lt;p&gt;Different frameworks need different defaults. The CLI uses a capability matrix to offer valid choices for each framework and reject invalid cross-framework combinations.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Framework&lt;/th&gt;
&lt;th&gt;API client&lt;/th&gt;
&lt;th&gt;Server state&lt;/th&gt;
&lt;th&gt;Client state&lt;/th&gt;
&lt;th&gt;Forms&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;React + Vite&lt;/td&gt;
&lt;td&gt;Axios or Fetch&lt;/td&gt;
&lt;td&gt;TanStack React Query or none&lt;/td&gt;
&lt;td&gt;Zustand, Redux Toolkit, or none&lt;/td&gt;
&lt;td&gt;React Hook Form + Zod or none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Next.js&lt;/td&gt;
&lt;td&gt;Axios or Fetch&lt;/td&gt;
&lt;td&gt;TanStack React Query or none&lt;/td&gt;
&lt;td&gt;Zustand, Redux Toolkit, or none&lt;/td&gt;
&lt;td&gt;React Hook Form + Zod or none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vue + Vite&lt;/td&gt;
&lt;td&gt;Axios or Fetch&lt;/td&gt;
&lt;td&gt;TanStack Vue Query or none&lt;/td&gt;
&lt;td&gt;Pinia or none&lt;/td&gt;
&lt;td&gt;VeeValidate + Zod or none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nuxt&lt;/td&gt;
&lt;td&gt;Axios or native &lt;code&gt;$fetch&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;TanStack Vue Query or none&lt;/td&gt;
&lt;td&gt;Pinia or none&lt;/td&gt;
&lt;td&gt;VeeValidate + Zod or none&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SvelteKit&lt;/td&gt;
&lt;td&gt;Axios or Fetch&lt;/td&gt;
&lt;td&gt;TanStack Svelte Query or none&lt;/td&gt;
&lt;td&gt;Svelte stores or none&lt;/td&gt;
&lt;td&gt;SvelteKit Superforms + Zod or none&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every framework supports these package managers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;npm&lt;/li&gt;
&lt;li&gt;pnpm&lt;/li&gt;
&lt;li&gt;Yarn&lt;/li&gt;
&lt;li&gt;Bun&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For repeatable local automation, CI, or demos, every important choice can be passed as a flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest my-app &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--framework&lt;/span&gt; react-vite &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--package-manager&lt;/span&gt; pnpm &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--api-client&lt;/span&gt; fetch &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--server-state&lt;/span&gt; react-query &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--client-state&lt;/span&gt; redux &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--forms&lt;/span&gt; react-hook-form-zod &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--yes&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--no-start&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use &lt;code&gt;none&lt;/code&gt; for the optional server-state, client-state, or forms capabilities supported by the selected framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  The project remembers its configuration
&lt;/h2&gt;

&lt;p&gt;After creation, the selected stack is stored in &lt;code&gt;fsd.config.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"$schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://raw.githubusercontent.com/FSD-CLI/cli/main/schema/fsd.config.schema.json"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"schemaVersion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"packageManager"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"apiClient"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"axios"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"serverState"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react-query"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"clientState"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"zustand"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"forms"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react-hook-form-zod"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ui"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"shared-ui"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"framework"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react-vite"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This file is important because future generators read it automatically.&lt;/p&gt;

&lt;p&gt;If the project uses Redux, the generator can create Redux-aware files. If it uses Zustand, it can generate a Zustand integration. If forms or server state are disabled, it does not add those dependencies to the generated slice.&lt;/p&gt;

&lt;p&gt;The project makes the decision once. The generators reuse it later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate slices inside an existing project
&lt;/h2&gt;

&lt;p&gt;The CLI currently supports four generator types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;feature&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;entity&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;widget&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;page&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest &lt;span class="nt"&gt;--generate&lt;/span&gt; feature checkout
npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; entity product
npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; widget navbar
npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; page settings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each generated slice gets a public API through its root &lt;code&gt;index.ts&lt;/code&gt;. The files inside the slice are adapted to the selected framework and stack.&lt;/p&gt;

&lt;h3&gt;
  
  
  The complete auth generator
&lt;/h3&gt;

&lt;p&gt;Authentication is usually bigger than one login form, so &lt;code&gt;feature auth&lt;/code&gt; is treated as a complete flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; feature auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It generates the UI and supporting files for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login&lt;/li&gt;
&lt;li&gt;Registration&lt;/li&gt;
&lt;li&gt;Forgot password&lt;/li&gt;
&lt;li&gt;Reset password&lt;/li&gt;
&lt;li&gt;Verification code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Depending on the saved stack, the generated feature can also include typed form components, Zod schemas, query mutations, API functions, and the selected client-state integration.&lt;/p&gt;

&lt;p&gt;The output is framework-native. React and Next.js receive React components, Vue and Nuxt receive Vue components, and SvelteKit receives Svelte components with its selected form and state contracts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Page generation also updates routing
&lt;/h2&gt;

&lt;p&gt;Generating an FSD page slice is only half the job. The application also needs a route that renders that page.&lt;/p&gt;

&lt;p&gt;The page generator handles that integration using the framework's normal routing model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React + Vite: registers a React Router route&lt;/li&gt;
&lt;li&gt;Vue + Vite: registers a Vue Router route&lt;/li&gt;
&lt;li&gt;Next.js: creates a thin App Router route file&lt;/li&gt;
&lt;li&gt;Nuxt: creates a thin file-based route wrapper&lt;/li&gt;
&lt;li&gt;SvelteKit: creates a thin &lt;code&gt;+page.svelte&lt;/code&gt; route wrapper&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The route layer stays thin while the page composition stays inside the FSD &lt;code&gt;pages&lt;/code&gt; layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Safe previews with &lt;code&gt;--dry-run&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;You should be able to see what a generator intends to change before it writes anything.&lt;/p&gt;

&lt;p&gt;For project creation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest my-app &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--framework&lt;/span&gt; vue-vite &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--yes&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--dry-run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For slice generation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; page settings &lt;span class="nt"&gt;--dry-run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI prints the project or file plan and does not change the filesystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conflict protection and rollback
&lt;/h2&gt;

&lt;p&gt;Existing projects and slices are protected by default.&lt;/p&gt;

&lt;p&gt;If a target already exists, the CLI stops instead of silently replacing it. You must pass &lt;code&gt;--force&lt;/code&gt; when replacement is intentional:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; feature checkout &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Forced replacement is transactional. The previous target is backed up, and if generation or setup fails, the CLI restores the original state.&lt;/p&gt;

&lt;p&gt;The same idea applies during project creation: incomplete downloads, configuration failures, or commit-tooling failures trigger rollback instead of leaving a half-created project behind.&lt;/p&gt;

&lt;p&gt;Project paths are also checked so a project name cannot escape the current working directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspect and diagnose a project
&lt;/h2&gt;

&lt;p&gt;The CLI includes three inspection commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest check
npx create-fsd-architecture@latest doctor
npx create-fsd-architecture@latest config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;check&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Validates the resolved FSD configuration and confirms that the six required architectural layers exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;doctor&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Runs the project checks and also inspects the local toolchain, including Node.js, Git, and the package manager selected in &lt;code&gt;fsd.config.json&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;config&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Prints the resolved project configuration as JSON. This is useful when debugging a generator or checking an older project where configuration may need to be inferred.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git and commit tooling are part of setup
&lt;/h2&gt;

&lt;p&gt;Creating the source files is not the end of project setup.&lt;/p&gt;

&lt;p&gt;The CLI also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initializes a fresh Git repository&lt;/li&gt;
&lt;li&gt;Removes the template's &lt;code&gt;origin&lt;/code&gt; remote&lt;/li&gt;
&lt;li&gt;Configures Husky hooks&lt;/li&gt;
&lt;li&gt;Adds Commitlint with the Conventional Commits configuration&lt;/li&gt;
&lt;li&gt;Runs linting and builds through the generated Git hooks&lt;/li&gt;
&lt;li&gt;Installs dependencies with the selected package manager when requested&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If dependencies are installed during the interactive flow, the CLI verifies that Commitlint rejects an invalid commit message before completing setup.&lt;/p&gt;

&lt;p&gt;The generated templates also include an FSD architecture check with Steiger as part of their &lt;code&gt;ci&lt;/code&gt; script.&lt;/p&gt;

&lt;h2&gt;
  
  
  Framework-specific behavior
&lt;/h2&gt;

&lt;p&gt;The CLI shares one project lifecycle across all templates, but it does not pretend that every framework behaves the same way.&lt;/p&gt;

&lt;p&gt;Framework adapters own details such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Source-directory location&lt;/li&gt;
&lt;li&gt;Public environment-variable syntax&lt;/li&gt;
&lt;li&gt;API-client generation&lt;/li&gt;
&lt;li&gt;Provider setup&lt;/li&gt;
&lt;li&gt;Client-component requirements&lt;/li&gt;
&lt;li&gt;Route registration&lt;/li&gt;
&lt;li&gt;Framework-specific dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nuxt defaults to native &lt;code&gt;$fetch&lt;/code&gt; and can generate a Vue Query plugin with SSR hydration.&lt;/li&gt;
&lt;li&gt;Vue and Nuxt can configure Pinia, TanStack Vue Query, VeeValidate, and Zod through their native providers or modules.&lt;/li&gt;
&lt;li&gt;SvelteKit defaults to native Fetch, uses &lt;code&gt;PUBLIC_API_BASE&lt;/code&gt;, supports Svelte 5 components, and can configure TanStack Svelte Query, Svelte stores, Superforms, and Zod 4.&lt;/li&gt;
&lt;li&gt;Next.js keeps App Router route files inside &lt;code&gt;src/app&lt;/code&gt;, while route-level FSD compositions remain inside &lt;code&gt;src/pages&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This boundary is one of the most important parts of the project: shared architecture should not require framework-specific code to leak everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful commands in one place
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create a project interactively&lt;/span&gt;
npx create-fsd-architecture@latest my-app

&lt;span class="c"&gt;# Show help and version&lt;/span&gt;
npx create-fsd-architecture@latest &lt;span class="nt"&gt;--help&lt;/span&gt;
npx create-fsd-architecture@latest &lt;span class="nt"&gt;--version&lt;/span&gt;

&lt;span class="c"&gt;# List templates&lt;/span&gt;
npx create-fsd-architecture@latest &lt;span class="nt"&gt;--list-templates&lt;/span&gt;

&lt;span class="c"&gt;# Create without prompts&lt;/span&gt;
npx create-fsd-architecture@latest my-app &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--framework&lt;/span&gt; react-vite &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--yes&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--no-install&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--no-start&lt;/span&gt;

&lt;span class="c"&gt;# Generate slices&lt;/span&gt;
npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; feature auth
npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; entity product
npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; widget header
npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; page dashboard

&lt;span class="c"&gt;# Preview without writing&lt;/span&gt;
npx create-fsd-architecture@latest &lt;span class="nt"&gt;-g&lt;/span&gt; page dashboard &lt;span class="nt"&gt;--dry-run&lt;/span&gt;

&lt;span class="c"&gt;# Inspect the current project&lt;/span&gt;
npx create-fsd-architecture@latest check
npx create-fsd-architecture@latest doctor
npx create-fsd-architecture@latest config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Node.js 20 or later for the CLI&lt;/li&gt;
&lt;li&gt;Node.js 22.22.2 or later for generated Nuxt and SvelteKit projects&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Current validation status
&lt;/h2&gt;

&lt;p&gt;For version &lt;code&gt;2.5.0&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The CLI test suite contains 35 tests.&lt;/li&gt;
&lt;li&gt;The CI matrix runs the CLI on Node.js 20, 22, and 24.&lt;/li&gt;
&lt;li&gt;Framework smoke jobs create, extend, validate, and build all five templates.&lt;/li&gt;
&lt;li&gt;Package-manager smoke jobs create and build the React + Vite template with npm, pnpm, Yarn, and Bun.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can inspect the current workflow runs and their exact results on &lt;a href="https://github.com/FSD-CLI/cli/actions" rel="noopener noreferrer"&gt;GitHub Actions&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this tool is — and what it is not
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;create-fsd-architecture&lt;/code&gt; is an opinionated project scaffolder and code generator built around Feature-Sliced Design.&lt;/p&gt;

&lt;p&gt;It is not a replacement for understanding architecture. It is also not the official Feature-Sliced Design CLI. The methodology, concepts, and official learning resources belong to the Feature-Sliced Design project, which you can explore in the &lt;a href="https://fsd-docs.vercel.app" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The CLI focuses on a different problem: turning an architectural decision into a repeatable project workflow across multiple frontend frameworks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-fsd-architecture@latest my-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then explore the generated structure, inspect &lt;code&gt;fsd.config.json&lt;/code&gt;, and try adding a page or feature.&lt;/p&gt;

&lt;p&gt;If you find a bug, an unsupported use case, or a generator that could be improved, open an issue on &lt;a href="https://github.com/FSD-CLI/cli/issues" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. You can also read the &lt;a href="https://fsd-docs.vercel.app/docs/releases" rel="noopener noreferrer"&gt;changelog&lt;/a&gt; to follow each release.&lt;/p&gt;

&lt;p&gt;If the project helps you, you can support its continued development &lt;a href="https://buymeacoffee.com/ashrafqopiah" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I would especially like feedback from developers already using FSD:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which repeated architectural task should the CLI automate next?&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/create-fsd-architecture?activeTab=readme" rel="noopener noreferrer"&gt;npm package&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FSD-CLI/cli" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fsd-docs.vercel.app" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fsd-docs.vercel.app/docs" rel="noopener noreferrer"&gt;Official Feature-Sliced Design documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fsd-docs.vercel.app/docs/releases" rel="noopener noreferrer"&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FSD-CLI/cli/issues" rel="noopener noreferrer"&gt;Issues and feature requests&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FSD-CLI/cli/actions" rel="noopener noreferrer"&gt;CI status&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ashrafmo-1" rel="noopener noreferrer"&gt;Author on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/ashrafmo1" rel="noopener noreferrer"&gt;Author on LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://buymeacoffee.com/ashrafqopiah" rel="noopener noreferrer"&gt;Support the project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>frontend</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
