Zod Schema Sharing
Define your schema once and share it across the frontend, BFF, Azure Functions, and Cosmos DB — no duplication, no drift.
Schema-driven full-stack development for Next.js on Azure. End-to-end type safety with shared Zod schemas.

npx swallowkit init my-app
cd my-appnpx swallowkit create-model todo// shared/models/todo.ts
import { z } from 'zod';
export const todo = z.object({
id: z.string(),
text: z.string().min(1).max(200),
completed: z.boolean().default(false),
createdAt: z.string().optional(),
updatedAt: z.string().optional(),
});
export type Todo = z.infer<typeof todo>;npx swallowkit scaffold shared/models/todo.tsThis generates Azure Functions, BFF API routes, and React components — all fully typed.
npx swallowkit dev
# Next.js → http://localhost:3000
# Azure Functions → http://localhost:7071