{"slug": "i-built-a-tool-that-generates-typescript-fixtures-from-interfaces-and-zod", "title": "I built a tool that generates TypeScript fixtures from interfaces and Zod schemas", "summary": "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.", "body_md": "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`\n\n, `mockProduct`\n\n, `mockOrder`\n\nobjects over and over.\n\nI built **FixtureKit** to fix that — a free developer tool, not a product pitch.\n\nPaste a TypeScript `interface`\n\n, `type`\n\n, or a Zod `z.object(...)`\n\nschema → get a copy-ready `export const mock…`\n\nTypeScript fixture.\n\n**Try it:** [https://fixture-kit.vercel.app](https://fixture-kit.vercel.app)\n\n**Input:**\n\n```\ninterface Product {\n  id: string;\n  name: string;\n  price: number;\n  inStock: boolean;\n  tags: string[];\n}\n```\n\n**Output:**\n\n``` js\nexport const mockProduct: Product = {\n  id: \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n  name: \"Wireless Keyboard\",\n  price: 49.99,\n  inStock: true,\n  tags: [\"electronics\", \"accessories\"],\n};\n```\n\n**What makes it useful**\n\nSemantic 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.\n\nDeterministic output — uses a hash of the field name + fixture index. No Math.random(). Same schema always gives the same output. Safe to commit.\n\nNo eval, no backend — Zod schemas parsed with a custom recursive-descent parser. TypeScript schemas use the TypeScript compiler API. Everything runs in the browser.\n\nGenerate up to 5 fixtures at once — useful for seeding UI components or table/list test cases.\n\n**Supported input**\n\nTypeScript: interface, type, arrays, nested objects, optional fields, unions, literal types\n\nZod: z.object, z.string, z.number, z.boolean, z.array, z.enum, z.union, z.literal, .optional(), .nullable(), nested z.object\n\nAdvanced features (generics, utility types, .refine, .transform) are out of scope and return a clear error.\n\n**Tech**\n\nReact 18 · TypeScript 5 · Vite · TypeScript compiler API (in-browser)\n\n**Source**\n\n[https://github.com/Wasef-Hussain/FixtureKit](https://github.com/Wasef-Hussain/FixtureKit)\n\nFeedback welcome — especially on schema shapes I haven't handled well.", "url": "https://wpnews.pro/news/i-built-a-tool-that-generates-typescript-fixtures-from-interfaces-and-zod", "canonical_source": "https://dev.to/wasef_hussain_2145ce814de/i-built-a-tool-that-generates-typescript-fixtures-from-interfaces-and-zod-schemas-g52", "published_at": "2026-06-04 20:15:54+00:00", "updated_at": "2026-06-04 20:42:41.238788+00:00", "lang": "en", "topics": ["ai-tools"], "entities": ["FixtureKit"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-tool-that-generates-typescript-fixtures-from-interfaces-and-zod", "markdown": "https://wpnews.pro/news/i-built-a-tool-that-generates-typescript-fixtures-from-interfaces-and-zod.md", "text": "https://wpnews.pro/news/i-built-a-tool-that-generates-typescript-fixtures-from-interfaces-and-zod.txt", "jsonld": "https://wpnews.pro/news/i-built-a-tool-that-generates-typescript-fixtures-from-interfaces-and-zod.jsonld"}}