pickstack

Nuxt + shadcn-vue starter

Nuxt, shadcn-vue, Pinia, SEO. A tested combination you can create in one command and keep extending.

$ npm create pickstack@latest my-app -- --framework nuxt --modules tailwind,shadcn-vue,pinia,seo,vitest,testing-library,eslint,prettier --yes
Customize in the configurator

Packages

PackageVersionType
@pinia/nuxt^1.0.3runtime
@vue/devtools-api^8.2.1runtime
class-variance-authority^0.7.1runtime
cn^0.5.2runtime
pinia^4.1.0runtime
reka-ui^2.11.0runtime
shadcn-vue^2.9.0runtime
tw-animate-css^1.4.0runtime
@nuxt/eslint^1.17.0dev
@nuxt/test-utils^4.4.0dev
@tailwindcss/vite^4.3.5dev
@testing-library/dom^10.4.2dev
@testing-library/jest-dom^8.0.0dev
@testing-library/user-event^14.6.13dev
@testing-library/vue^8.1.0dev
@vue/test-utils^2.6.0dev
eslint^10.15.0dev
eslint-config-prettier^10.1.8dev
happy-dom^21.0.4dev
prettier^3.10.1dev
shadcn-nuxt^2.9.0dev
tailwindcss^4.3.5dev
vitest^5.1.1dev

New files

.prettierignore
dist
.nuxt
.output
.data
.nitro
.cache
pnpm-lock.yaml
package-lock.json
yarn.lock
bun.lock
.prettierrc
{}
app/components/ui/button/Button.vue
<script setup lang="ts">
import { cn } from "cn";
import type { PrimitiveProps } from "reka-ui";
import { Primitive } from "reka-ui";
import type { HTMLAttributes } from "vue";
import type { ButtonVariants } from ".";
import { buttonVariants } from ".";

interface Props extends PrimitiveProps {
  variant?: ButtonVariants["variant"];
  size?: ButtonVariants["size"];
  class?: HTMLAttributes["class"];
}

const props = withDefaults(defineProps<Props>(), {
  as: "button",
});
</script>

<template>
  <Primitive
    data-slot="button"
    :data-variant="variant"
    :data-size="size"
    :as="as"
    :as-child="asChild"
    :class="cn(buttonVariants({ variant, size }), props.class)"
  >
    <slot />
  </Primitive>
</template>
app/components/ui/button/index.ts
import type { VariantProps } from "class-variance-authority";
import { cva } from "class-variance-authority";

export { default as Button } from "./Button.vue";

export const buttonVariants = cva(
  "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*=size-])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
        outline:
          "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
        secondary:
          "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
        ghost:
          "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
        destructive:
          "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
        link: "text-primary underline-offset-4 hover:underline",
      },
      size: {
        default:
          "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
        xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*=size-])]:size-3",
        sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*=size-])]:size-3.5",
        lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
        icon: "size-8",
        "icon-xs":
          "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*=size-])]:size-3",
        "icon-sm":
          "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
        "icon-lg": "size-9",
      },
    },
    defaultVariants: {
      variant: "default",
      size: "default",
    },
  },
);
export type ButtonVariants = VariantProps<typeof buttonVariants>;
app/components/ui/card/Card.vue
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";

const props = withDefaults(
  defineProps<{
    class?: HTMLAttributes["class"];
    size?: "default" | "sm";
  }>(),
  {
    size: "default",
  },
);
</script>

<template>
  <div
    data-slot="card"
    :data-size="size"
    :class="
      cn(
        'ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col',
        props.class,
      )
    "
  >
    <slot />
  </div>
</template>
app/components/ui/card/CardAction.vue
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";

const props = defineProps<{
  class?: HTMLAttributes["class"];
}>();
</script>

<template>
  <div
    data-slot="card-action"
    :class="
      cn(
        'col-start-2 row-span-2 row-start-1 self-start justify-self-end',
        props.class,
      )
    "
  >
    <slot />
  </div>
</template>
app/components/ui/card/CardContent.vue
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";

const props = defineProps<{
  class?: HTMLAttributes["class"];
}>();
</script>

<template>
  <div
    data-slot="card-content"
    :class="cn('px-4 group-data-[size=sm]/card:px-3', props.class)"
  >
    <slot />
  </div>
</template>
app/components/ui/card/CardDescription.vue
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";

const props = defineProps<{
  class?: HTMLAttributes["class"];
}>();
</script>

<template>
  <div
    data-slot="card-description"
    :class="cn('text-muted-foreground text-sm', props.class)"
  >
    <slot />
  </div>
</template>
app/components/ui/card/CardFooter.vue
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";

const props = defineProps<{
  class?: HTMLAttributes["class"];
}>();
</script>

<template>
  <div
    data-slot="card-footer"
    :class="
      cn(
        'bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center',
        props.class,
      )
    "
  >
    <slot />
  </div>
</template>
app/components/ui/card/CardHeader.vue
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";

const props = defineProps<{
  class?: HTMLAttributes["class"];
}>();
</script>

<template>
  <div
    data-slot="card-header"
    :class="
      cn(
        'gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]',
        props.class,
      )
    "
  >
    <slot />
  </div>
</template>
app/components/ui/card/CardTitle.vue
<script setup lang="ts">
import { cn } from "cn";
import type { HTMLAttributes } from "vue";

const props = defineProps<{
  class?: HTMLAttributes["class"];
}>();
</script>

<template>
  <div
    data-slot="card-title"
    :class="
      cn(
        'text-base leading-snug font-medium group-data-[size=sm]/card:text-sm cn-font-heading',
        props.class,
      )
    "
  >
    <slot />
  </div>
</template>
app/components/ui/card/index.ts
export { default as Card } from "./Card.vue";
export { default as CardAction } from "./CardAction.vue";
export { default as CardContent } from "./CardContent.vue";
export { default as CardDescription } from "./CardDescription.vue";
export { default as CardFooter } from "./CardFooter.vue";
export { default as CardHeader } from "./CardHeader.vue";
export { default as CardTitle } from "./CardTitle.vue";
app/lib/utils.ts
export { cn } from "cn";
app/stores/counter.ts
import { defineStore } from "pinia";
import { ref } from "vue";

export const useCounterStore = defineStore("counter", () => {
  const count = ref(0);

  function increment() {
    count.value++;
  }

  function decrement() {
    count.value--;
  }

  return { count, increment, decrement };
});
components.json
{
  "$schema": "https://shadcn-vue.com/schema.json",
  "style": "reka-nova",
  "typescript": true,
  "tailwind": {
    "config": "",
    "css": "app/assets/css/main.css",
    "baseColor": "neutral",
    "cssVariables": true,
    "prefix": ""
  },
  "iconLibrary": "lucide",
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/ui",
    "lib": "@/lib",
    "composables": "@/composables"
  }
}
eslint.config.mjs
// @ts-check
import eslintConfigPrettier from "eslint-config-prettier/flat";
import withNuxt from "./.nuxt/eslint.config.mjs";

export default withNuxt(eslintConfigPrettier);
server/routes/robots.txt.ts
export default defineEventHandler((event) => {
  const { siteUrl } = useRuntimeConfig(event).public;
  setHeader(event, "Content-Type", "text/plain; charset=utf-8");
  return `User-agent: *
Allow: /

Sitemap: ${siteUrl}/sitemap.xml
`;
});
server/routes/sitemap.xml.ts
export default defineEventHandler((event) => {
  const { siteUrl } = useRuntimeConfig(event).public;
  setHeader(event, "Content-Type", "application/xml; charset=utf-8");
  return `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>${siteUrl}/</loc>
  </url>
  <url>
    <loc>${siteUrl}/about</loc>
  </url>
</urlset>
`;
});
test/nuxt/CounterCard.test.ts
import { renderSuspended } from "@nuxt/test-utils/runtime";
import userEvent from "@testing-library/user-event";
import { screen } from "@testing-library/vue";
import { describe, expect, it } from "vitest";
import CounterCard from "~/components/CounterCard.vue";

describe("CounterCard", () => {
  it("increments when +1 is clicked", async () => {
    const user = userEvent.setup();
    await renderSuspended(CounterCard);

    await user.click(screen.getByRole("button", { name: "+1" }));

    expect(screen.getByText("1")).toBeInTheDocument();
  });
});
test/nuxt/setup.ts
import "@testing-library/jest-dom/vitest";
import { cleanup } from "@testing-library/vue";
import { afterEach } from "vitest";

afterEach(() => {
  cleanup();
});
vitest.config.ts
import { defineVitestProject } from "@nuxt/test-utils/config";
import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {
    projects: [
      await defineVitestProject({
        test: {
          name: "nuxt",
          include: ["test/nuxt/*.{test,spec}.ts"],
          environment: "nuxt",
          setupFiles: ["./test/nuxt/setup.ts"],
        },
      }),
    ],
  },
});

Changes to existing files

app/app.vue (changed)
+<script setup lang="ts">+const { siteUrl } = useRuntimeConfig().public;+const route = useRoute();+ +useHead({+  link: [{ rel: "canonical", href: () => `${siteUrl}${route.path}` }],+  script: [+    {+      type: "application/ld+json",+      innerHTML: JSON.stringify({+        "@context": "https://schema.org",+        "@type": "WebSite",+        name: "my-app",+        url: siteUrl,+      }),+    },+  ],+});+ +useSeoMeta({+  description: "my-app: a web app.",+  ogType: "website",+  ogSiteName: "my-app",+  ogUrl: () => `${siteUrl}${route.path}`,+  twitterCard: "summary",+});+</script>+  <template>   <NuxtRouteAnnouncer />+  <main+    class="flex min-h-screen flex-col items-center justify-center gap-8 bg-slate-50 p-8 text-slate-900"+  >+    <nav class="flex gap-4 text-sm font-medium">+      <NuxtLink class="text-slate-600 hover:text-slate-900" to="/">+        Home+      </NuxtLink>+      <NuxtLink class="text-slate-600 hover:text-slate-900" to="/about">+        About+      </NuxtLink>−  <main class="app">−    <nav class="nav">−      <NuxtLink class="link" to="/">Home</NuxtLink>−      <NuxtLink class="link" to="/about">About</NuxtLink>     </nav>     <NuxtPage />   </main>⋯ 2 unchanged lines
app/assets/css/main.css (changed)
+@import "tailwindcss";+@import "tw-animate-css";+@import "shadcn-vue/tailwind.css";−:root {−  font-family: system-ui, sans-serif;−  color: #0f172a;−  background: #f8fafc;−}  +@custom-variant dark (&:is(.dark *));−body {−  margin: 0;−}  +@theme inline {+  --font-heading: var(--font-sans);+  --color-sidebar-ring: var(--sidebar-ring);+  --color-sidebar-border: var(--sidebar-border);+  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);+  --color-sidebar-accent: var(--sidebar-accent);+  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);+  --color-sidebar-primary: var(--sidebar-primary);+  --color-sidebar-foreground: var(--sidebar-foreground);+  --color-sidebar: var(--sidebar);+  --color-chart-5: var(--chart-5);+  --color-chart-4: var(--chart-4);+  --color-chart-3: var(--chart-3);+  --color-chart-2: var(--chart-2);+  --color-chart-1: var(--chart-1);+  --color-ring: var(--ring);+  --color-input: var(--input);+  --color-border: var(--border);+  --color-destructive: var(--destructive);+  --color-accent-foreground: var(--accent-foreground);+  --color-accent: var(--accent);+  --color-muted-foreground: var(--muted-foreground);+  --color-muted: var(--muted);+  --color-secondary-foreground: var(--secondary-foreground);+  --color-secondary: var(--secondary);+  --color-primary-foreground: var(--primary-foreground);+  --color-primary: var(--primary);+  --color-popover-foreground: var(--popover-foreground);+  --color-popover: var(--popover);+  --color-card-foreground: var(--card-foreground);+  --color-card: var(--card);+  --color-foreground: var(--foreground);+  --color-background: var(--background);+  --radius-sm: calc(var(--radius) * 0.6);+  --radius-md: calc(var(--radius) * 0.8);+  --radius-lg: var(--radius);+  --radius-xl: calc(var(--radius) * 1.4);+  --radius-2xl: calc(var(--radius) * 1.8);+  --radius-3xl: calc(var(--radius) * 2.2);+  --radius-4xl: calc(var(--radius) * 2.6);−.app {−  min-height: 100vh;−  display: flex;−  flex-direction: column;−  align-items: center;−  justify-content: center;−  gap: 2rem;−  padding: 2rem;−  box-sizing: border-box; }  +:root {+  --background: oklch(1 0 0);+  --foreground: oklch(0.145 0 0);+  --card: oklch(1 0 0);+  --card-foreground: oklch(0.145 0 0);+  --popover: oklch(1 0 0);+  --popover-foreground: oklch(0.145 0 0);+  --primary: oklch(0.205 0 0);+  --primary-foreground: oklch(0.985 0 0);+  --secondary: oklch(0.97 0 0);+  --secondary-foreground: oklch(0.205 0 0);+  --muted: oklch(0.97 0 0);+  --muted-foreground: oklch(0.556 0 0);+  --accent: oklch(0.97 0 0);+  --accent-foreground: oklch(0.205 0 0);+  --destructive: oklch(0.577 0.245 27.325);+  --border: oklch(0.922 0 0);+  --input: oklch(0.922 0 0);+  --ring: oklch(0.708 0 0);+  --chart-1: oklch(0.87 0 0);+  --chart-2: oklch(0.556 0 0);+  --chart-3: oklch(0.439 0 0);+  --chart-4: oklch(0.371 0 0);+  --chart-5: oklch(0.269 0 0);+  --radius: 0.625rem;+  --sidebar: oklch(0.985 0 0);+  --sidebar-foreground: oklch(0.145 0 0);+  --sidebar-primary: oklch(0.205 0 0);+  --sidebar-primary-foreground: oklch(0.985 0 0);+  --sidebar-accent: oklch(0.97 0 0);+  --sidebar-accent-foreground: oklch(0.205 0 0);+  --sidebar-border: oklch(0.922 0 0);+  --sidebar-ring: oklch(0.708 0 0);−.title {−  font-size: 1.875rem;−  margin: 0; }  +.dark {+  --background: oklch(0.145 0 0);+  --foreground: oklch(0.985 0 0);+  --card: oklch(0.205 0 0);+  --card-foreground: oklch(0.985 0 0);+  --popover: oklch(0.205 0 0);+  --popover-foreground: oklch(0.985 0 0);+  --primary: oklch(0.922 0 0);+  --primary-foreground: oklch(0.205 0 0);+  --secondary: oklch(0.269 0 0);+  --secondary-foreground: oklch(0.985 0 0);+  --muted: oklch(0.269 0 0);+  --muted-foreground: oklch(0.708 0 0);+  --accent: oklch(0.269 0 0);+  --accent-foreground: oklch(0.985 0 0);+  --destructive: oklch(0.704 0.191 22.216);+  --border: oklch(1 0 0 / 10%);+  --input: oklch(1 0 0 / 15%);+  --ring: oklch(0.556 0 0);+  --chart-1: oklch(0.87 0 0);+  --chart-2: oklch(0.556 0 0);+  --chart-3: oklch(0.439 0 0);+  --chart-4: oklch(0.371 0 0);+  --chart-5: oklch(0.269 0 0);+  --sidebar: oklch(0.205 0 0);+  --sidebar-foreground: oklch(0.985 0 0);+  --sidebar-primary: oklch(0.488 0.243 264.376);+  --sidebar-primary-foreground: oklch(0.985 0 0);+  --sidebar-accent: oklch(0.269 0 0);+  --sidebar-accent-foreground: oklch(0.985 0 0);+  --sidebar-border: oklch(1 0 0 / 10%);+  --sidebar-ring: oklch(0.556 0 0);−.nav {−  display: flex;−  gap: 1rem; }  +@layer base {+  * {+    @apply border-border outline-ring/50;+  }+  body {+    @apply bg-background text-foreground;+    @apply font-sans;+  }−.link {−  color: #475569;−  text-decoration: none;−  font-weight: 500; }  −.link:hover {−  color: #0f172a;−}− −.page {−  display: flex;−  flex-direction: column;−  align-items: center;−  gap: 1.5rem;−}− −.text {−  max-width: 28rem;−  text-align: center;−  color: #475569;−}− −.card {−  background: #fff;−  padding: 2rem;−  border-radius: 1rem;−  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);−  text-align: center;−}− −.count {−  font-size: 3rem;−  font-weight: 700;−  margin: 0;−  font-variant-numeric: tabular-nums;−}− −.row {−  margin-top: 1.5rem;−  display: flex;−  justify-content: center;−  gap: 0.75rem;−}− −.btn {−  background: #0f172a;−  color: #fff;−  border: 0;−  border-radius: 0.5rem;−  padding: 0.5rem 1rem;−  font: inherit;−  cursor: pointer;−}− −.btn:hover {−  background: #334155;−}− 
app/components/CounterCard.vue (changed)
 <script setup lang="ts">+import { useCounterStore } from "~/stores/counter";−import { ref } from "vue";  +const counter = useCounterStore();−const count = ref(0); </script>   <template>+  <Card class="w-72 text-center">+    <CardHeader>+      <CardTitle>Counter</CardTitle>+    </CardHeader>+    <CardContent>+      <p class="text-5xl font-bold tabular-nums">{{ counter.count }}</p>+    </CardContent>+    <CardFooter class="justify-center gap-3">+      <Button variant="outline" @click="counter.decrement()">-1</Button>+      <Button @click="counter.increment()">+1</Button>+    </CardFooter>+  </Card>−  <div class="card">−    <p class="count">{{ count }}</p>−    <div class="row">−      <button type="button" class="btn" @click="count--">-1</button>−      <button type="button" class="btn" @click="count++">+1</button>−    </div>−  </div> </template>  
app/pages/about.vue (changed)
+<script setup lang="ts">+useSeoMeta({ title: "About" });+</script>+  <template>+  <section class="flex flex-col items-center gap-6">+    <h1 class="text-3xl font-bold tracking-tight">About</h1>+    <p class="max-w-md text-center text-slate-600">+      Built with Nuxt 4, Vue 3, TypeScript, Tailwind CSS, shadcn-vue, Pinia,+      Vitest, Testing Library, ESLint, Prettier, SEO.+    </p>−  <section class="page">−    <h1 class="title">About</h1>−    <p class="text">Built with Nuxt 4, Vue 3, TypeScript.</p>   </section> </template>  
app/pages/index.vue (changed)
+<script setup lang="ts">+useSeoMeta({ title: "Home" });+</script>+  <template>+  <section class="flex flex-col items-center gap-6">+    <h1 class="text-3xl font-bold tracking-tight">my-app</h1>−  <section class="page">−    <h1 class="title">my-app</h1>     <CounterCard />   </section> </template>⋯ 1 unchanged lines
nuxt.config.ts (changed)
+import tailwindcss from "@tailwindcss/vite";+  // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({   compatibilityDate: "2025-07-15",   devtools: { enabled: true },+  modules: ["shadcn-nuxt", "@pinia/nuxt", "@nuxt/eslint"],   css: ["~/assets/css/main.css"],+  vite: { plugins: [tailwindcss()] },+  shadcn: { prefix: "", componentDir: "@/components/ui" },+  app: { head: { htmlAttrs: { lang: "en" }, titleTemplate: "%s | my-app" } },+  runtimeConfig: { public: { siteUrl: "https://example.com" } },+  nitro: { prerender: { routes: ["/robots.txt", "/sitemap.xml"] } }, });  

Project files

Related templates