mirror of
https://github.com/zenstackhq/zenstack
synced 2026-05-24 10:08:55 +00:00
Register SuperJSON custom serializers for the three JSON null sentinels in both the client-helpers fetch layer and the server's registerCustomSerializers, so they survive HTTP round-trips when used as query filters or mutation input. Re-export the singletons from all tanstack-query framework entry points (react, vue, svelte) for convenient user access. Fixes #2278 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| eslint.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsdown.config.ts | ||
| vitest.config.ts | ||
@zenstackhq/server
Automatic CRUD API handlers and server adapters for ZenStack. Exposes your ZenStack ORM as RESTful or RPC-style API endpoints with built-in OpenAPI spec generation.
Supported Frameworks
- Express
- Fastify
- Next.js
- Nuxt
- SvelteKit
- Hono
- Elysia
- TanStack Start
API Styles
- REST — Resource-oriented endpoints with JSON:API support
- RPC — Procedure-call style endpoints
Installation
npm install @zenstackhq/server
Usage (Express example)
import express from 'express';
import { ZenStackMiddleware } from '@zenstackhq/server/express';
import { RPCApiHandler } from '@zenstackhq/server/api';
const app = express();
app.use('/api/model', ZenStackMiddleware({...}));