create-nuxt-base 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +130 -3
- package/nuxt-base-template/.env.example +0 -2
- package/nuxt-base-template/README.md +76 -29
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.3](https://github.com/lenneTech/nuxt-base-starter/compare/v1.0.2...v1.0.3) (2026-01-12)
|
|
6
|
+
|
|
5
7
|
### [1.0.2](https://github.com/lenneTech/nuxt-base-starter/compare/v1.0.1...v1.0.2) (2026-01-12)
|
|
6
8
|
|
|
7
9
|
|
package/README.md
CHANGED
|
@@ -1,9 +1,136 @@
|
|
|
1
|
-
#
|
|
1
|
+
# create-nuxt-base
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A CLI tool to scaffold a production-ready **Nuxt 4** application with TypeScript, Tailwind CSS v4, NuxtUI v4, and modern tooling.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npx create-nuxt-base my-awesome-project
|
|
9
|
+
cd my-awesome-project
|
|
10
|
+
npm run dev
|
|
9
11
|
```
|
|
12
|
+
|
|
13
|
+
The development server starts at **http://localhost:3001**
|
|
14
|
+
|
|
15
|
+
## What's Included
|
|
16
|
+
|
|
17
|
+
### Core Framework
|
|
18
|
+
|
|
19
|
+
| Technology | Version | Description |
|
|
20
|
+
|------------|---------|-------------|
|
|
21
|
+
| Nuxt | 4.x | Vue 3 meta-framework with SSR support |
|
|
22
|
+
| TypeScript | 5.9.x | Strict type checking enabled |
|
|
23
|
+
| Tailwind CSS | 4.x | Utility-first CSS with Vite plugin |
|
|
24
|
+
| NuxtUI | 4.x | Component library with dark mode |
|
|
25
|
+
|
|
26
|
+
### Authentication (Better Auth)
|
|
27
|
+
|
|
28
|
+
- Email/password authentication with client-side password hashing
|
|
29
|
+
- Two-factor authentication (2FA/TOTP)
|
|
30
|
+
- Passkey/WebAuthn support
|
|
31
|
+
- Password reset flow
|
|
32
|
+
- Pre-built auth pages: login, register, forgot-password, reset-password, 2fa
|
|
33
|
+
|
|
34
|
+
### State & Data
|
|
35
|
+
|
|
36
|
+
| Package | Purpose |
|
|
37
|
+
|---------|---------|
|
|
38
|
+
| Pinia | State management |
|
|
39
|
+
| VueUse | Vue composition utilities |
|
|
40
|
+
| @hey-api/client-fetch | Type-safe API client |
|
|
41
|
+
| Valibot | Schema validation for forms |
|
|
42
|
+
|
|
43
|
+
### SEO & Analytics
|
|
44
|
+
|
|
45
|
+
- **@nuxtjs/seo** - Sitemap, robots.txt, OG images
|
|
46
|
+
- **@nuxtjs/plausible** - Privacy-friendly analytics
|
|
47
|
+
- **@nuxt/image** - Image optimization with IPX
|
|
48
|
+
|
|
49
|
+
### Developer Experience
|
|
50
|
+
|
|
51
|
+
| Tool | Purpose |
|
|
52
|
+
|------|---------|
|
|
53
|
+
| OxLint | Fast linting |
|
|
54
|
+
| OxFmt | Code formatting |
|
|
55
|
+
| Playwright | E2E testing |
|
|
56
|
+
| @lenne.tech/bug.lt | Bug reporting to Linear (dev only) |
|
|
57
|
+
| dayjs-nuxt | Date/time handling |
|
|
58
|
+
|
|
59
|
+
### File Upload
|
|
60
|
+
|
|
61
|
+
- TUS resumable upload support (`tus-js-client`)
|
|
62
|
+
- Pre-built `TusFileUpload.vue` component
|
|
63
|
+
|
|
64
|
+
### Docker Support
|
|
65
|
+
|
|
66
|
+
- `Dockerfile.dev` for containerized development
|
|
67
|
+
- Hot reload enabled
|
|
68
|
+
|
|
69
|
+
## Project Structure
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
my-project/
|
|
73
|
+
├── app/
|
|
74
|
+
│ ├── assets/css/ # Tailwind CSS
|
|
75
|
+
│ ├── components/ # Vue components (auto-imported)
|
|
76
|
+
│ │ ├── Modal/ # Modal components
|
|
77
|
+
│ │ ├── Transition/ # Transition components
|
|
78
|
+
│ │ └── Upload/ # File upload components
|
|
79
|
+
│ ├── composables/ # Composables (auto-imported)
|
|
80
|
+
│ ├── interfaces/ # TypeScript interfaces
|
|
81
|
+
│ ├── layouts/ # Nuxt layouts
|
|
82
|
+
│ ├── lib/ # Auth client configuration
|
|
83
|
+
│ ├── middleware/ # Route middleware (auth, admin, guest)
|
|
84
|
+
│ ├── pages/ # File-based routing
|
|
85
|
+
│ │ ├── auth/ # Authentication pages
|
|
86
|
+
│ │ └── app/ # Protected app pages
|
|
87
|
+
│ ├── utils/ # Utility functions
|
|
88
|
+
│ └── app.config.ts # NuxtUI configuration
|
|
89
|
+
├── docs/ # Dev-only documentation layer
|
|
90
|
+
├── tests/ # Playwright E2E tests
|
|
91
|
+
├── nuxt.config.ts # Nuxt configuration
|
|
92
|
+
├── openapi-ts.config.ts # API type generation config
|
|
93
|
+
└── playwright.config.ts # E2E test configuration
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Available Scripts
|
|
97
|
+
|
|
98
|
+
| Script | Description |
|
|
99
|
+
|--------|-------------|
|
|
100
|
+
| `npm run dev` | Start development server |
|
|
101
|
+
| `npm run build` | Build for production |
|
|
102
|
+
| `npm run preview` | Preview production build |
|
|
103
|
+
| `npm run generate-types` | Generate TypeScript types from OpenAPI |
|
|
104
|
+
| `npm run test` | Run Playwright E2E tests |
|
|
105
|
+
| `npm run lint` | Run OxLint |
|
|
106
|
+
| `npm run format` | Run OxFmt |
|
|
107
|
+
| `npm run check` | Run lint + format check |
|
|
108
|
+
| `npm run fix` | Auto-fix lint + format issues |
|
|
109
|
+
|
|
110
|
+
## Environment Variables
|
|
111
|
+
|
|
112
|
+
Create a `.env` file based on `.env.example`:
|
|
113
|
+
|
|
114
|
+
```env
|
|
115
|
+
# Required
|
|
116
|
+
SITE_URL=http://localhost:3001
|
|
117
|
+
API_URL=http://localhost:3000
|
|
118
|
+
APP_ENV=development
|
|
119
|
+
NODE_ENV=development
|
|
120
|
+
|
|
121
|
+
# Optional
|
|
122
|
+
WEB_PUSH_KEY= # Web push notifications
|
|
123
|
+
LINEAR_API_KEY= # Bug reporting
|
|
124
|
+
LINEAR_TEAM_NAME= # Bug reporting
|
|
125
|
+
LINEAR_PROJECT_NAME= # Bug reporting
|
|
126
|
+
STORAGE_PREFIX=base-dev # Local storage prefix
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Requirements
|
|
130
|
+
|
|
131
|
+
- Node.js >= 22
|
|
132
|
+
- npm >= 10
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
MIT
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Nuxt Base Template
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A production-ready Nuxt 4 SSR starter with TypeScript, Tailwind CSS v4, NuxtUI v4, and Better Auth.
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
@@ -33,6 +33,13 @@ Start the development server on http://localhost:3001
|
|
|
33
33
|
npm run dev
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### Docker Development
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
docker build -f Dockerfile.dev -t nuxt-app-dev .
|
|
40
|
+
docker run -p 3001:3001 -v $(pwd):/app nuxt-app-dev
|
|
41
|
+
```
|
|
42
|
+
|
|
36
43
|
## Production
|
|
37
44
|
|
|
38
45
|
Build the application for production:
|
|
@@ -62,8 +69,8 @@ Run linting and formatting checks before committing:
|
|
|
62
69
|
```bash
|
|
63
70
|
npm run check # Run lint + format check
|
|
64
71
|
npm run fix # Auto-fix lint + format issues
|
|
65
|
-
npm run lint #
|
|
66
|
-
npm run format #
|
|
72
|
+
npm run lint # OxLint only
|
|
73
|
+
npm run format # OxFmt format only
|
|
67
74
|
```
|
|
68
75
|
|
|
69
76
|
## Testing
|
|
@@ -84,33 +91,64 @@ npm run generate-types
|
|
|
84
91
|
|
|
85
92
|
## Tech Stack
|
|
86
93
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
| Technology | Version | Description |
|
|
95
|
+
|------------|---------|-------------|
|
|
96
|
+
| Nuxt | 4.2.x | Vue 3 meta-framework with SSR |
|
|
97
|
+
| TypeScript | 5.9.x | Strict type checking |
|
|
98
|
+
| Tailwind CSS | 4.1.x | Utility-first CSS (Vite plugin) |
|
|
99
|
+
| NuxtUI | 4.3.x | Component library with dark mode |
|
|
100
|
+
| Pinia | 0.11.x | State management |
|
|
101
|
+
| Better Auth | 1.4.x | Authentication framework |
|
|
102
|
+
| Playwright | 1.57.x | E2E testing |
|
|
103
|
+
| @hey-api/client-fetch | 0.13.x | Type-safe API client |
|
|
104
|
+
| Valibot | 1.2.x | Schema validation |
|
|
95
105
|
|
|
96
106
|
## Key Features
|
|
97
107
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
### Authentication (Better Auth)
|
|
109
|
+
|
|
110
|
+
- Email/password authentication with client-side SHA256 password hashing
|
|
111
|
+
- Two-factor authentication (2FA/TOTP) with backup codes
|
|
112
|
+
- Passkey/WebAuthn support
|
|
113
|
+
- Password reset flow
|
|
114
|
+
- Pre-built pages: login, register, forgot-password, reset-password, 2fa
|
|
115
|
+
- Route middleware: `auth.global.ts`, `admin.global.ts`, `guest.global.ts`
|
|
116
|
+
|
|
117
|
+
### UI & Styling
|
|
118
|
+
|
|
119
|
+
- NuxtUI v4 component library
|
|
120
|
+
- Dark/light mode support
|
|
121
|
+
- Transition components (Fade, Slide, FadeScale)
|
|
122
|
+
- Modal components with `useOverlay` pattern
|
|
123
|
+
|
|
124
|
+
### SEO & Analytics
|
|
125
|
+
|
|
126
|
+
- Sitemap generation (`@nuxtjs/seo`)
|
|
127
|
+
- robots.txt configuration
|
|
128
|
+
- OG image generation
|
|
129
|
+
- Plausible Analytics integration
|
|
130
|
+
|
|
131
|
+
### File Upload
|
|
132
|
+
|
|
133
|
+
- TUS resumable uploads (`tus-js-client`)
|
|
134
|
+
- Pre-built `TusFileUpload.vue` component
|
|
135
|
+
- Progress tracking and error handling
|
|
136
|
+
|
|
137
|
+
### Developer Experience
|
|
138
|
+
|
|
139
|
+
- OxLint for fast linting
|
|
140
|
+
- OxFmt for code formatting
|
|
141
|
+
- Auto-generated API client from OpenAPI
|
|
142
|
+
- Bug reporting to Linear (dev only via `@lenne.tech/bug.lt`)
|
|
143
|
+
- VueUse composition utilities
|
|
144
|
+
- dayjs for date/time handling
|
|
108
145
|
|
|
109
146
|
## Environment Variables
|
|
110
147
|
|
|
111
148
|
Create a `.env` file with the following variables:
|
|
112
149
|
|
|
113
150
|
```env
|
|
151
|
+
# Required
|
|
114
152
|
SITE_URL=http://localhost:3001
|
|
115
153
|
API_URL=http://localhost:3000
|
|
116
154
|
APP_ENV=development
|
|
@@ -124,7 +162,7 @@ WEB_PUSH_KEY= # Web push notifications
|
|
|
124
162
|
LINEAR_API_KEY= # Bug reporting
|
|
125
163
|
LINEAR_TEAM_NAME= # Bug reporting
|
|
126
164
|
LINEAR_PROJECT_NAME= # Bug reporting
|
|
127
|
-
API_SCHEMA=../api/schema.gql #
|
|
165
|
+
API_SCHEMA=../api/schema.gql # OpenAPI schema path
|
|
128
166
|
STORAGE_PREFIX=base-dev # Local storage prefix
|
|
129
167
|
```
|
|
130
168
|
|
|
@@ -132,25 +170,34 @@ STORAGE_PREFIX=base-dev # Local storage prefix
|
|
|
132
170
|
|
|
133
171
|
```
|
|
134
172
|
app/
|
|
135
|
-
├── assets/
|
|
173
|
+
├── assets/css/ # Tailwind CSS styles
|
|
136
174
|
├── components/ # Vue components (auto-imported)
|
|
175
|
+
│ ├── Modal/ # Modal components
|
|
176
|
+
│ ├── Transition/ # Transition animations
|
|
177
|
+
│ └── Upload/ # File upload components
|
|
137
178
|
├── composables/ # Composables (auto-imported)
|
|
138
|
-
├──
|
|
139
|
-
├──
|
|
179
|
+
│ ├── use-better-auth.ts # Auth session helpers
|
|
180
|
+
│ ├── use-file.ts # File utilities
|
|
181
|
+
│ ├── use-share.ts # Share API
|
|
182
|
+
│ └── use-tus-upload.ts # TUS upload logic
|
|
183
|
+
├── interfaces/ # TypeScript interfaces
|
|
184
|
+
├── layouts/ # Nuxt layouts (default, slim)
|
|
185
|
+
├── lib/ # Auth client configuration
|
|
186
|
+
├── middleware/ # Route guards (auth, admin, guest)
|
|
140
187
|
├── pages/ # File-based routing
|
|
188
|
+
│ ├── auth/ # Authentication pages
|
|
189
|
+
│ └── app/ # Protected app pages
|
|
190
|
+
├── utils/ # Utility functions
|
|
141
191
|
└── app.config.ts # NuxtUI configuration
|
|
142
192
|
|
|
143
193
|
docs/ # Dev-only documentation layer
|
|
144
194
|
tests/ # Playwright E2E tests
|
|
145
195
|
```
|
|
146
196
|
|
|
147
|
-
## Development Guidelines
|
|
148
|
-
|
|
149
|
-
For detailed coding standards and architecture information, see [CLAUDE.md](./CLAUDE.md).
|
|
150
|
-
|
|
151
197
|
## Documentation
|
|
152
198
|
|
|
153
199
|
- [Nuxt Documentation](https://nuxt.com/docs)
|
|
154
200
|
- [NuxtUI Documentation](https://ui.nuxt.com)
|
|
201
|
+
- [Better Auth Documentation](https://www.better-auth.com)
|
|
155
202
|
- [Tailwind CSS Documentation](https://tailwindcss.com/docs)
|
|
156
203
|
- [Vue 3 Documentation](https://vuejs.org)
|
package/package.json
CHANGED