create-nuxt-base 0.3.15 → 0.3.17
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 +9 -0
- package/nuxt-base-template/.env.example +2 -1
- package/nuxt-base-template/CLAUDE.md +361 -0
- package/nuxt-base-template/README.md +127 -13
- package/nuxt-base-template/app/app.config.ts +67 -0
- package/nuxt-base-template/app/app.vue +10 -2
- package/nuxt-base-template/app/assets/css/tailwind.css +124 -84
- package/nuxt-base-template/app/components/Modal/ModalBase.vue +65 -0
- package/nuxt-base-template/app/components/Transition/TransitionSlide.vue +0 -2
- package/nuxt-base-template/app/components/Transition/TransitionSlideBottom.vue +0 -2
- package/nuxt-base-template/app/components/Transition/TransitionSlideRevert.vue +0 -2
- package/nuxt-base-template/app/composables/use-file.ts +19 -3
- package/nuxt-base-template/app/composables/use-share.ts +26 -10
- package/nuxt-base-template/app/error.vue +7 -43
- package/nuxt-base-template/app/layouts/default.vue +76 -4
- package/nuxt-base-template/app/layouts/slim.vue +5 -0
- package/nuxt-base-template/app/pages/auth/forgot-password.vue +64 -0
- package/nuxt-base-template/app/pages/auth/login.vue +71 -0
- package/nuxt-base-template/app/pages/auth/reset-password/[token].vue +110 -0
- package/nuxt-base-template/app/pages/index.vue +139 -2
- package/nuxt-base-template/app/public/favicon.ico +0 -0
- package/nuxt-base-template/docs/nuxt.config.ts +4 -0
- package/nuxt-base-template/docs/pages/docs.vue +663 -0
- package/nuxt-base-template/eslint.config.mjs +2 -1
- package/nuxt-base-template/nuxt.config.ts +73 -31
- package/nuxt-base-template/openapi-ts.config.ts +18 -0
- package/nuxt-base-template/package-lock.json +9781 -15157
- package/nuxt-base-template/package.json +30 -35
- package/nuxt-base-template/tsconfig.json +1 -1
- package/package.json +3 -3
- package/nuxt-base-template/app/composables/use-context-menu.ts +0 -19
- package/nuxt-base-template/app/composables/use-form-helper.ts +0 -41
- package/nuxt-base-template/app/composables/use-modal.ts +0 -84
- package/nuxt-base-template/app/composables/use-notification.ts +0 -29
- package/nuxt-base-template/app/middleware/admin.global.ts +0 -9
- package/nuxt-base-template/app/middleware/auth.global.ts +0 -9
- package/nuxt-base-template/app/middleware/logged-in.global.ts +0 -9
- package/nuxt-base-template/app/plugins/auth.server.ts +0 -72
- package/nuxt-base-template/app/plugins/form.plugin.ts +0 -21
- package/nuxt-base-template/app/plugins/pwa.plugin.ts +0 -114
- package/nuxt-base-template/tailwind.config.js +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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
|
+
### [0.3.17](https://github.com/lenneTech/nuxt-base-starter/compare/v0.3.16...v0.3.17) (2025-10-17)
|
|
6
|
+
|
|
7
|
+
### [0.3.16](https://github.com/lenneTech/nuxt-base-starter/compare/v0.3.15...v0.3.16) (2025-09-05)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* Update environment variable for bug feature toggle ([d875b3e](https://github.com/lenneTech/nuxt-base-starter/commit/d875b3eb586368499b9e628cdabd2f971e7cce7f))
|
|
13
|
+
|
|
5
14
|
### [0.3.15](https://github.com/lenneTech/nuxt-base-starter/compare/v0.3.14...v0.3.15) (2025-09-05)
|
|
6
15
|
|
|
7
16
|
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
This is a **Nuxt 4** (v4.1.3) SSR starter template built with Vue 3 Composition API, TypeScript, and Tailwind CSS v4. The project uses NuxtUI for components and follows strict TypeScript typing conventions.
|
|
8
|
+
|
|
9
|
+
**Requirements:**
|
|
10
|
+
- Node.js >= 22
|
|
11
|
+
- npm >= 10
|
|
12
|
+
|
|
13
|
+
## Essential Commands
|
|
14
|
+
|
|
15
|
+
### Development
|
|
16
|
+
```bash
|
|
17
|
+
npm run dev # Start dev server on http://localhost:3001
|
|
18
|
+
npm run start:extern # Dev server on 0.0.0.0 (external access)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Code Quality (Run Before Commits)
|
|
22
|
+
```bash
|
|
23
|
+
npm run check # Run lint + format check
|
|
24
|
+
npm run fix # Auto-fix lint + format issues
|
|
25
|
+
npm run lint # ESLint only
|
|
26
|
+
npm run format # Prettier format
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Build & Preview
|
|
30
|
+
```bash
|
|
31
|
+
npm run build # Production build
|
|
32
|
+
npm run build:develop # Development environment build
|
|
33
|
+
npm run build:test # Test environment build
|
|
34
|
+
npm run build:prod # Production environment build
|
|
35
|
+
npm run preview # Preview production build
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Testing
|
|
39
|
+
```bash
|
|
40
|
+
npm run test # Run Playwright E2E tests
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### API Types
|
|
44
|
+
```bash
|
|
45
|
+
npm run generate-types # Generate API client from OpenAPI schema
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Maintenance
|
|
49
|
+
```bash
|
|
50
|
+
npm run clean # Remove .nuxt, .output, node_modules/.vite
|
|
51
|
+
npm run reinit # Complete reset and reinstall
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Architecture Overview
|
|
55
|
+
|
|
56
|
+
### Directory Structure
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
app/
|
|
60
|
+
├── assets/css/ # Tailwind v4 configuration
|
|
61
|
+
├── components/ # Vue components (auto-imported)
|
|
62
|
+
│ ├── Modal/ # Reusable modal component
|
|
63
|
+
│ └── Transition/ # Vue transition wrappers
|
|
64
|
+
├── composables/ # Vue composables (auto-imported)
|
|
65
|
+
├── interfaces/ # TypeScript interfaces (auto-imported)
|
|
66
|
+
├── layouts/ # Nuxt layouts (default, slim)
|
|
67
|
+
├── pages/ # File-based routing
|
|
68
|
+
├── public/ # Static assets
|
|
69
|
+
├── app.vue # Root component
|
|
70
|
+
└── app.config.ts # NuxtUI configuration
|
|
71
|
+
|
|
72
|
+
docs/ # Dev-only documentation layer
|
|
73
|
+
tests/ # Playwright E2E tests
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Auto-Import Configuration
|
|
77
|
+
|
|
78
|
+
The following directories are auto-imported by Nuxt:
|
|
79
|
+
- `components/` - Vue components
|
|
80
|
+
- `composables/` - Composables (use-*.ts)
|
|
81
|
+
- `interfaces/` - TypeScript interfaces
|
|
82
|
+
- `states/` - State management
|
|
83
|
+
- `stores/` - Pinia stores
|
|
84
|
+
- `forms/` - Form definitions
|
|
85
|
+
- `plugins/` - Vue plugins
|
|
86
|
+
|
|
87
|
+
### Key Configuration Files
|
|
88
|
+
|
|
89
|
+
- **nuxt.config.ts** - Main Nuxt configuration
|
|
90
|
+
- Dev server: Port 3001
|
|
91
|
+
- SSR: Enabled
|
|
92
|
+
- Experimental: asyncContext, typedPages
|
|
93
|
+
- Modules: NuxtUI, Pinia, VueUse, Dayjs, NuxtImage, SEO, Plausible
|
|
94
|
+
- Docs layer enabled in development only
|
|
95
|
+
|
|
96
|
+
- **app.config.ts** - NuxtUI configuration
|
|
97
|
+
- Color palette: Primary (green), Secondary (indigo), Success (emerald), Info (blue), Warning (amber), Error (red), Neutral (slate)
|
|
98
|
+
- Dark/light mode with Lucide icons
|
|
99
|
+
- Toast: 5s duration, bottom-right position
|
|
100
|
+
|
|
101
|
+
- **eslint.config.mjs** - Uses `@lenne.tech/eslint-config-vue` with perfectionist sorting rules
|
|
102
|
+
|
|
103
|
+
- **openapi-ts.config.ts** - API client generation
|
|
104
|
+
- Client: @hey-api/client-fetch
|
|
105
|
+
- Output: ./app/api-client
|
|
106
|
+
|
|
107
|
+
### API Integration
|
|
108
|
+
|
|
109
|
+
API client is auto-generated from OpenAPI schema:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm run generate-types # Generate types from API schema
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Generated client location: `./app/api-client`
|
|
116
|
+
|
|
117
|
+
Use environment variable `API_URL` to configure the API endpoint.
|
|
118
|
+
|
|
119
|
+
### TypeScript & Interface Management
|
|
120
|
+
|
|
121
|
+
**ALL interfaces must be extracted to separate files:**
|
|
122
|
+
- Location: `app/interfaces/`
|
|
123
|
+
- Naming: `{name}.interface.ts` (e.g., `season.interface.ts`)
|
|
124
|
+
- Auto-imported via Nuxt configuration
|
|
125
|
+
- No inline interfaces in components (except local helper types)
|
|
126
|
+
|
|
127
|
+
**Full typing is mandatory:**
|
|
128
|
+
- All variables have explicit types
|
|
129
|
+
- All function parameters are typed
|
|
130
|
+
- All function return types declared
|
|
131
|
+
- Computed properties: `computed<Type>(() => ...)`
|
|
132
|
+
|
|
133
|
+
### Component Structure
|
|
134
|
+
|
|
135
|
+
Vue components follow strict section ordering:
|
|
136
|
+
|
|
137
|
+
```vue
|
|
138
|
+
<script setup lang="ts">
|
|
139
|
+
// ============================================================================
|
|
140
|
+
// Imports
|
|
141
|
+
// ============================================================================
|
|
142
|
+
// 1. Vue & Nuxt core
|
|
143
|
+
// 2. Third-party libraries
|
|
144
|
+
// 3. Type imports (grouped)
|
|
145
|
+
// 4. Composables
|
|
146
|
+
// 5. Components
|
|
147
|
+
|
|
148
|
+
// ============================================================================
|
|
149
|
+
// Composables
|
|
150
|
+
// ============================================================================
|
|
151
|
+
|
|
152
|
+
// ============================================================================
|
|
153
|
+
// Page Meta
|
|
154
|
+
// ============================================================================
|
|
155
|
+
|
|
156
|
+
// ============================================================================
|
|
157
|
+
// Variables
|
|
158
|
+
// ============================================================================
|
|
159
|
+
|
|
160
|
+
// ============================================================================
|
|
161
|
+
// Computed Properties
|
|
162
|
+
// ============================================================================
|
|
163
|
+
|
|
164
|
+
// ============================================================================
|
|
165
|
+
// Lifecycle Hooks
|
|
166
|
+
// ============================================================================
|
|
167
|
+
|
|
168
|
+
// ============================================================================
|
|
169
|
+
// Functions
|
|
170
|
+
// ============================================================================
|
|
171
|
+
</script>
|
|
172
|
+
|
|
173
|
+
<template>
|
|
174
|
+
<!-- Template content -->
|
|
175
|
+
</template>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Composables Pattern
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
// app/composables/use-example.ts
|
|
182
|
+
export function useExample() {
|
|
183
|
+
// State
|
|
184
|
+
const loading = ref<boolean>(false);
|
|
185
|
+
const data = ref<DataType[]>([]);
|
|
186
|
+
|
|
187
|
+
// Methods
|
|
188
|
+
async function fetchData(): Promise<void> {
|
|
189
|
+
// Implementation
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Return public API
|
|
193
|
+
return {
|
|
194
|
+
loading,
|
|
195
|
+
data,
|
|
196
|
+
fetchData
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### ESLint Rules
|
|
202
|
+
|
|
203
|
+
Key rules enforced:
|
|
204
|
+
- `perfectionist/sort-modules` - Alphabetically sort interfaces/types
|
|
205
|
+
- `perfectionist/sort-union-types` - Sort union types alphabetically
|
|
206
|
+
- `perfectionist/sort-objects` - Sort object properties
|
|
207
|
+
- `curly` - Always use curly braces for if/else
|
|
208
|
+
- `max-statements-per-line` - One statement per line
|
|
209
|
+
|
|
210
|
+
**Always run `npm run check` before committing.**
|
|
211
|
+
|
|
212
|
+
### Testing with Playwright
|
|
213
|
+
|
|
214
|
+
Configuration:
|
|
215
|
+
- Base URL: http://localhost:3001
|
|
216
|
+
- Test directory: `./tests`
|
|
217
|
+
- Browser: Desktop Chrome
|
|
218
|
+
- Locale: German (de)
|
|
219
|
+
- Retries: 2 on CI, 0 locally
|
|
220
|
+
|
|
221
|
+
Example test:
|
|
222
|
+
```typescript
|
|
223
|
+
import { test } from '@nuxt/test-utils/playwright';
|
|
224
|
+
|
|
225
|
+
test('example test', async ({ goto, page }) => {
|
|
226
|
+
await goto('.', { waitUntil: 'domcontentloaded' });
|
|
227
|
+
// Test logic
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Environment Variables
|
|
232
|
+
|
|
233
|
+
Required variables (see `.env.example`):
|
|
234
|
+
```
|
|
235
|
+
SITE_URL=http://localhost:3001
|
|
236
|
+
API_URL=http://localhost:3000
|
|
237
|
+
APP_ENV=development
|
|
238
|
+
NODE_ENV=development
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
Optional:
|
|
242
|
+
- `WEB_PUSH_KEY` - Web push notifications
|
|
243
|
+
- `LINEAR_API_KEY`, `LINEAR_TEAM_NAME`, `LINEAR_PROJECT_NAME` - Bug reporting
|
|
244
|
+
- `API_SCHEMA` - Path to API schema for type generation
|
|
245
|
+
- `STORAGE_PREFIX` - Local storage prefix
|
|
246
|
+
|
|
247
|
+
### Special Features
|
|
248
|
+
|
|
249
|
+
**NuxtUI (v4.0.1):**
|
|
250
|
+
- Component library with semantic color system
|
|
251
|
+
- Dark/light mode support
|
|
252
|
+
- Pre-configured toast notifications
|
|
253
|
+
- Form validation utilities
|
|
254
|
+
|
|
255
|
+
**SEO (@nuxtjs/seo):**
|
|
256
|
+
- Sitemap generation (excludes /app/**, /auth/**)
|
|
257
|
+
- Robots.txt (disallows /app, /auth, /admin)
|
|
258
|
+
- OG image generation
|
|
259
|
+
|
|
260
|
+
**Analytics:**
|
|
261
|
+
- Plausible Analytics (disabled on localhost)
|
|
262
|
+
|
|
263
|
+
**Bug Reporting:**
|
|
264
|
+
- Linear integration via @lenne.tech/bug.lt
|
|
265
|
+
- Disabled in production
|
|
266
|
+
- Requires LINEAR_* environment variables
|
|
267
|
+
|
|
268
|
+
**State Management:**
|
|
269
|
+
- Pinia stores with auto-imports
|
|
270
|
+
|
|
271
|
+
**Image Optimization:**
|
|
272
|
+
- NuxtImage with IPX provider
|
|
273
|
+
- 30-day cache
|
|
274
|
+
|
|
275
|
+
### Naming Conventions
|
|
276
|
+
|
|
277
|
+
- **Files:**
|
|
278
|
+
- Interfaces: `{name}.interface.ts`
|
|
279
|
+
- Composables: `use-{name}.ts`
|
|
280
|
+
- Components: PascalCase (e.g., `ModalBase.vue`)
|
|
281
|
+
- Pages: kebab-case (e.g., `login.vue`, `[id].vue`)
|
|
282
|
+
|
|
283
|
+
- **Code:**
|
|
284
|
+
- Variables: camelCase
|
|
285
|
+
- Booleans: `isLoading`, `hasError`, `canSubmit`
|
|
286
|
+
- Functions: Verb-based (`handleSubmit`, `fetchData`)
|
|
287
|
+
- Event handlers: `handle{Action}` or `on{Action}`
|
|
288
|
+
|
|
289
|
+
### Development Workflow
|
|
290
|
+
|
|
291
|
+
1. **Starting a feature:**
|
|
292
|
+
- Plan structure with interfaces in `app/interfaces/`
|
|
293
|
+
- Create composables in `app/composables/` if needed
|
|
294
|
+
- Build components following the strict section ordering
|
|
295
|
+
|
|
296
|
+
2. **Before committing:**
|
|
297
|
+
```bash
|
|
298
|
+
npm run check # Lint + format check
|
|
299
|
+
npm run test # E2E tests
|
|
300
|
+
npm run build # Verify production build
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
3. **API changes:**
|
|
304
|
+
```bash
|
|
305
|
+
npm run generate-types # Regenerate API client
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
4. **Type safety:**
|
|
309
|
+
- Extract all interfaces to separate files
|
|
310
|
+
- Add explicit types to all variables and functions
|
|
311
|
+
- Never use implicit `any`
|
|
312
|
+
|
|
313
|
+
### Common Patterns
|
|
314
|
+
|
|
315
|
+
**Reactive state:**
|
|
316
|
+
```typescript
|
|
317
|
+
// Single values
|
|
318
|
+
const loading = ref<boolean>(false);
|
|
319
|
+
|
|
320
|
+
// Objects
|
|
321
|
+
const state: FormState = reactive({
|
|
322
|
+
title: '',
|
|
323
|
+
date: null
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// Derived data
|
|
327
|
+
const filtered = computed<Type[]>(() => ...);
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**Modal usage:**
|
|
331
|
+
```vue
|
|
332
|
+
<ModalBase :model-value="isOpen" @close="handleClose">
|
|
333
|
+
<template #header>Title</template>
|
|
334
|
+
<template #default>Content</template>
|
|
335
|
+
<template #footer>
|
|
336
|
+
<UButton @click="handleClose">Close</UButton>
|
|
337
|
+
</template>
|
|
338
|
+
</ModalBase>
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
**Transitions:**
|
|
342
|
+
```vue
|
|
343
|
+
<TransitionFade>
|
|
344
|
+
<div v-if="show">Content</div>
|
|
345
|
+
</TransitionFade>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Project Status
|
|
349
|
+
|
|
350
|
+
**Current Branch:** DEV-609 (development branch)
|
|
351
|
+
**Main Branch:** main (use for PRs)
|
|
352
|
+
|
|
353
|
+
Recent focus: Package dependency updates and ESLint configuration improvements.
|
|
354
|
+
|
|
355
|
+
### Important Notes
|
|
356
|
+
|
|
357
|
+
- **Port:** Dev server runs on **3001** (not 3000)
|
|
358
|
+
- **Docs layer:** Enabled only in development (extends config)
|
|
359
|
+
- **TypeScript target:** ES2022
|
|
360
|
+
- **SSR:** Enabled by default
|
|
361
|
+
- **npm configuration:** shamefully-hoist=true, strict-peer-dependencies=false
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
# Nuxt
|
|
1
|
+
# Nuxt Base Template
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A modern Nuxt 4 SSR starter template with TypeScript, Tailwind CSS v4, and NuxtUI.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js >= 22
|
|
8
|
+
- npm >= 10
|
|
4
9
|
|
|
5
10
|
## Setup
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
Install dependencies:
|
|
8
13
|
|
|
9
14
|
```bash
|
|
10
|
-
# yarn
|
|
11
|
-
yarn install
|
|
12
|
-
|
|
13
|
-
# npm
|
|
14
15
|
npm install
|
|
16
|
+
# or
|
|
17
|
+
npm run init
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Copy environment variables:
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
```bash
|
|
23
|
+
cp .env.example .env
|
|
18
24
|
```
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
Configure your `.env` file with the required values (see Environment Variables section below).
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
## Development
|
|
29
|
+
|
|
30
|
+
Start the development server on http://localhost:3001
|
|
23
31
|
|
|
24
32
|
```bash
|
|
25
33
|
npm run dev
|
|
@@ -33,10 +41,116 @@ Build the application for production:
|
|
|
33
41
|
npm run build
|
|
34
42
|
```
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
Preview production build locally:
|
|
37
45
|
|
|
38
46
|
```bash
|
|
39
47
|
npm run preview
|
|
40
48
|
```
|
|
41
49
|
|
|
42
|
-
|
|
50
|
+
Build for specific environments:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm run build:develop # Development environment
|
|
54
|
+
npm run build:test # Test environment
|
|
55
|
+
npm run build:prod # Production environment
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Code Quality
|
|
59
|
+
|
|
60
|
+
Run linting and formatting checks before committing:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm run check # Run lint + format check
|
|
64
|
+
npm run fix # Auto-fix lint + format issues
|
|
65
|
+
npm run lint # ESLint only
|
|
66
|
+
npm run format # Prettier format only
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Testing
|
|
70
|
+
|
|
71
|
+
Run E2E tests with Playwright:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm run test
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## API Integration
|
|
78
|
+
|
|
79
|
+
Generate TypeScript types from OpenAPI schema:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm run generate-types
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Tech Stack
|
|
86
|
+
|
|
87
|
+
- **Framework:** Nuxt 4.1.3 (Vue 3 Composition API)
|
|
88
|
+
- **Language:** TypeScript 5.9.3
|
|
89
|
+
- **Styling:** Tailwind CSS 4.1.14
|
|
90
|
+
- **UI Library:** NuxtUI 4.0.1
|
|
91
|
+
- **State Management:** Pinia
|
|
92
|
+
- **Testing:** Playwright
|
|
93
|
+
- **API Client:** @hey-api/client-fetch
|
|
94
|
+
- **Form Validation:** Valibot
|
|
95
|
+
|
|
96
|
+
## Key Features
|
|
97
|
+
|
|
98
|
+
- ✅ Full TypeScript support with strict typing
|
|
99
|
+
- ✅ NuxtUI component library with semantic colors
|
|
100
|
+
- ✅ Dark/light mode support
|
|
101
|
+
- ✅ SEO optimization (sitemap, robots.txt, OG images)
|
|
102
|
+
- ✅ Auto-generated API client from OpenAPI schema
|
|
103
|
+
- ✅ E2E testing with Playwright
|
|
104
|
+
- ✅ ESLint + Prettier configuration
|
|
105
|
+
- ✅ Plausible Analytics integration
|
|
106
|
+
- ✅ Image optimization with NuxtImage
|
|
107
|
+
- ✅ Bug reporting to Linear (dev only)
|
|
108
|
+
|
|
109
|
+
## Environment Variables
|
|
110
|
+
|
|
111
|
+
Create a `.env` file with the following variables:
|
|
112
|
+
|
|
113
|
+
```env
|
|
114
|
+
SITE_URL=http://localhost:3001
|
|
115
|
+
API_URL=http://localhost:3000
|
|
116
|
+
APP_ENV=development
|
|
117
|
+
NODE_ENV=development
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Optional variables:
|
|
121
|
+
|
|
122
|
+
```env
|
|
123
|
+
WEB_PUSH_KEY= # Web push notifications
|
|
124
|
+
LINEAR_API_KEY= # Bug reporting
|
|
125
|
+
LINEAR_TEAM_NAME= # Bug reporting
|
|
126
|
+
LINEAR_PROJECT_NAME= # Bug reporting
|
|
127
|
+
API_SCHEMA=../api/schema.gql # API schema path
|
|
128
|
+
STORAGE_PREFIX=base-dev # Local storage prefix
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Project Structure
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
app/
|
|
135
|
+
├── assets/ # Tailwind CSS configuration
|
|
136
|
+
├── components/ # Vue components (auto-imported)
|
|
137
|
+
├── composables/ # Composables (auto-imported)
|
|
138
|
+
├── interfaces/ # TypeScript interfaces (auto-imported)
|
|
139
|
+
├── layouts/ # Nuxt layouts
|
|
140
|
+
├── pages/ # File-based routing
|
|
141
|
+
└── app.config.ts # NuxtUI configuration
|
|
142
|
+
|
|
143
|
+
docs/ # Dev-only documentation layer
|
|
144
|
+
tests/ # Playwright E2E tests
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Development Guidelines
|
|
148
|
+
|
|
149
|
+
For detailed coding standards and architecture information, see [CLAUDE.md](./CLAUDE.md).
|
|
150
|
+
|
|
151
|
+
## Documentation
|
|
152
|
+
|
|
153
|
+
- [Nuxt Documentation](https://nuxt.com/docs)
|
|
154
|
+
- [NuxtUI Documentation](https://ui.nuxt.com)
|
|
155
|
+
- [Tailwind CSS Documentation](https://tailwindcss.com/docs)
|
|
156
|
+
- [Vue 3 Documentation](https://vuejs.org)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export default defineAppConfig({
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Toast Notifications
|
|
4
|
+
// ============================================================================
|
|
5
|
+
toaster: {
|
|
6
|
+
duration: 5000,
|
|
7
|
+
expand: false,
|
|
8
|
+
position: 'bottom-right' as const,
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// NuxtUI Configuration
|
|
13
|
+
// ============================================================================
|
|
14
|
+
ui: {
|
|
15
|
+
// Base component modifications
|
|
16
|
+
button: {
|
|
17
|
+
slots: {
|
|
18
|
+
base: 'cursor-pointer',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
checkbox: {
|
|
22
|
+
slots: {
|
|
23
|
+
base: 'cursor-pointer',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
// Semantic color palette (must match tailwind.css)
|
|
28
|
+
colors: {
|
|
29
|
+
error: 'error',
|
|
30
|
+
info: 'info',
|
|
31
|
+
neutral: 'neutral',
|
|
32
|
+
primary: 'primary',
|
|
33
|
+
secondary: 'secondary',
|
|
34
|
+
success: 'success',
|
|
35
|
+
warning: 'warning',
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
// Form field styling
|
|
39
|
+
formField: {
|
|
40
|
+
slots: {
|
|
41
|
+
description: 'text-sm text-neutral-400 dark:text-neutral-500',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
// Dark/Light mode icons
|
|
46
|
+
icons: {
|
|
47
|
+
dark: 'i-lucide-moon',
|
|
48
|
+
light: 'i-lucide-sun-medium',
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
// Modal defaults
|
|
52
|
+
modal: {
|
|
53
|
+
slots: {
|
|
54
|
+
content: 'w-full max-w-2xl',
|
|
55
|
+
footer: 'flex justify-end gap-3 px-4 py-3',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
// Toast notifications
|
|
60
|
+
toast: {
|
|
61
|
+
root: 'pointer-events-auto',
|
|
62
|
+
slots: {
|
|
63
|
+
close: 'text-neutral-900 dark:text-white',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
});
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Composables
|
|
4
|
+
// ============================================================================
|
|
5
|
+
const appConfig: ReturnType<typeof useAppConfig> = useAppConfig();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
1
8
|
<template>
|
|
2
|
-
<
|
|
9
|
+
<UApp :toaster="appConfig.toaster">
|
|
10
|
+
<NuxtLoadingIndicator color="var(--ui-primary)" :height="2" />
|
|
3
11
|
<NuxtLayout>
|
|
4
12
|
<NuxtPage />
|
|
5
13
|
</NuxtLayout>
|
|
6
|
-
</
|
|
14
|
+
</UApp>
|
|
7
15
|
</template>
|