Skip to content

SwallowKit型安全 Azure 開発ツールキット

Azure 上の Next.js アプリのためのスキーマ駆動フルスタック開発。Zod スキーマ共有でエンドツーエンド型安全を実現。

SwallowKit

クイックスタート

bash
npx swallowkit init my-app
cd my-app

はじめてのモデルを作成

bash
npx swallowkit create-model todo
typescript
// 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>;

CRUD を自動生成

bash
npx swallowkit scaffold shared/models/todo.ts

Azure Functions・BFF API ルート・React コンポーネントが完全型付きで生成されます。

開発サーバーを起動

bash
npx swallowkit dev
# Next.js → http://localhost:3000
# Azure Functions → http://localhost:7071

Released under the MIT License.