cd /news/ai-tools/i-built-a-tool-that-generates-typesc… · home topics ai-tools article
[ARTICLE · art-21915] src=dev.to pub= topic=ai-tools verified=true sentiment=↑ positive

I built a tool that generates TypeScript fixtures from interfaces and Zod schemas

A developer built FixtureKit, a free browser-based tool that generates TypeScript mock data fixtures from interfaces, types, or Zod schemas. The tool uses semantic field inference to produce realistic values and deterministic output based on field name hashes, supporting up to five fixtures at once without any backend or eval operations.

read1 min publishedJun 4, 2026

Every TypeScript project reaches the same point: you've defined your types, now you need mock data for tests, Storybook stories, or local dev. You end up hand-writing the same boilerplate mockUser

, mockProduct

, mockOrder

objects over and over.

I built FixtureKit to fix that — a free developer tool, not a product pitch.

Paste a TypeScript interface

, type

, or a Zod z.object(...)

schema → get a copy-ready export const mock…

TypeScript fixture.

Try it: https://fixture-kit.vercel.app

Input:

interface Product {
  id: string;
  name: string;
  price: number;
  inStock: boolean;
  tags: string[];
}

Output:

export const mockProduct: Product = {
  id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  name: "Wireless Keyboard",
  price: 49.99,
  inStock: true,
  tags: ["electronics", "accessories"],
};

What makes it useful

Semantic field inference — it doesn't just fill every string with "value". Field names like email, name, url, price, createdAt map to realistic value pools. Type compatibility is enforced: you won't get an email string on a number field.

Deterministic output — uses a hash of the field name + fixture index. No Math.random(). Same schema always gives the same output. Safe to commit.

No eval, no backend — Zod schemas parsed with a custom recursive-descent parser. TypeScript schemas use the TypeScript compiler API. Everything runs in the browser.

Generate up to 5 fixtures at once — useful for seeding UI components or table/list test cases.

Supported input

TypeScript: interface, type, arrays, nested objects, optional fields, unions, literal types

Zod: z.object, z.string, z.number, z.boolean, z.array, z.enum, z.union, z.literal, .optional(), .nullable(), nested z.object

Advanced features (generics, utility types, .refine, .transform) are out of scope and return a clear error.

Tech

React 18 · TypeScript 5 · Vite · TypeScript compiler API (in-browser)

Source

https://github.com/Wasef-Hussain/FixtureKit

Feedback welcome — especially on schema shapes I haven't handled well.

── more in #ai-tools 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-a-tool-that-…] indexed:0 read:1min 2026-06-04 ·