How nico-amsterdam/vue-crud-nuxt works
Vue CRUD Nuxt is a localized product-management app with passwordless WebAuthn access, Pinia-backed product state, Nuxt API routes, and SQLite via Cloudflare D1. The main workflow is sign in, browse/search products, then add, edit, or delete them through the product store and API. The README also documents responsive/accessibility support, theme switching, and Cloudflare deployment. Several product routes and server handlers were not excerpted, so links involving those implementations are omitted or marked unverified rather than inferred as direct calls.
Main entry points: product.ts Product store · webauthn WebAuthn handlers · products Product API · index.vue Product list
Components 22
Nuxt client
- Sign-in page
app/pages/auth.vue - Auth middleware
app/middleware/auth.ts - App shell
app/app.vue - CRUD layout
app/layouts/vue-crud.vue - Theme store
app/stores/theme.ts
Product workflow
- Product list
app/pages/index.vue - Add product
app/pages/add-product.vue - Edit product
app/pages/product/[id]/edit.vue - Delete product
app/pages/product/[id]/delete.vue - Product form
app/components/ProductForm.vue - Product store
app/stores/product.ts
Server services
- WebAuthn handlers
server/api/webauthn - User session
- Product API
server/api/products - Request security
server/middleware/00.global-security.ts
Persistence and localization
- Challenge KV
- Product schema
server/database/schema.ts - D1 adapter
server/utils/db.ts - Client translations
i18n/locales - Server translations
server/utils/translations.ts
Other components
- User
- Cloudflare D1
Connections 22
- User → Sign-in page: signs in
README.md - Sign-in page → WebAuthn handlers: starts WebAuthn
README.md - WebAuthn handlers → Challenge KV: stores challenge
server/api/webauthn/authenticate.post.ts - WebAuthn handlers → Product schema: reads credentials
server/api/webauthn/authenticate.post.ts - WebAuthn handlers → User session: sets session
server/api/webauthn/authenticate.post.ts - App shell → User session: watches login
app/app.vue - Product list → Product store: loads products
app/pages/index.vue - Product store → Product API: requests products
app/stores/product.ts - Add product → Product form: uses form
- Edit product → Product form: uses form
- Add product → Product store: adds product
- Edit product → Product store: updates product
- Delete product → Product store: deletes product
- Product API → D1 adapter: queries data
- D1 adapter → Product schema: uses schema
server/utils/db.ts - D1 adapter → Cloudflare D1: opens database
README.md - Auth middleware → User session: checks access
- Product list → CRUD layout: renders in
app/pages/index.vue - CRUD layout → Theme store: reads theme
- Product list → Client translations: uses locale
- Product API → Server translations: localizes responses
- Request security → Product API: checks requests