create-wervt 0.2.4 → 0.2.6
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/package.json +1 -1
- package/template/.claude/skills/nuxt-ui/SKILL.md +334 -0
- package/template/.claude/skills/nuxt-ui/references/components.md +377 -0
- package/template/.claude/skills/nuxt-ui/references/composables.md +127 -0
- package/template/.claude/skills/nuxt-ui/references/layouts/chat.md +195 -0
- package/template/.claude/skills/nuxt-ui/references/layouts/dashboard.md +220 -0
- package/template/.claude/skills/nuxt-ui/references/layouts/docs.md +141 -0
- package/template/.claude/skills/nuxt-ui/references/layouts/editor.md +167 -0
- package/template/.claude/skills/nuxt-ui/references/layouts/page.md +260 -0
- package/template/.claude/skills/nuxt-ui/references/theming.md +427 -0
- package/template/.claude/skills/nuxt-ui-mobile/SKILL.md +92 -0
- package/template/.claude/skills/nuxt-ui-mobile/examples/app/composables/useDemoItems.ts +18 -0
- package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/index.vue +121 -0
- package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/items/[id].vue +77 -0
- package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/settings/index.vue +71 -0
- package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/settings/sort.vue +23 -0
- package/template/.claude/skills/nuxt-ui-mobile/references/patterns.md +212 -0
- package/template/.claude/skills/nuxt-ui-mobile/references/review-checklist.md +49 -0
- package/template/.claude/skills/nuxt-ui-mobile/references/tokens.md +86 -0
- package/template/.claude/skills/nuxt-ui-mobile/scripts/gen-palette.mjs +58 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/app.config.ts +298 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/app.vue +8 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/assets/css/main.css +331 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ActionSheet.vue +47 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ListRow.vue +73 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ListSection.vue +26 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/NavBar.vue +88 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/TabBar.vue +45 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/layouts/default.vue +16 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/app/layouts/plain.vue +6 -0
- package/template/.claude/skills/nuxt-ui-mobile/template/nuxt.config.ts +27 -0
- package/template/AGENTS.md +33 -1
- package/template/package.json +2 -2
package/template/AGENTS.md
CHANGED
|
@@ -10,6 +10,24 @@ Supabase Edge Runtime) with its own Postgres schema and live data through Electr
|
|
|
10
10
|
- `server/api/`: API routes. `server/api/shapes/`: live data routes.
|
|
11
11
|
- `server/db/schema.ts`: the Drizzle schema. `drizzle/`: generated migrations. Commit both.
|
|
12
12
|
|
|
13
|
+
## UI
|
|
14
|
+
|
|
15
|
+
Pick the UI stack by the kind of app:
|
|
16
|
+
|
|
17
|
+
- **Clean web apps and sites** (tools, dashboards, forms, content pages): Nuxt UI v4
|
|
18
|
+
(`pnpm add @nuxt/ui`, add `'@nuxt/ui'` to `modules`). Use its components and theme them in
|
|
19
|
+
`app.config.ts` instead of rebuilding them. Skill: `nuxt-ui`.
|
|
20
|
+
- **Playful or individual designs** that don't fit Nuxt UI's look (games, toys, landing pages with
|
|
21
|
+
their own identity): Reka UI (`reka-ui`) for accessible behavior (dialogs, menus, popovers,
|
|
22
|
+
sliders, …) and Tailwind CSS with your own styles on top. Don't bend Nuxt UI's theme into a
|
|
23
|
+
different design.
|
|
24
|
+
- **Pure mobile apps** (used mainly on phones, should feel like a native iOS app): Nuxt UI with the
|
|
25
|
+
`nuxt-ui-mobile` skill. Read its `SKILL.md` before writing UI and follow its rules. Its
|
|
26
|
+
`template/app/*` files go to the project root here: this app keeps `app.vue`, `pages/` and
|
|
27
|
+
`components/` at the root, not in `app/`.
|
|
28
|
+
|
|
29
|
+
Reka UI primitives are fine inside a Nuxt UI app for a one-off component Nuxt UI doesn't have.
|
|
30
|
+
|
|
13
31
|
## Server routes
|
|
14
32
|
|
|
15
33
|
Use `defineEventHandler` and friends from `nuxt/server` (never `h3` or `nitro/h3`), and validate
|
|
@@ -99,6 +117,20 @@ const { data: todos, isLive } = await useShape<Todo>('/api/shapes/todos')
|
|
|
99
117
|
- For your own state (anonymous visitors too), use `useSession(event, { name })` from
|
|
100
118
|
`nuxt/server`. The secret is set by wervt.
|
|
101
119
|
|
|
120
|
+
## Files
|
|
121
|
+
|
|
122
|
+
Store uploads with ablage (`pnpm add ablage`, add `'ablage'` to `modules`). wervt gives the app its
|
|
123
|
+
own bucket and `@wervt/nuxt` connects it; don't configure a provider or S3 credentials.
|
|
124
|
+
|
|
125
|
+
- `readUploadedFile(event, { types, maxSize })`, `useFileStorage().put/get/list/remove` and
|
|
126
|
+
`sendStoredFile(event, ref)` (route files without a method suffix) from `#imports`.
|
|
127
|
+
- Files through a route stay under a few tens of MB: they pass through the isolate (150 MB
|
|
128
|
+
memory). Larger files (video): `useFileStorage().createUpload/completeUpload/abortUpload` in
|
|
129
|
+
three routes plus `useDirectUpload()` on the page, so browsers upload straight to the bucket;
|
|
130
|
+
serve them with `signedUrl(file)`, a presigned link to the bucket.
|
|
131
|
+
- No tus uploads and no `transform` / sharp: they need a disk and native modules.
|
|
132
|
+
- Check access in the route before serving a file.
|
|
133
|
+
|
|
102
134
|
## Tasks (cron)
|
|
103
135
|
|
|
104
136
|
Periodic work (cleanup, syncs, renewals) goes into tasks, not into requests:
|
|
@@ -138,7 +170,7 @@ wervt: { timezone: 'Europe/Berlin' }, // optional, UTC by default
|
|
|
138
170
|
## Don'ts
|
|
139
171
|
|
|
140
172
|
- No Node-only APIs that Deno lacks (`child_process`, native addons, writing to the filesystem).
|
|
141
|
-
Store data in Postgres.
|
|
173
|
+
Store data in Postgres and files with ablage.
|
|
142
174
|
- No long-running work in requests (CPU is limited per request) and no in-memory state that must
|
|
143
175
|
survive: isolates are started and stopped on demand.
|
|
144
176
|
- No WebSockets, SSE hubs or timers (`setInterval`) that push to clients. Write to the database
|
package/template/package.json
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"postinstall": "nuxt prepare"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wervt/nuxt": "^0.2.
|
|
12
|
+
"@wervt/nuxt": "^0.2.7",
|
|
13
13
|
"drizzle-orm": "1.0.0-rc.4",
|
|
14
14
|
"nuxt": "npm:nuxt-nightly@5x",
|
|
15
15
|
"valibot": "^1.5.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@wervt/cli": "^0.2.
|
|
18
|
+
"@wervt/cli": "^0.2.6",
|
|
19
19
|
"drizzle-kit": "1.0.0-rc.4",
|
|
20
20
|
"vite-plus": "^1.0.0"
|
|
21
21
|
}
|