zenstack/samples/nuxt
Yiming Cao 2c9db43cc2
feat(cli): implement watch mode for generate (#573)
* feat(cli): implement watch mode for generate

* chore(root): update pnpm-lock.yaml

* chore(cli): track all model declaration and removed paths, logs in past tense

* fix(cli): typo, unused double array from

* fix(orm): preserve zod validation errors when validating custom json types

* update

* chore(cli): move import, fix parallel generation on watch

* feat(common-helpers): implement single-debounce

* chore(cli): use single-debounce for debouncing

* feat(common-helpers): implement single-debounce

* fix(common-helpers): re run single-debounce

* fix(tanstack): avoid invalidating queries for custom proc mutations

* add missing file

* fix formatting

---------

Co-authored-by: FTB_lag <tabolskyy.git@gmail.com>
2026-01-08 16:12:14 +08:00
..
app feat(cli): implement watch mode for generate (#573) 2026-01-08 16:12:14 +08:00
public refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00
server feat(cli): implement watch mode for generate (#573) 2026-01-08 16:12:14 +08:00
zenstack feat(cli): implement watch mode for generate (#573) 2026-01-08 16:12:14 +08:00
.gitignore refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00
nuxt.config.ts refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00
package.json refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00
README.md refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00
tsconfig.json refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00

ZenStack Nuxt Blog Sample

A simple blog application built with Nuxt, ZenStack ORM, and TanStack Query Vue integration.

Features

  • Create, read, update, and delete blog posts
  • User management
  • Published/draft post filtering
  • Optimistic updates
  • TanStack Query Vue integration with ZenStack

Getting Started

  1. Install dependencies:
pnpm install
  1. Initialize the database and seed data:
pnpm db:init
  1. Start the development server:
pnpm dev

The app will be available at http://localhost:3302

Project Structure

  • app/ - Nuxt app components and pages
  • server/ - Nuxt server files
    • api/model/[...path].ts - ZenStack API endpoint
    • utils/db.ts - Database client
  • zenstack/ - ZenStack schema and generated files
    • schema.zmodel - Database schema definition
    • seed.ts - Database seeding script

Available Scripts

  • pnpm dev - Start development server
  • pnpm build - Build for production
  • pnpm generate - Generate ZenStack TypeScript schema
  • pnpm db:init - Initialize database and seed data