$ show antfu/vitesse-nuxt
This repository is a starter template for Nuxt 4 applications, created by Anthony Fu. It provides a pre-configured setup with modern tooling including Vue 3, Vite, UnoCSS for atomic CSS, Pinia for state management, PWA support via @vite-pwa/nuxt, and auto-imports for composables and components. The architecture follows Nuxt's file-based routing and SSR model, with a Nitro server layer for API endpoints (e.g., a simple pageview counter). The codebase demonstrates clean, idiomatic usage of Nuxt 4 features like `useState`, `useFetch`, layout system, and the Composition API. It is not a production application but a foundation for building Nuxt projects, with several reusable configuration modules and composables.
The LLM identified 4 files worth highlighting for reuse:
A composable that encapsulates a simple counter using Nuxt's `useState` for reactive state. It provides `inc`, `dec`, and the current count. This pattern is a clean example of creating reusable, testable state logic in a Nuxt application and can be easily extracted or adapted for other projects.
A Pinia store defining a 'user' state with saved names and history. It demonstrates best practices: composable-style store with `ref`/`computed`, clear JSDoc comments, and HMR support via `acceptHMRUpdate`. The pattern is reusable for any entity tracking (e.g., recent searches) and showcases clean state management with Pinia.
A well-structured PWA configuration module for @vite-pwa/nuxt. It defines manifest, workbox caching strategies (including Google Fonts), and development options. This configuration is self-contained and can be reused across Nuxt projects with minimal adjustments, serving as a reference for implementing offline-capable PWAs.
An UnoCSS configuration that sets up multiple presets (Wind4, Attributify, Icons, Typography, WebFonts with local font processing) and transformers. It includes custom shortcuts (btn, icon-btn) and demonstrates how to configure a modern, performant CSS framework. The configuration is easily extractable and adaptable for other UnoCSS-based projects.