skmtcdocs

Stock generators overview

Catalog of the generators shipped under @skmtc/gen-. They're MIT-licensed and intended as starting points to read, learn from, and clone — not as polished products to install unchanged.

The stock generators demonstrate the major SKMTC patterns at production-realistic complexity. Most users will pick one or two as templates, clone them via skmtc clone, and edit the source to fit their own conventions (output paths, naming, peer libraries, rendered style).

What stock generators are

A stock generator is a published @skmtc/gen-* package on JSR. Each ships:

  • An Entry (toOasOperationEntry / toModelEntry / toGqlOperationEntry) exported from src/mod.ts
  • One or more Projection classes (src/<Name>.ts)
  • An optional enrichment schema (src/enrichments.ts)
  • A deno.json declaring its peer dependencies

Their license (MIT) is deliberately fork-friendly. The engine (@skmtc/core) is Apache 2.0; the templates are MIT.

Catalog

Schemas and types (model generators)

Run per OAS schema component. The four below have near-identical entry shape — they differ only in the Projection class. Together they're the strongest demonstration of the clone-to-customize philosophy.

GeneratorOutputReference
@skmtc/gen-typescriptTypeScript type aliasesgen-typescript
@skmtc/gen-zodZod validation schemasgen-zod
@skmtc/gen-valibotValibot validation schemasgen-valibot
@skmtc/gen-arktypeArkType validation schemasgen-arktype

Client-side (data fetching, mocks)

Run per OAS operation.

GeneratorOutputReference
@skmtc/gen-tanstack-query-fetch-zodTanstack Query hooks (fetch transport)gen-tanstack-query-fetch-zod
@skmtc/gen-tanstack-query-supabase-zodTanstack Query hooks (Supabase Postgrest transport)gen-tanstack-query-supabase-zod
@skmtc/gen-mswMSW mock handlers + a shared route listgen-msw

UI (React, requires composition)

Run per OAS operation. Compose with one of the model generators above for type-safe inputs.

GeneratorOutputReference
@skmtc/gen-shadcn-formReact form using shadcn/uigen-shadcn-form
@skmtc/gen-shadcn-selectSearchable select componentgen-shadcn-select
@skmtc/gen-shadcn-tableData table componentgen-shadcn-table

Server-side

Run per OAS operation. Aggregate per-operation handlers into a single app/router Projection.

GeneratorOutputReference
@skmtc/gen-expressExpress route registrationgen-express
@skmtc/gen-supabase-honoHono routes for Supabase Edge Functionsgen-supabase-hono

Typical combinations

Full-stack TypeScript app (REST)

@skmtc/gen-typescript           ← static types
@skmtc/gen-zod                  ← runtime validation
@skmtc/gen-tanstack-query-fetch-zod  ← hooks
@skmtc/gen-shadcn-form          ← forms for mutations

The three downstream generators (tanstack-query-*, shadcn-form) compose with gen-zod via insertNormalizedModel — the engine produces a single userBody Zod schema even when multiple generators need it.

MSW-driven dev workflow

@skmtc/gen-typescript
@skmtc/gen-zod
@skmtc/gen-msw                  ← mock handlers
@skmtc/gen-tanstack-query-fetch-zod

The form/table generators are optional in this combo — MSW gives you a backend, the hooks give you fetching, types give you safety. Add the UI generators when you start prototyping screens.

Supabase + UI combo

@skmtc/gen-typescript
@skmtc/gen-zod
@skmtc/gen-tanstack-query-supabase-zod
@skmtc/gen-shadcn-form
@skmtc/gen-shadcn-select
@skmtc/gen-shadcn-table

The UI select/table generators import isListResponse directly from @skmtc/gen-tanstack-query-supabase-zod — they're designed to go together.

How to use these docs

Each per-generator doc is light by design. The goal isn't to exhaustively document every method — the source is short and worth reading. The docs focus on:

  • What it generates (one or two output examples)
  • Key decisions and assumptions baked into the source
  • What patterns it demonstrates well
  • Typical customizations when cloned

When you're considering cloning a generator, read its per-doc page and its src/mod.ts together. The doc gives orientation; the source is authoritative.

See also

On this page