A production-grade Nuxt 4 starter kit with TypeScript, Tailwind CSS v4, and modern tooling. This template provides everything you need to build fast, secure, and SEO-optimized applications.
- π Nuxt 4 - Latest Nuxt with TypeScript strict mode
- π¨ Tailwind CSS v4 - Latest Tailwind with design tokens and
tailwind-variants - π§ VueUse - Essential Vue composition utilities with auto-imports
- π― Icons - Iconify integration with local SVG support
- πΌοΈ Images - Optimized image handling with
@nuxt/image - π€ Fonts - Local and Google Fonts integration
- π SEO - Complete SEO setup with sitemap, robots, and structured data
- π‘οΈ Security - Production-ready security headers and policies
- π Code Quality - ESLint flat config, Prettier, and pre-commit hooks
- π€ MCP - Model Context Protocol for AI integration
- β‘ Performance - Optimized build with Vite and modern tooling
- Node.js 20+
- pnpm (recommended) or npm/yarn
-
Clone or use as template
git clone <your-repo-url> cd nuxt-4-starter-kit
-
Install dependencies
pnpm install
-
Start development server
pnpm dev
-
Open your browser Navigate to http://localhost:3000
nuxt-4-starter-kit/
βββ .vscode/ # VS Code settings and extensions
βββ .github/workflows/ # GitHub Actions CI
βββ assets/
β βββ css/
β β βββ main.css # Tailwind CSS v4 + design tokens
β βββ fonts/ # Local font files
βββ components/
β βββ ui/ # Reusable UI components
β β βββ Button.vue # tailwind-variants example
β β βββ Badge.vue # tailwind-variants example
β βββ Logo.vue
βββ pages/ # File-based routing
β βββ index.vue # Demo page
β βββ about.vue
βββ public/
β βββ icons/ # Local SVG icons
βββ server/
β βββ routes/ # API routes
β βββ plugins/ # Server plugins
βββ nuxt.config.ts # Nuxt configuration
βββ eslint.config.mjs # ESLint flat config
βββ package.json
pnpm dev # Start development server
pnpm build # Build for production
pnpm preview # Preview production buildpnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm typecheck # TypeScript type checkingThis starter uses tailwind-variants for type-safe component variants:
<template>
<Button variant="primary" size="lg"> Click me </Button>
</template>Components support multiple variants:
- Button:
default,secondary,outline,ghost,destructive,link - Badge:
default,secondary,success,warning,destructive,outline
Create a .env file:
# Site configuration
NUXT_PUBLIC_SITE_URL=https://your-domain.com
# Security
NUXT_SECURITY_CONTACT=security@your-domain.comThe project uses Tailwind CSS v4 with design tokens defined in assets/css/main.css:
:root {
--color-primary: 59 130 246;
--color-secondary: 100 116 139;
/* ... more tokens */
}Security headers are configured in nuxt.config.ts:
security: {
hsts: { maxAge: 31536000 },
csp: { /* Content Security Policy */ },
// ... more security options
}This starter includes MCP support for AI integration:
-
Enable in development:
// nuxt.config.ts devServer: { mcp: true; }
-
Connect from compatible IDEs:
- Cursor: Built-in MCP support
- Claude Desktop: Configure MCP server
-
Available endpoints:
/api/mcp/sse- Server-Sent Events for real-time communication
- Meta tags - Automatic title, description, and Open Graph
- Sitemap - Auto-generated sitemap.xml
- Robots.txt - Search engine directives
- Structured data - Schema.org markup
- Canonical URLs - Prevent duplicate content
- HSTS - HTTP Strict Transport Security
- CSP - Content Security Policy
- Security headers - X-Frame-Options, X-Content-Type-Options, etc.
- Security.txt - Security contact information
- Permissions Policy - Feature access control
| Module | Purpose | Documentation |
|---|---|---|
@vueuse/nuxt |
Vue composition utilities | VueUse |
@nuxt/icon |
Iconify integration | Nuxt Icon |
@nuxt/image |
Optimized images | Nuxt Image |
@nuxt/fonts |
Font optimization | Nuxt Fonts |
@nuxtjs/seo |
SEO meta-package | Nuxt SEO |
nuxt-security |
Security headers | Nuxt Security |
nuxt-mcp |
AI integration | Nuxt MCP |
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically on push
- Connect your repository to Netlify
- Set build command:
pnpm build - Set publish directory:
.output/public
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "preview"]- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Nuxt Team for the amazing framework
- Tailwind CSS for the utility-first CSS framework
- VueUse for essential Vue utilities
- Iconify for the icon ecosystem
Happy coding! π