mirror of
https://github.com/zenstackhq/zenstack
synced 2026-05-24 10:08:55 +00:00
1.1 KiB
1.1 KiB
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
- Install dependencies:
pnpm install
- Initialize the database and seed data:
pnpm db:init
- Start the development server:
pnpm dev
The app will be available at http://localhost:3302
Project Structure
app/- Nuxt app components and pagesserver/- Nuxt server filesapi/model/[...path].ts- ZenStack API endpointutils/db.ts- Database client
zenstack/- ZenStack schema and generated filesschema.zmodel- Database schema definitionseed.ts- Database seeding script
Available Scripts
pnpm dev- Start development serverpnpm build- Build for productionpnpm generate- Generate ZenStack TypeScript schemapnpm db:init- Initialize database and seed data