NuxtVueLaravel后台SaaS启动器

laravel-vue-starter-kit — Nuxt 后台模板

作者 reyes200205

基于 Laravel Headless REST API 与 Nuxt 3 仪表盘的全栈启动模板,采用 monorepo 结构,内置 Sanctum 令牌认证、邮箱验证、密码重置、API 版本化与自动 OpenAPI 文档,适合搭建 SaaS 后台或管理面板。

看看你的网站会是什么样

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

1 个预览视图
作者提供的预览
作者提供的预览

来自项目 README 的原始预览。

目前有 1 张原始预览,可打开完整图片查看设计细节。

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

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

值得关注的模板亮点

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

01

monorepo 结构,前后端分离为 laravel-api-kit 与 nuxt-app-kit 两个子项目

02

后端集成 Laravel Sanctum 令牌认证、邮箱验证与密码重置流程

03

基于 URI 的 /api/v1 版本化,支持 sunset 与 deprecation 响应头

04

使用 Spatie Query Builder 实现 URL 参数过滤、排序与关系加载

05

通过 dedoc/scramble 自动生成 OpenAPI 3.1 规范与 Swagger UI 文档

06

前端提供响应式仪表盘、明暗模式、命令面板与键盘快捷键

模板详细介绍

该模板是一个 monorepo 全栈启动器,分为两个子项目:laravel-api-kit 提供 Laravel Headless REST API 后端,nuxt-app-kit 提供 Nuxt 3 管理面板与仪表盘前端。后端包含 Sanctum 令牌认证、邮箱验证、密码重置、基于 URI 的 /api/v1 版本化、Spatie Query Builder 动态过滤排序与关系加载、Spatie Laravel Data 的 DTO 类型约束,以及通过 dedoc/scramble 自动生成 OpenAPI 3.1 与 Swagger UI 文档;测试使用 Pest PHP。前端基于 Nuxt 3 与 Nuxt UI(TailwindCSS + HeadlessUI),提供可折叠侧边栏的响应式仪表盘、明暗模式、命令面板与键盘快捷键,并配置 Renovate 自动更新依赖。前后端通过环境变量连接:后端设置 SANCTUM_STATEFUL_DOMAINS 允许前端域,前端设置 NUXT_PUBLIC_API_BASE 指向后端 API 地址。

使用限制方面:项目采用 MIT 许可,可免费使用、修改、商用和分发该版本代码,但分发时需保留版权声明与许可声明;演示图片、字体、图标等第三方素材需单独核对许可,域名、托管、数据库、支付或 AI 等外部服务可能另行收费。README 中标注的 Laravel 13、Nuxt 3、PHP 8.3+、Pnpm 9.x 等版本信息来自项目徽章,未与依赖清单逐项核对,实际版本以仓库依赖文件为准。

NuxtVueLaravel后台SaaS启动器

适合你的项目吗?

适用场景

  • 搭建 SaaS 产品的后台管理界面与 API 服务
  • 开发需要令牌认证与邮箱验证的管理面板
  • 作为全栈项目起点,快速接入 Laravel REST API 与 Nuxt 仪表盘
  • 需要自动生成 OpenAPI 文档并统一 API 响应格式的后端项目

适合人群

  • 熟悉 Laravel 与 Nuxt/Vue 的全栈开发者
  • 需要前后端分离架构的 SaaS 或后台项目团队
  • 希望以 MIT 许可免费使用并二次开发的个人或组织

上手与定制指南

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

  1. 1

    后端可选用 Docker(docker compose build/up)或本地 PHP 8.3+ 与 Composer 安装,并执行 key:generate 与 migrate

  2. 2

    前端需使用 pnpm install 与 pnpm dev 启动,默认运行在 localhost:3000

  3. 3

    后端 .env 需设置 SANCTUM_STATEFUL_DOMAINS 包含前端地址,前端 .env 需设置 NUXT_PUBLIC_API_BASE 指向后端 /api/v1

  4. 4

    API 文档默认位于 http://localhost:8080/docs/api,OpenAPI JSON 位于 /docs/api.json

  5. 5

    分发代码时需保留 MIT 许可与原作者版权声明,第三方素材需单独核对许可

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 该模板整合了第三方开源项目(grazulex/laravel-api-kit 与 nuxt-ui-templates/dashboard),这些上游组件各自保留其原始许可与版权声明,二次分发时需一并遵守。
  • 后端代码源自 grazulex/laravel-api-kit,使用或再分发时需保留该上游项目的署名与许可信息。
  • 前端仪表盘模板源自 Nuxt 官方 nuxt-ui-templates/dashboard,再分发时需保留 Nuxt 团队的署名与相应许可声明。
  • 前后端联调需正确配置 SANCTUM_STATEFUL_DOMAINS 与 NUXT_PUBLIC_API_BASE,否则跨域认证请求会被拒绝,属于部署配置要求而非代码限制。
  • API 文档与 Swagger UI 默认仅在本地 8080 端口提供,生产部署需自行调整服务地址与端口配置。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Special thanks to the original creators whose open-source repositories made this kit possible:

README 原文

* **Laravel API Kit**: Developed by [grazulex](https://github.com/grazulex). Original Repository: [grazulex/laravel-api-kit](https://github.com/grazulex/laravel-api-kit).

README 原文

* **Nuxt Dashboard Template**: Created by the [Nuxt Team](https://github.com/nuxt) as part of Nuxt UI templates. Original Repository: [nuxt-ui-templates/dashboard](https://github.com/nuxt-ui-templates/dashboard).

README 原文

Ensure stateful Sanctum requests are allowed from your frontend URL:

README 原文

* **Swagger UI**: [http://localhost:8080/docs/api](http://localhost:8080/docs/api)

README 原文
https://github.com/reyes200205/laravel-vue-starter-kit/blob/main/LICENSEhttps://github.com/reyes200205/laravel-vue-starter-kit/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

记录的仓库更新时间
2026-08-27
截图检查日期
2026-10-04

目前没有记录演示链接。请依据仓库说明在本地评估;仅凭截图无法确认交互行为。

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

查看具体选型方法 →

介绍的制作与核对状态

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

审核声明: [email protected] · 2026-10-04

查看当时使用的来源资料

SHA-256: d6ad04ee5c6b38b699f0eec5e8b5da051c03bc858725d44fa99c779294f8e7bf

2026-10-04T02:40:01.968Z

来源文件 / 仓库
# Laravel Nuxt Starter Kit

[Leer en Español 🇪🇸](README.es.md)

[![Nuxt 3](https://img.shields.io/badge/Nuxt-3.x-00DC82?logo=nuxt&logoColor=white)](https://nuxt.com)
[![Laravel 13](https://img.shields.io/badge/Laravel-13.x-FF2D20?logo=laravel&logoColor=white)](https://laravel.com)
[![PHP 8.3+](https://img.shields.io/badge/PHP-8.3%2B-777BB4?logo=php&logoColor=white)](https://php.net)
[![Pnpm](https://img.shields.io/badge/Pnpm-9.x-F69220?logo=pnpm&logoColor=white)](https://pnpm.io)
[![License](https://img.shields.io/badge/License-MIT-green)](LICENSE)

A production-ready full-stack boilerplate integrating a **Laravel 13 Headless REST API** backend with a modern **Nuxt 3 Dashboard** frontend. This starter kit provides a pre-configured architecture ideal for SaaS applications, admin panels, or complex web platforms.

---

## 📸 Screenshots

**Login**
![Login](.github/screenshots/login.png)

**Dashboard (Light)**
![Dashboard Light](.github/screenshots/dashboard-ligth.png)

**Dashboard (Dark)**
![Dashboard Dark](.github/screenshots/dashboard-black.png)

---

## Project Structure

This project is organized as a simple monorepo containing the following components:

```text
laravel-nuxt-starter-kit/
├── laravel-api-kit/     # Backend - Laravel 13 REST API (Headless Service)
└── nuxt-app-kit/        # Frontend - Nuxt 3 Admin Panel & Dashboard
```

---

## 🖥️ Frontend Features (Nuxt App Kit)

* **Nuxt 3 & Nuxt UI**: Modern user interface library powered by TailwindCSS and HeadlessUI elements.
* **Responsive Dashboard**: Collapsible sidebar, multi-column navigation, and optimized layouts.
* **Light/Dark Mode**: Built-in native support for color schemes.
* **Command Palette & Shortcuts**: Quick accessibility tools and keyboard navigation out-of-the-box.
* **Renovate Integration**: Configured for automated dependency updates.

---

## ⚙️ Backend Features (Laravel API Kit)

* **Strict Mode & Type Safety**: Enabled `declare(strict_types=1)`, `final` classes, type-hinting, strict equality, and PHPStan (Max Level).
* **Token Authentication**: Secure authentication via Laravel Sanctum.
* **Email Verification**: Built-in verification flow with signed URLs sent via email.
* **Password Reset**: Secure token-based password recovery.
* **API Versioning**: URI-based versioning (`/api/v1`) using `grazulex/laravel-apiroute` with sunset and deprecation header support.
* **Query Builder**: Dynamic filtering, sorting, and relationship loading using `spatie/laravel-query-builder`.
* **Data Transfer Objects (DTOs)**: Enforced type-safe API inputs/outputs via `spatie/laravel-data`.
* **Auto-Documentation**: Zero-annotation OpenAPI 3.1 schema and Swagger UI generation via `dedoc/scramble`.
* **Testing Suite**: Pest PHP configured for high-speed HTTP and unit testing.

---

## Setup & Installation

### 1. Backend Setup (`laravel-api-kit`)

Navigate to the backend directory:
```bash
cd laravel-api-kit
```

#### Option A: Docker (Recommended)
```bash
# Copy environment file
cp .env.example .env

# Build and start containers in the background
docker compose build
docker compose up -d

# Install Composer dependencies
docker compose run --rm app composer install

# Generate application key
docker compose run --rm app php artisan key:generate

# Run migrations
docker compose run --rm app php artisan migrate

# Verify installation with tests
docker compose run --rm app ./vendor/bin/pest
```

#### Option B: Local Setup (Without Docker)
Ensure you have PHP 8.3+ and Composer installed.
```bash
# Install dependencies
composer install

# Configure environment
cp .env.example .env
php artisan key:generate

# Setup local SQLite database
touch database/database.sqlite
php artisan migrate

# Run tests
./vendor/bin/pest

# Start local server
php artisan serve
```

Once running, access the auto-generated documentation:
* **Swagger UI**: [http://localhost:8080/docs/api](http://localhost:8080/docs/api)
* **OpenAPI Spec JSON**: [http://localhost:8080/docs/api.json](http://localhost:8080/docs/api.json)

---

### 2. Frontend Setup (`nuxt-app-kit`)

Navigate to the frontend directory:
```bash
cd ../nuxt-app-kit
```

```bash
# Copy environment variables
cp .env.example .env

# Install dependencies using pnpm
pnpm install

# Start the Nuxt development server
pnpm dev
```

Nuxt will be running locally at [http://localhost:3000](http://localhost:3000).

---

## Connecting Frontend & Backend

To sync the Nuxt frontend with the Laravel API, verify the cross-origin settings:

### Backend configuration (`laravel-api-kit/.env`)
Ensure stateful Sanctum requests are allowed from your frontend URL:
```env
SANCTUM_STATEFUL_DOMAINS=localhost:3000,127.0.0.1:3000
```

### Frontend configuration (`nuxt-app-kit/.env`)
Configure Nuxt's public base API URL to point to the Laravel endpoint:
```env
NUXT_PUBLIC_API_BASE=http://localhost:8080/api/v1
```

---

## Deep Dive: Backend Architecture & Usage

### API Endpoints (v1)

| Method | Endpoint | Auth | Description | Rate Limit |
|--------|----------|------|-------------|------------|
| `POST` | `/register` | No | Registers a new user account | 5 / min |
| `POST` | `/login` | No | Performs authentication and returns token | 5 / min |
| `POST` | `/logout` | Yes | Revokes current API token | 120 / min |
| `GET`  | `/me` | Yes | Retrieves authenticated user profile | 120 / min |
| `POST` | `/email/verify/{id}/{hash}` | Yes | Verifies user's email address | 120 / min |
| `POST` | `/email/resend` | Yes | Resends a verification email link | 6 / min |
| `POST` | `/forgot-password` | No | Sends password recovery email | 6 / min |
| `POST` | `/reset-password` | No | Updates password using recovery token | 6 / min |

### API Response Format

All responses from the Laravel API return a uniform JSON template:

* **Success (HTTP 200/201):**
  ```json
  {
    "success": true,
    "message": "Operation successful",
    "data": {
      "user": {
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
      }
    }
  }
  ```
* **Validation / Client Error (HTTP 422/400):**
  ```json
  {
    "success": false,
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field must be a valid email address."
      ]
    }
  }
  ```

### Advanced Query Building

Using the Spatie Query Builder, you can filter, sort, and lazy-load relationships directly through URL parameters:

```php
// In a controller
$users = QueryBuilder::for(User::class)
    ->allowedFilters(['name', 'email'])
    ->allowedSorts(['name', 'created_at'])
    ->allowedIncludes(['posts'])
    ->paginate();
```

* **Filter by name:** `/api/v1/users?filter[name]=John`
* **Sort by creation date descending:** `/api/v1/users?sort=-created_at`
* **Include relationship data:** `/api/v1/users?include=posts`

### Rate Limiting

The application uses standard rate limiting rules configured in `AppServiceProvider.php`:
* `auth`: 5 requests per minute for login/register.
* `authenticated`: 120 requests per minute for logged-in sessions.
* `api`: 60 requests per minute for public endpoints.

---

## Development Commands

### Laravel API:
* **Lint codebase (Rector + Pint):** `composer lint` (Docker: `docker compose exec app composer lint`)
* **Static analysis & unit tests:** `composer test` (Docker: `docker compose exec app composer test`)
* **Reset Database:** `php artisan migrate:fresh --seed`

### Nuxt Frontend:
* **Production Build:** `pnpm build`
* **Preview production locally:** `pnpm preview`

---

## Credits

Special thanks to the original creators whose open-source repositories made this kit possible:

* **Laravel API Kit**: Developed by [grazulex](https://github.com/grazulex). Original Repository: [grazulex/laravel-api-kit](https://github.com/grazulex/laravel-api-kit).
* **Nuxt Dashboard Template**: Created by the [Nuxt Team](https://github.com/nuxt) as part of Nuxt UI templates. Original Repository: [nuxt-ui-templates/dashboard](https://github.com/nuxt-ui-templates/dashboard).
反馈内容错误

看看同类模板

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