NuxtVue启动器

nuxt4-typescript-tailwind-starter — Nuxt 启动器模板

作者 MaximeBignolet

基于 Nuxt 4、TypeScript 与 TailwindCSS 4 的启动器模板,包含 ESLint、自动导入、文件路由与示例 composable,采用 MIT 许可。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-02查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

Nuxt 4 项目骨架,含 app/ 目录、layouts、pages 与 nuxt.config.ts

02

TypeScript 严格模式与路径别名 @ 已配置

03

TailwindCSS 4 通过 app/assets/css/main.css 引入,可在 @theme 中定义自定义 token

04

ESLint 已配置,统一制表符、分号与反引号字符串等格式规则

05

useApiClient 封装 useFetch,统一 JSON 头、credentials 与 baseURL,错误经 error ref 返回

06

提供 .env.example 与 Vercel 演示站点,可参考实际页面效果

模板详细介绍

这是一个 Nuxt 4 启动器模板,将 Nuxt、TypeScript 与 TailwindCSS 组合为初始项目结构,并预先配置 ESLint、Vite、自动导入和基于文件的路由。仓库提供 app/ 目录下的 app.vue、app.config.ts、layouts/default.vue、pages/index.vue,以及按领域组织的 composables(如 api-client、env)和 Tailwind 入口 app/assets/css/main.css,同时附带 .env.example 与 nuxt.config.ts。

模板对 API 调用给出了约定:useApiClient<T>(url, options) 封装 useFetch,统一 JSON 请求头、credentials: include,并从 useEnv().apiBaseUrl 取 baseURL;错误通过返回的 error ref 暴露而不抛出,加载状态取自 status。README 还说明了 composables 的命名与目录约定,以及 ESLint 强制使用制表符、分号和反引号字符串。

需要留意的是,README 的 Roadmap 中列出的认证模块、仪表盘示例、暗色模式、SEO 模块、i18n、Vitest 与 Playwright 均标注为“Coming Soon”,当前代码并未包含;付费版本中提到的会话管理、图表分析、扩展 UI 组件库等也不在本次收录的免费代码范围内。演示截图、字体、图标等第三方素材需单独核对许可,域名、托管、数据库等外部服务可能另行收费。

NuxtVue启动器

适合你的项目吗?

适用场景

  • 需要快速搭建 Nuxt 4 + TypeScript + TailwindCSS 项目初始结构
  • 希望在项目初期就接入 ESLint 与统一代码格式约定
  • 需要一套基于 useFetch 的 API 调用约定与 composable 目录组织方式
  • 作为学习 Nuxt 4 目录结构与自动导入、文件路由的参考项目

适合人群

  • 使用 Nuxt 与 Vue 的前端开发者
  • 需要 TypeScript 类型安全与 TailwindCSS 样式方案的团队
  • 希望以 MIT 许可自由修改和分发代码的个人或商业项目

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    克隆仓库后执行 npm install,再运行 npm run dev,开发服务器默认在 http://localhost:3000

  2. 2

    构建与预览分别使用 npm run build 和 npm run preview

  3. 3

    复制 .env.example 为 .env 并按需配置环境变量

  4. 4

    建议统一使用 npm 或 yarn,避免 lockfile 冲突

  5. 5

    Tailwind 自定义 token 写在 app/assets/css/main.css 的 @theme 中,ESLint 规则在 eslint.config.mjs 中调整

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • README 列出可选的付费版本(Premium Version),包含会话管理认证、图表分析仪表盘、扩展 UI 组件库、持久化暗色模式、移动端布局与 CMS 集成示例;这些功能不在免费代码范围内,需另行付费获取。
  • README 的 Roadmap 将认证模块、仪表盘示例、暗色模式切换、SEO 模块、i18n、Vitest 与 Playwright 标注为 Coming Soon,当前代码尚未包含,不能视为已具备的能力。
  • 使用前需复制 .env.example 为 .env 并配置环境变量;useApiClient 依赖 useEnv().apiBaseUrl 指向的后端 API 服务,该外部服务需自行提供,可能产生额外费用。
  • 项目资料提及可选付费版本或功能;本次仅收录公开免费代码,不包含付费升级。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

### Premium Version (Optional) - 🔐 Auth flow with session management - 📊 Dashboard with charts and analytics - 🎨 Extended UI components library - 🌙 Advanced dark mode with persistence - 📱 Mobile-optimized layouts - 🔌 CMS integration examples

README 原文

### Coming Soon - [ ] Authentication module (optional) - [ ] Dashboard layout examples - [ ] Dark mode toggle component - [ ] SEO meta module integration - [ ] i18n configuration example - [ ] Unit testing setup (Vitest) - [ ] E2E testing setup (Playwright)

README 原文

Copy `.env.example` to `.env` and configure:

README 原文
https://github.com/MaximeBignolet/nuxt4-typescript-tailwind-starter/blob/main/LICENSEhttps://github.com/MaximeBignolet/nuxt4-typescript-tailwind-starter/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 92 / 100
技术栈
Nuxt · Vue
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-09-18
截图检查日期
2026-10-02

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Nuxt。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: 87bad9a256fd813cac929bcdb353c8394aa4c2f38fa0f043944d7644d4f5a418

2026-10-02T21:22:47.880Z

来源文件 / 仓库
# ⚡ Nuxt 4 Starter Template

<p align="center">
  <strong>Production-ready Nuxt 4 starter with TypeScript, TailwindCSS 4 & ESLint</strong>
</p>

<p align="center">
  <a href="https://nuxt-starter-template-seven.vercel.app/">🌐 Live Demo</a> •
  <a href="#-quick-start">Quick Start</a> •
  <a href="#-features">Features</a> •
  <a href="#-tech-stack">Tech Stack</a>
</p>

<p align="center">
  <a href="https://nuxt.com"><img src="https://img.shields.io/badge/Nuxt-4-00DC82?logo=nuxt.js&logoColor=white" alt="Nuxt 4"></a>
  <a href="https://www.typescriptlang.org"><img src="https://img.shields.io/badge/TypeScript-5-3178C6?logo=typescript&logoColor=white" alt="TypeScript"></a>
  <a href="https://tailwindcss.com"><img src="https://img.shields.io/badge/Tailwind-4-38B2AC?logo=tailwind-css&logoColor=white" alt="TailwindCSS"></a>
  <a href="/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
  <img src="https://img.shields.io/github/stars/MaximeBignolet/nuxt-starter-template?style=social" alt="GitHub stars">
</p>

---

## 🎯 Why This Template?

A clean, modern, and **production-tested** Nuxt 4 starter that saves you hours of initial setup. Built with best practices and the latest versions of your favorite tools.

✅ **Nuxt 4** – Latest stable release with all new features  
✅ **TypeScript** – Full type safety configured out of the box  
✅ **TailwindCSS 4** – Bleeding-edge styling with modern features  
✅ **Zero Config** – ESLint, Vite, and auto-imports ready to go  
✅ **Clean Architecture** – Organized folder structure for scalability  
✅ **Battle-Tested** – Used in real production projects

---

## 🚀 Quick Start

### [🎯 Use This Template](https://github.com/MaximeBignolet/nuxt-starter-template/generate)
**Get started in 30 seconds** ← Click to create your own repository

### Or clone manually:

```bash
# Clone the repository
git clone https://github.com/MaximeBignolet/nuxt-starter-template.git
cd nuxt-starter-template

# Install dependencies
npm install

# Start development server
npm run dev
```

Server runs on `http://localhost:3000` 🚀

### Build for Production

```bash
# Build the application
npm run build

# Preview production build
npm run preview
```

> 💡 **Tip:** Use either `npm` or `yarn` consistently to avoid lockfile conflicts.

---

## 📦 What's Included

```
nuxt-starter-template/
├─ 🎨 TailwindCSS 4 with optimized config
├─ 🔒 TypeScript strict mode enabled
├─ ⚡ Vite for lightning-fast HMR
├─ 🧹 ESLint + formatting rules configured
├─ 📁 Clean folder structure ready to scale
├─ 🔄 Auto-imports (composables)
├─ 🛣️ File-based routing configured
├─ 📝 Example app config and composables
└─ 🚀 Vercel/Netlify deployment ready
```

---

## 🛠️ Tech Stack

| Technology | Version | Purpose |
|------------|---------|---------|
| [Nuxt 4](https://nuxt.com) | Latest | Hybrid rendering & SSR |
| [TypeScript](https://www.typescriptlang.org) | 5.x | Type safety |
| [TailwindCSS](https://tailwindcss.com) | 4.x | Utility-first styling |
| [Vite](https://vitejs.dev) | Latest | Fast bundling & HMR |
| [ESLint](https://eslint.org) | Latest | Code quality & formatting |

---

## 📁 Project Structure

```
nuxt-starter-template/
├─ app/
│  ├─ app.vue                      # App shell
│  ├─ app.config.ts                # App-level config (SEO/site metadata)
│  ├─ assets/
│  │  └─ css/main.css              # Tailwind entrypoint
│  ├─ composables/
│  │  ├─ api-client/               # API client helpers
│  │  └─ env/                      # Runtime config accessor
│  ├─ layouts/default.vue          # Default layout
│  └─ pages/index.vue              # Home page
├─ public/              # Static assets
├─ server/              # Server-side code
├─ .env.example         # Environment variables template
├─ nuxt.config.ts       # Nuxt configuration
└─ tsconfig.json        # TypeScript configuration
```

---

## ✨ Features

### Core Features
- ✅ **Nuxt 4** with latest features and performance improvements
- ✅ **TypeScript** with strict mode for maximum type safety
- ✅ **TailwindCSS 4** with JIT compiler and modern utilities
- ✅ **ESLint** configured for Nuxt, Vue, and TypeScript
- ✅ **Auto-imports** for components, composables, and utilities
- ✅ **Path aliases** using `@` for clean imports

### Developer Experience
- 🔥 **Hot Module Replacement** for instant updates
- 📝 **Code examples** included to get you started
- 🎨 **Responsive design** patterns ready to use
- 🔧 **Extensible** architecture for easy customization
- 📦 **Production-optimized** build configuration

### Deployment Ready
- ☁️ **Vercel** deployment configured
- 🌐 **Netlify** compatible
- 🐳 **Docker** ready (add Dockerfile if needed)
- 🚀 **SSR** and **SSG** modes available

---

## 🆚 Comparison

| Feature | This Template | Official Nuxt Starter | Other Templates |
|---------|---------------|----------------------|-----------------|
| Nuxt 4 | ✅ | ❌ (v3) | ❌ |
| TailwindCSS 4 | ✅ | ❌ | Partial |
| TypeScript Strict | ✅ | Partial | ❌ |
| ESLint Configured | ✅ | ❌ | Partial |
| Production Examples | ✅ | ❌ | ❌ |
| Clean Architecture | ✅ | Basic | Varies |

---

## 🧭 Conventions

Composables are organized by domain: `app/composables/<domain>/use<Domain>s.ts` plus `types/<Domain>.ts`. Cross-cutting helpers (`api-client/`, `env/`) stay at the root.

`useApiClient<T>(url, options)` wraps `useFetch` with JSON headers, `credentials: include` and `baseURL` from `useEnv().apiBaseUrl`. It never throws: errors surface through the returned `error` ref, and only the method, URL and status are logged.

```ts
// Read: give it a key, never wrap it in useAsyncData
const { HEALTH } = useApiEndpoint();
const { data, status, error, refresh } = useApiClient<HealthResponse>(HEALTH, { key: `health` });

// Mutation: lazy, then execute() from a handler
const save = useApiClient(HEALTH, { method: Method.POST, body, immediate: false, watch: false });
await save.execute();
if (save.error.value) {
	// toast
}
```

Loading state comes from `status`, never from a manual ref. Formatting is enforced by ESLint: tabs, semicolons, backtick strings.

---

## 🎨 Customization

### Environment Variables

Copy `.env.example` to `.env` and configure:

```bash
cp .env.example .env
```

### TailwindCSS

Tailwind is loaded from `app/assets/css/main.css` and configured through Nuxt/Vite in `nuxt.config.ts`.
Add your custom tokens/utilities directly in `main.css`:

```css
@import "tailwindcss";

@theme {
	--color-primary: #00dc82;
}
```

### ESLint

Adjust linting rules in `eslint.config.mjs` to match your preferences.

---

## 🧩 Roadmap

### Coming Soon
- [ ] Authentication module (optional)
- [ ] Dashboard layout examples
- [ ] Dark mode toggle component
- [ ] SEO meta module integration
- [ ] i18n configuration example
- [ ] Unit testing setup (Vitest)
- [ ] E2E testing setup (Playwright)

### Premium Version (Optional)
- 🔐 Auth flow with session management
- 📊 Dashboard with charts and analytics
- 🎨 Extended UI components library
- 🌙 Advanced dark mode with persistence
- 📱 Mobile-optimized layouts
- 🔌 CMS integration examples

---

## 🤝 Contributing

Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

---

## 📄 License

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.

**Free to use, modify, and distribute.** If you use this commercially, a attribution or link back is appreciated but not required.

---

## 🙏 Acknowledgments

- [Nuxt Team](https://nuxt.com) for the amazing framework
- [TailwindCSS Team](https://tailwindcss.com) for the utility-first CSS
- [TypeScript Team](https://www.typescriptlang.org) for type safety

---

## 👨‍💻 Author

**Maxime Bignolet**  
Front-End Developer – La Rochelle, France

[![GitHub](https://img.shields.io/badge/GitHub-MaximeBignolet-181717?logo=github)](https://github.com/MaximeBignolet)
[![Portfolio](https://img.shields.io/badge/Portfolio-maximedev.fr-00DC82)](https://maximedev.fr)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-Maxime_Bignolet-0A66C2?logo=linkedin)](https://www.linkedin.com/in/maxime-bignolet-8228bb219/)

---

<p align="center">
  <strong>⭐ If this template helped you, consider giving it a star!</strong>
</p>

<p align="center">
  <a href="https://nuxt-starter-template-seven.vercel.app/">🌐 View Live Demo</a>
</p>
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。