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.
Files changed (41) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/nuxt-base-template/.env.example +2 -1
  3. package/nuxt-base-template/CLAUDE.md +361 -0
  4. package/nuxt-base-template/README.md +127 -13
  5. package/nuxt-base-template/app/app.config.ts +67 -0
  6. package/nuxt-base-template/app/app.vue +10 -2
  7. package/nuxt-base-template/app/assets/css/tailwind.css +124 -84
  8. package/nuxt-base-template/app/components/Modal/ModalBase.vue +65 -0
  9. package/nuxt-base-template/app/components/Transition/TransitionSlide.vue +0 -2
  10. package/nuxt-base-template/app/components/Transition/TransitionSlideBottom.vue +0 -2
  11. package/nuxt-base-template/app/components/Transition/TransitionSlideRevert.vue +0 -2
  12. package/nuxt-base-template/app/composables/use-file.ts +19 -3
  13. package/nuxt-base-template/app/composables/use-share.ts +26 -10
  14. package/nuxt-base-template/app/error.vue +7 -43
  15. package/nuxt-base-template/app/layouts/default.vue +76 -4
  16. package/nuxt-base-template/app/layouts/slim.vue +5 -0
  17. package/nuxt-base-template/app/pages/auth/forgot-password.vue +64 -0
  18. package/nuxt-base-template/app/pages/auth/login.vue +71 -0
  19. package/nuxt-base-template/app/pages/auth/reset-password/[token].vue +110 -0
  20. package/nuxt-base-template/app/pages/index.vue +139 -2
  21. package/nuxt-base-template/app/public/favicon.ico +0 -0
  22. package/nuxt-base-template/docs/nuxt.config.ts +4 -0
  23. package/nuxt-base-template/docs/pages/docs.vue +663 -0
  24. package/nuxt-base-template/eslint.config.mjs +2 -1
  25. package/nuxt-base-template/nuxt.config.ts +73 -31
  26. package/nuxt-base-template/openapi-ts.config.ts +18 -0
  27. package/nuxt-base-template/package-lock.json +9781 -15157
  28. package/nuxt-base-template/package.json +30 -35
  29. package/nuxt-base-template/tsconfig.json +1 -1
  30. package/package.json +3 -3
  31. package/nuxt-base-template/app/composables/use-context-menu.ts +0 -19
  32. package/nuxt-base-template/app/composables/use-form-helper.ts +0 -41
  33. package/nuxt-base-template/app/composables/use-modal.ts +0 -84
  34. package/nuxt-base-template/app/composables/use-notification.ts +0 -29
  35. package/nuxt-base-template/app/middleware/admin.global.ts +0 -9
  36. package/nuxt-base-template/app/middleware/auth.global.ts +0 -9
  37. package/nuxt-base-template/app/middleware/logged-in.global.ts +0 -9
  38. package/nuxt-base-template/app/plugins/auth.server.ts +0 -72
  39. package/nuxt-base-template/app/plugins/form.plugin.ts +0 -21
  40. package/nuxt-base-template/app/plugins/pwa.plugin.ts +0 -114
  41. package/nuxt-base-template/tailwind.config.js +0 -21
@@ -0,0 +1,110 @@
1
+ <script setup lang="ts">
2
+ // ============================================================================
3
+ // Imports
4
+ // ============================================================================
5
+ import type { AuthFormField, FormSubmitEvent } from '@nuxt/ui';
6
+ import type { InferOutput } from 'valibot';
7
+
8
+ import * as v from 'valibot';
9
+
10
+ // ============================================================================
11
+ // Composables
12
+ // ============================================================================
13
+ const route = useRoute('auth-reset-password-token');
14
+ const toast = useToast();
15
+
16
+ // ============================================================================
17
+ // Page Meta
18
+ // ============================================================================
19
+ definePageMeta({
20
+ layout: 'slim',
21
+ });
22
+
23
+ // ============================================================================
24
+ // Variables
25
+ // ============================================================================
26
+ const token = computed<string>(() => {
27
+ const paramToken: string | string[] = route.params.token;
28
+ return Array.isArray(paramToken) ? paramToken[0] : paramToken || '';
29
+ });
30
+
31
+ const isTokenValid = computed<boolean>(() => token.value.length > 0);
32
+
33
+ const isSubmitting = ref<boolean>(false);
34
+
35
+ const fields: AuthFormField[] = [
36
+ {
37
+ label: 'Password',
38
+ name: 'password',
39
+ placeholder: 'Enter your new password',
40
+ required: true,
41
+ type: 'password',
42
+ },
43
+ {
44
+ label: 'Password Confirmation',
45
+ name: 'passwordConfirmation',
46
+ placeholder: 'Confirm your new password',
47
+ required: true,
48
+ type: 'password',
49
+ },
50
+ ];
51
+
52
+ const schema = v.pipe(
53
+ v.object({
54
+ password: v.pipe(v.string('Password is required'), v.minLength(5, 'Must be at least 5 characters')),
55
+ passwordConfirmation: v.pipe(v.string('Password confirmation is required'), v.minLength(5, 'Must be at least 5 characters')),
56
+ }),
57
+ v.forward(
58
+ v.check((data) => data.password === data.passwordConfirmation, 'Passwords must match'),
59
+ ['passwordConfirmation'],
60
+ ),
61
+ );
62
+
63
+ type Schema = InferOutput<typeof schema>;
64
+
65
+ // ============================================================================
66
+ // Lifecycle Hooks
67
+ // ============================================================================
68
+ onMounted(() => {
69
+ if (!isTokenValid.value) {
70
+ toast.add({
71
+ color: 'error',
72
+ description: 'The password reset link is invalid or missing',
73
+ title: 'Invalid Link',
74
+ });
75
+ }
76
+ });
77
+
78
+ // ============================================================================
79
+ // Functions
80
+ // ============================================================================
81
+ async function onSubmit(payload: FormSubmitEvent<Schema>): Promise<void> {
82
+ console.debug('Forgot password request for:', payload);
83
+ }
84
+ </script>
85
+
86
+ <template>
87
+ <UPageCard class="w-md" variant="naked">
88
+ <UAlert
89
+ v-if="!isTokenValid"
90
+ color="error"
91
+ description="The password reset link is invalid or missing. Please request a new password reset."
92
+ icon="i-heroicons-exclamation-triangle"
93
+ title="Invalid Reset Link"
94
+ class="mb-4"
95
+ />
96
+ <UAuthForm
97
+ :schema="schema"
98
+ title="Set password"
99
+ icon="i-heroicons-shield-check"
100
+ :fields="fields"
101
+ :loading="isSubmitting"
102
+ :submit="{
103
+ label: 'Continue',
104
+ block: true,
105
+ disabled: !isTokenValid,
106
+ }"
107
+ @submit="onSubmit"
108
+ />
109
+ </UPageCard>
110
+ </template>
@@ -1,5 +1,142 @@
1
+ <script lang="ts" setup>
2
+ // ============================================================================
3
+ // Composables
4
+ // ============================================================================
5
+ const config = useRuntimeConfig();
6
+
7
+ // ============================================================================
8
+ // Variables
9
+ // ============================================================================
10
+ const features: Array<{
11
+ color: 'info' | 'primary' | 'secondary' | 'success';
12
+ description: string;
13
+ icon: string;
14
+ title: string;
15
+ }> = [
16
+ {
17
+ color: 'primary',
18
+ description: 'Built with Vue 3 Composition API, TypeScript, and Nuxt 4 for modern development.',
19
+ icon: 'i-lucide-rocket',
20
+ title: 'Modern Stack',
21
+ },
22
+ {
23
+ color: 'secondary',
24
+ description: 'Pre-configured with Nuxt UI components, Tailwind CSS v4, and customizable themes.',
25
+ icon: 'i-lucide-palette',
26
+ title: 'UI Components',
27
+ },
28
+ {
29
+ color: 'success',
30
+ description: 'Built-in support for REST API integration with auto-generated types.',
31
+ icon: 'i-lucide-database',
32
+ title: 'API Ready',
33
+ },
34
+ {
35
+ color: 'info',
36
+ description: 'Form validation with VeeValidate and Valibot and state management with Pinia.',
37
+ icon: 'i-lucide-check-circle',
38
+ title: 'Production Ready',
39
+ },
40
+ ];
41
+
42
+ // ============================================================================
43
+ // Computed Properties
44
+ // ============================================================================
45
+ const isDevelopment = computed<boolean>(() => config.public.appEnv !== 'production');
46
+ </script>
47
+
1
48
  <template>
2
- <div class="flex h-screen items-center justify-center flex-col">
3
- <h1 class="font-extrabold text-transparent text-8xl bg-clip-text bg-gradient-to-r from-purple-400 to-pink-600">Lenne Nuxt Starter</h1>
49
+ <div>
50
+ <!-- Hero Section -->
51
+ <div class="relative overflow-hidden">
52
+ <div class="mx-auto max-w-7xl px-6 py-24 sm:py-32 lg:px-8">
53
+ <div class="mx-auto max-w-3xl text-center">
54
+ <div class="mb-8 flex items-center justify-center gap-x-3">
55
+ <UBadge color="primary" variant="subtle" size="lg"> v4 </UBadge>
56
+ <UBadge color="neutral" variant="outline" size="lg"> Nuxt Starter Template </UBadge>
57
+ </div>
58
+ <h1 class="text-5xl font-bold tracking-tight text-neutral-900 dark:text-white sm:text-6xl lg:text-7xl">
59
+ Lenne Nuxt
60
+ <span class="block text-primary mt-2">Base Template</span>
61
+ </h1>
62
+ <p class="mt-8 text-lg leading-8 text-neutral-600 dark:text-neutral-400 max-w-2xl mx-auto">
63
+ A modern Nuxt 4 starter template with TypeScript, Nuxt UI components, and production-ready tools. Start building your next application with confidence.
64
+ </p>
65
+ <div class="mt-10 flex flex-col sm:flex-row items-center justify-center gap-4">
66
+ <UButton to="https://github.com/lenneTech/nuxt-base-starter" target="_blank" size="xl" icon="i-lucide-github" color="primary"> View on GitHub </UButton>
67
+ <UButton to="https://ui.nuxt.com" target="_blank" size="xl" variant="outline" color="neutral" trailing-icon="i-lucide-arrow-right"> Nuxt UI Docs </UButton>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </div>
72
+
73
+ <!-- Features Section -->
74
+ <div class="mx-auto max-w-7xl px-6 py-16 lg:px-8">
75
+ <div class="mx-auto max-w-2xl text-center mb-16">
76
+ <h2 class="text-3xl font-bold tracking-tight text-neutral-900 dark:text-white sm:text-4xl">Features</h2>
77
+ <p class="mt-4 text-lg text-neutral-600 dark:text-neutral-400">Everything you need to build modern web applications</p>
78
+ </div>
79
+
80
+ <div class="grid grid-cols-1 gap-8 sm:grid-cols-2 lg:grid-cols-4">
81
+ <UCard v-for="feature in features" :key="feature.title" class="hover:shadow-lg transition-shadow">
82
+ <template #header>
83
+ <div class="flex items-center gap-3">
84
+ <UBadge :icon="feature.icon" :color="feature.color" size="lg" square class="p-2" />
85
+ <h3 class="font-semibold text-neutral-900 dark:text-white">
86
+ {{ feature.title }}
87
+ </h3>
88
+ </div>
89
+ </template>
90
+ <p class="text-sm text-neutral-600 dark:text-neutral-400">
91
+ {{ feature.description }}
92
+ </p>
93
+ </UCard>
94
+ </div>
95
+ </div>
96
+
97
+ <!-- Getting Started Section -->
98
+ <div class="mx-auto max-w-7xl px-6 py-16 lg:px-8">
99
+ <div class="space-y-8">
100
+ <UAlert
101
+ title="Getting Started"
102
+ description="Run 'npm run dev' to start the development server on port 3001. Check CLAUDE.md for detailed documentation."
103
+ icon="i-lucide-info"
104
+ color="primary"
105
+ variant="subtle"
106
+ />
107
+
108
+ <!-- Dev Examples Link (only in development) -->
109
+ <UCard v-if="isDevelopment" variant="outline" class="border-2 border-primary/20">
110
+ <template #header>
111
+ <div class="flex items-center gap-3">
112
+ <UBadge color="warning" variant="subtle" icon="i-lucide-flask-conical"> Development Only </UBadge>
113
+ <h3 class="font-semibold text-neutral-900 dark:text-white">Interactive Examples</h3>
114
+ </div>
115
+ </template>
116
+
117
+ <div class="space-y-4">
118
+ <p class="text-sm text-neutral-600 dark:text-neutral-400">
119
+ Explore interactive examples for all template components and composables. Perfect for learning and as a reference for new projects.
120
+ </p>
121
+ <div class="flex items-center gap-3">
122
+ <UButton to="/docs" icon="i-lucide-sparkles" trailing-icon="i-lucide-arrow-right" color="primary" size="md"> View Examples </UButton>
123
+ <p class="text-xs text-neutral-500 dark:text-neutral-500">This link is only visible in development mode</p>
124
+ </div>
125
+ </div>
126
+ </UCard>
127
+ </div>
128
+ </div>
129
+
130
+ <!-- Footer Section -->
131
+ <div class="mx-auto max-w-7xl px-6 py-16 lg:px-8">
132
+ <div class="text-center">
133
+ <p class="text-sm text-neutral-600 dark:text-neutral-400">
134
+ Built with
135
+ <ULink to="https://nuxt.com" target="_blank" class="font-medium text-primary"> Nuxt 4 </ULink>
136
+ and
137
+ <ULink to="https://ui.nuxt.com" target="_blank" class="font-medium text-primary"> Nuxt UI </ULink>
138
+ </p>
139
+ </div>
140
+ </div>
4
141
  </div>
5
142
  </template>
@@ -0,0 +1,4 @@
1
+ // https://nuxt.com/docs/api/configuration/nuxt-config
2
+ export default defineNuxtConfig({
3
+ devtools: { enabled: true },
4
+ });