Skip to content
Skip to content
Goodspeed

Connect Zod to your Goodspeed app

Runtime schema validation for forms, API responses, and generated data structures throughout every Goodspeed app. Goodspeed wires Zod into every app that needs it at generation time, so you start with a working integration, not a blank config and a documentation tab.

WHAT GETS WIRED IN

Built into every Zod build

Every app Goodspeed generates with Zod includes these wired integrations from the first build. No manual setup required.

ItemDescriptionStrength
lib/validation.ts exports emailSchema, passwordSchema, displayNameSchema, and feedbackSchema as reusable validatorslib/validation.ts exports emailSchema, passwordSchema, displayNameSchema, and feedbackSchema as reusable validators01
validate<T>(schema, data) helper returns a typed discriminated union result with no try/catch at call sitesvalidate<T>(schema, data) helper returns a typed discriminated union result with no try/catch at call sites02
zodV4Resolver wrapper in lib/forms.ts normalizes Zod v4 issues to the shape React Hook Form expectszodV4Resolver wrapper in lib/forms.ts normalizes Zod v4 issues to the shape React Hook Form expects03
Edge Function responses and Supabase RPC calls parsed through Zod schemas before data reaches componentsEdge Function responses and Supabase RPC calls parsed through Zod schemas before data reaches components04

Source: gas-template repository · form-validation

REAL GENERATED CODE

A snippet from a Zod integration the pipeline ships

This pattern comes directly from the gas-template codebase. The studio generates Zod integration code like this for every app that includes it, not a placeholder you have to fill in yourself.

  1. Typed validate helper

    // lib/validation.ts
    type ValidationResult<T> =
      | { success: true; data: T }
      | { success: false; errors: Record<string, string> };
    
    export function validate<T>(
      schema: ZodSchema<T>,
      data: unknown
    ): ValidationResult<T> {
      const result = schema.safeParse(data);
      if (result.success) return { success: true, data: result.data };
      const errors: Record<string, string> = {};
      result.error.issues.forEach((e) => {
        const key = e.path.join('.') || 'root';
        errors[key] = e.message;
      });
      return { success: false, errors };
    }
GDaily Allergens

Today's log

Gluten
Tree nuts
Shellfish
Dairy
HomeScanLogProfile

START WITH ZOD

Your Zod integration, generated