A modern, full-featured Nuxt 4 starter template with TypeScript, Tailwind CSS, and everything you need to build amazing web applications.
π Live Demo β’ π Documentation β’ π Quick Start
- π₯ Nuxt 4 - The latest version of the Vue.js framework
- π TypeScript - Full type safety with vue-tsc
- πΉ Pinia Colada - Async state management & data fetching
- π pnpm - Fast, disk space efficient package manager
- π¨ Tailwind CSS v4 - Modern utility-first CSS framework
- β‘ Vite - Lightning fast build tool
- π Internationalization - i18n support with @nuxtjs/i18n
- π¨ Nuxt UI v4 - Beautiful, accessible components
- π Color Mode - Dark/light theme support
- πΌοΈ Icons - Comprehensive icon system (@nuxt/icon)
- π€ Fonts - Web font optimization (@nuxt/fonts)
- πΌοΈ Images - Advanced image optimization (nuxt-image)
- π± Modals & Toasts - Ready-to-use overlay components
- π ESLint v9 - Code linting with @nuxt/eslint & @antfu/eslint-config
- π VueUse v13 - Essential Vue composition utilities
- π Storybook - Component development and documentation
- π§ͺ Vitest - Fast unit testing with coverage
- π Playwright - End-to-end testing
- π Security - Built-in security headers (nuxt-security)
- π Commitlint - Conventional commit messages
- πͺ Git Hooks - Pre-commit validation
- π Lint Staged - Lint only changed files
- βοΈ GitHub Actions - Automated testing and deployment
- Node.js (see
.nvmrcfor version) - Use NVM for version management - pnpm - Install globally:
npm install -g pnpm
# Use the correct Node version
nvm use
# Install dependencies
pnpm install
# Start development server
pnpm dev| Command | Description |
|---|---|
pnpm dev |
π Start development server |
pnpm build |
ποΈ Build for production |
pnpm generate |
π¦ Generate static site |
pnpm preview |
ποΈ Preview production build |
pnpm test:unit |
π§ͺ Run unit tests |
pnpm test:unit-coverage |
π Run unit tests with coverage |
pnpm test:unit-ui |
π₯οΈ Run unit tests with UI |
pnpm test:e2e |
π Run E2E tests |
pnpm test:e2e-ui |
π₯οΈ Run E2E tests with UI |
pnpm test:codegen |
π¬ Generate E2E tests |
pnpm lint |
π Lint code |
pnpm lint:fix |
π§ Lint and fix code |
pnpm typecheck |
π Type checking |
my-nuxt-starter/
βββ π app/ # Main application
β βββ π assets/ # Static assets
β βββ π components/ # Vue components
β βββ π composables/ # Vue composables
β βββ π layouts/ # Layout components
β βββ π pages/ # Page components
βββ π tests/ # Test files
β βββ π e2e/ # End-to-end tests
βββ π server/ # Server-side code
βββ π public/ # Public static files
βββ π nuxt.config.ts # Nuxt configuration
This project uses Pinia Colada for async state management. It provides caching, deduplication, and invalidation out of the box.
Use useQuery to fetch data:
<script setup lang="ts">
const { state, asyncStatus } = useQuery({
key: ['products'],
query: () => fetch('/api/products').then(r => r.json())
})
</script>
<template>
<div v-if="asyncStatus === 'loading'">Loading...</div>
<div v-else-if="state.error">Error: {{ state.error }}</div>
<div v-else>
{{ state.data }}
</div>
</template>Use useMutation to modify data:
<script setup lang="ts">
const { mutate } = useMutation({
mutation: (newProduct) => fetch('/api/products', {
method: 'POST',
body: JSON.stringify(newProduct)
})
})
</script>For more details, check the Pinia Colada documentation.
Follow the Conventional Commits specification:
<type>: <description>
Types: feat, fix, docs, style, refactor, test, chore, ci, build, perf, revert
Examples:
feat: add user authenticationfix: resolve navbar responsive issuedocs: update installation guide
# Run unit tests
pnpm test:unit
# Run unit tests with coverage
pnpm test:unit-coverage
# Run unit tests with ui
pnpm test:unit-ui# Install Playwright browsers (required for E2E tests)
pnpm exec playwright install
# Run E2E tests
pnpm test:e2e
# Run E2E tests with ui
pnpm test:e2e-ui
# Run codegen for E2E tests
pnpm test:codegenWe suggest using act to try GitHub Actions locally before pushing to GitHub. This allows you to validate your workflows and save time by running them in a local containerized environment.
- π¨ Custom Icon Library - Project-specific icons
- π Coverage GitHub Action - Automated coverage reports
- π Zod - Runtime type validation
- π¨ Chromatic - Visual testing
- π¦ Lighthouse - Performance monitoring
Having issues? Try these steps:
- π§Ή Clean the project:
pnpm clean-project - π Check Node version: Ensure you're using the version specified in
.nvmrc - π¦ Check pnpm version: Verify it matches the version in
package.json - π Reinstall dependencies:
rm -rf node_modules && pnpm install - π§ Check environment: Ensure all required environment variables are set
We welcome contributions! Please read our Contributing Guidelines before submitting a pull request.
- Fork the repository
- Create your feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
Built with β€οΈ using amazing open-source projects:
Please note that ESLint support for Tailwind CSS is currently in beta due to the ongoing development of Tailwind CSS v4. If you encounter any issues or false positives, you can disable this feature by modifying the eslint.config.mjs file or temporarily disabling the specific rules.