create-nuxt-base 0.3.16 → 1.0.2
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/.github/workflows/publish.yml +4 -2
- package/.oxfmtrc.jsonc +7 -0
- package/CHANGELOG.md +22 -8
- package/nuxt-base-template/.dockerignore +44 -0
- package/nuxt-base-template/.env.example +1 -1
- package/nuxt-base-template/.nuxtrc +1 -0
- package/nuxt-base-template/.oxfmtrc.jsonc +8 -0
- package/nuxt-base-template/Dockerfile.dev +23 -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/ModalBackupCodes.vue +117 -0
- 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/components/Upload/TusFileUpload.vue +302 -0
- package/nuxt-base-template/app/composables/use-better-auth.ts +25 -0
- package/nuxt-base-template/app/composables/use-file.ts +57 -6
- package/nuxt-base-template/app/composables/use-share.ts +26 -10
- package/nuxt-base-template/app/composables/use-tus-upload.ts +278 -0
- package/nuxt-base-template/app/error.vue +7 -43
- package/nuxt-base-template/app/interfaces/upload.interface.ts +58 -0
- package/nuxt-base-template/app/interfaces/user.interface.ts +12 -0
- 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/lib/auth-client.ts +135 -0
- package/nuxt-base-template/app/middleware/admin.global.ts +20 -6
- package/nuxt-base-template/app/middleware/auth.global.ts +15 -6
- package/nuxt-base-template/app/middleware/guest.global.ts +18 -0
- package/nuxt-base-template/app/pages/app/settings/security.vue +409 -0
- package/nuxt-base-template/app/pages/auth/2fa.vue +120 -0
- package/nuxt-base-template/app/pages/auth/forgot-password.vue +115 -0
- package/nuxt-base-template/app/pages/auth/login.vue +135 -0
- package/nuxt-base-template/app/pages/auth/register.vue +184 -0
- package/nuxt-base-template/app/pages/auth/reset-password.vue +153 -0
- package/nuxt-base-template/app/pages/index.vue +139 -2
- package/nuxt-base-template/app/utils/crypto.ts +13 -0
- package/nuxt-base-template/docker-entrypoint.sh +21 -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/nuxt.config.ts +75 -30
- package/nuxt-base-template/openapi-ts.config.ts +18 -0
- package/nuxt-base-template/oxlint.json +14 -0
- package/nuxt-base-template/package-lock.json +11414 -15883
- package/nuxt-base-template/package.json +48 -50
- package/nuxt-base-template/tests/iam.spec.ts +247 -0
- package/nuxt-base-template/tsconfig.json +1 -1
- package/package.json +15 -12
- package/.eslintignore +0 -14
- package/.eslintrc +0 -3
- package/.prettierignore +0 -5
- package/.prettierrc +0 -6
- 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/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/eslint.config.mjs +0 -3
- package/nuxt-base-template/tailwind.config.js +0 -21
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import tailwindcss from '@tailwindcss/vite';
|
|
3
3
|
|
|
4
4
|
export default defineNuxtConfig({
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// App Configuration
|
|
7
|
+
// ============================================================================
|
|
5
8
|
app: {
|
|
6
9
|
head: {
|
|
7
10
|
title: 'Nuxt Base Starter',
|
|
@@ -9,108 +12,150 @@ export default defineNuxtConfig({
|
|
|
9
12
|
},
|
|
10
13
|
},
|
|
11
14
|
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Bug Reporting (Linear Integration via @lenne.tech/bug.lt)
|
|
17
|
+
// ============================================================================
|
|
12
18
|
bug: {
|
|
13
19
|
enabled: process.env.APP_ENV !== 'production',
|
|
14
|
-
|
|
15
|
-
// Linear Integration
|
|
16
20
|
linearApiKey: process.env.LINEAR_API_KEY,
|
|
17
21
|
linearProjectName: process.env.LINEAR_PROJECT_NAME,
|
|
18
22
|
linearTeamName: process.env.LINEAR_TEAM_NAME,
|
|
19
23
|
},
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
classSuffix: '',
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
compatibilityDate: '2024-09-05',
|
|
25
|
+
compatibilityDate: '2025-01-15',
|
|
26
26
|
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// Styles
|
|
29
|
+
// ============================================================================
|
|
27
30
|
css: ['~/assets/css/tailwind.css'],
|
|
28
31
|
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// Development Server
|
|
34
|
+
// ============================================================================
|
|
29
35
|
devServer: {
|
|
30
36
|
port: 3001,
|
|
31
37
|
},
|
|
32
38
|
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Experimental Features
|
|
41
|
+
// ============================================================================
|
|
33
42
|
experimental: {
|
|
34
43
|
asyncContext: true,
|
|
35
44
|
renderJsonPayloads: false,
|
|
36
45
|
typedPages: true,
|
|
37
46
|
},
|
|
38
47
|
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// Environment-specific Layers
|
|
50
|
+
// ============================================================================
|
|
51
|
+
extends: process.env.APP_ENV === 'development' ? ['./docs'] : [],
|
|
52
|
+
|
|
53
|
+
// ============================================================================
|
|
54
|
+
// Image Optimization
|
|
55
|
+
// ============================================================================
|
|
39
56
|
image: {
|
|
40
57
|
ipx: {
|
|
41
|
-
maxAge: 2592000,
|
|
58
|
+
maxAge: 2592000, // 30 days
|
|
42
59
|
},
|
|
43
60
|
provider: 'ipx',
|
|
44
61
|
},
|
|
45
62
|
|
|
63
|
+
// ============================================================================
|
|
64
|
+
// Auto-imports
|
|
65
|
+
// ============================================================================
|
|
46
66
|
imports: {
|
|
47
67
|
dirs: ['./states', './stores', './forms', './interfaces', './base', './plugins'],
|
|
48
68
|
},
|
|
49
69
|
|
|
70
|
+
// ============================================================================
|
|
71
|
+
// Nuxt Modules
|
|
72
|
+
// ============================================================================
|
|
50
73
|
modules: [
|
|
51
|
-
'@nuxt/test-utils/module',
|
|
52
|
-
'@lenne.tech/
|
|
53
|
-
'@
|
|
54
|
-
'
|
|
55
|
-
'@
|
|
56
|
-
'@
|
|
57
|
-
'
|
|
58
|
-
'@
|
|
59
|
-
'@
|
|
60
|
-
'@nuxtjs/seo',
|
|
74
|
+
'@nuxt/test-utils/module', // E2E testing with Playwright
|
|
75
|
+
'@lenne.tech/bug.lt', // Bug reporting to Linear
|
|
76
|
+
'@vueuse/nuxt', // Vue composition utilities
|
|
77
|
+
'dayjs-nuxt', // Date/time handling
|
|
78
|
+
'@nuxt/image', // Image optimization
|
|
79
|
+
'@nuxt/ui', // NuxtUI component library
|
|
80
|
+
'@nuxtjs/plausible', // Privacy-friendly analytics
|
|
81
|
+
'@nuxtjs/seo', // SEO optimization (sitemap, robots, og-image)
|
|
82
|
+
'@pinia/nuxt', // State management
|
|
61
83
|
],
|
|
62
84
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
gqlHost: process.env.API_URL + '/graphql',
|
|
67
|
-
host: process.env.API_URL,
|
|
68
|
-
schema: process.env.API_SCHEMA,
|
|
69
|
-
storagePrefix: process.env.STORAGE_PREFIX,
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
// sets the default renderer to chromium
|
|
85
|
+
// ============================================================================
|
|
86
|
+
// OG Image Configuration
|
|
87
|
+
// ============================================================================
|
|
73
88
|
ogImage: {
|
|
74
89
|
defaults: {
|
|
75
90
|
renderer: 'chromium',
|
|
76
91
|
},
|
|
77
92
|
},
|
|
78
93
|
|
|
94
|
+
// ============================================================================
|
|
95
|
+
// Analytics (Plausible)
|
|
96
|
+
// ============================================================================
|
|
79
97
|
plausible: {
|
|
80
98
|
apiHost: process.env.PLAUSIBLE_API_URL,
|
|
81
99
|
ignoredHostnames: ['localhost'],
|
|
82
100
|
},
|
|
83
101
|
|
|
102
|
+
// ============================================================================
|
|
103
|
+
// SEO: Robots.txt
|
|
104
|
+
// ============================================================================
|
|
84
105
|
robots: {
|
|
85
106
|
disallow: ['/app', '/auth', '/admin'],
|
|
86
107
|
},
|
|
87
108
|
|
|
109
|
+
// ============================================================================
|
|
110
|
+
// Runtime Configuration (Environment Variables)
|
|
111
|
+
// ============================================================================
|
|
88
112
|
runtimeConfig: {
|
|
113
|
+
// Server-only (for SSR requests)
|
|
114
|
+
apiUrl: process.env.API_URL || 'http://localhost:3000',
|
|
89
115
|
public: {
|
|
90
|
-
|
|
116
|
+
// Client-side (browser requests)
|
|
117
|
+
apiUrl: process.env.API_URL_BROWSER || process.env.API_URL || 'http://localhost:3000',
|
|
91
118
|
host: process.env.API_URL,
|
|
92
119
|
webPushKey: process.env.WEB_PUSH_KEY,
|
|
93
120
|
},
|
|
94
121
|
},
|
|
95
122
|
|
|
123
|
+
// ============================================================================
|
|
124
|
+
// SEO: Site Metadata
|
|
125
|
+
// ============================================================================
|
|
96
126
|
site: {
|
|
97
127
|
name: 'Nuxt Base Starter',
|
|
98
128
|
url: process.env.SITE_URL,
|
|
99
129
|
},
|
|
100
130
|
|
|
131
|
+
// ============================================================================
|
|
132
|
+
// SEO: Sitemap
|
|
133
|
+
// ============================================================================
|
|
101
134
|
sitemap: {
|
|
102
135
|
exclude: ['/app/**', '/auth/**'],
|
|
103
136
|
},
|
|
104
137
|
|
|
138
|
+
// ============================================================================
|
|
139
|
+
// Rendering Configuration
|
|
140
|
+
// ============================================================================
|
|
105
141
|
spaLoadingTemplate: false,
|
|
106
142
|
|
|
107
143
|
ssr: true,
|
|
108
144
|
|
|
145
|
+
// ============================================================================
|
|
146
|
+
// Telemetry
|
|
147
|
+
// ============================================================================
|
|
109
148
|
telemetry: false,
|
|
110
149
|
|
|
150
|
+
// ============================================================================
|
|
151
|
+
// Vite Configuration
|
|
152
|
+
// ============================================================================
|
|
111
153
|
vite: {
|
|
112
154
|
build: {
|
|
113
|
-
cssMinify: '
|
|
155
|
+
cssMinify: 'esbuild',
|
|
156
|
+
},
|
|
157
|
+
optimizeDeps: {
|
|
158
|
+
exclude: ['@tailwindcss/vite', 'lightningcss', '@vue/devtools-core', '@vue/devtools-kit', '@internationalized/date'],
|
|
114
159
|
},
|
|
115
160
|
plugins: [tailwindcss()],
|
|
116
161
|
},
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineConfig } from '@hey-api/openapi-ts';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
client: '@hey-api/client-fetch',
|
|
5
|
+
input: process.env.API_URL || 'http://127.0.0.1:3000/api-docs-json',
|
|
6
|
+
output: {
|
|
7
|
+
format: 'prettier',
|
|
8
|
+
lint: 'eslint',
|
|
9
|
+
path: './app/api-client',
|
|
10
|
+
},
|
|
11
|
+
plugins: [
|
|
12
|
+
'@hey-api/sdk',
|
|
13
|
+
{
|
|
14
|
+
dates: true,
|
|
15
|
+
name: '@hey-api/typescript',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"plugins": ["typescript", "vue", "unicorn", "import"],
|
|
4
|
+
"env": {
|
|
5
|
+
"browser": true,
|
|
6
|
+
"node": true
|
|
7
|
+
},
|
|
8
|
+
"rules": {
|
|
9
|
+
"eqeqeq": "warn",
|
|
10
|
+
"no-console": "warn",
|
|
11
|
+
"no-unused-vars": "warn",
|
|
12
|
+
"@typescript-eslint/no-explicit-any": "warn"
|
|
13
|
+
}
|
|
14
|
+
}
|