Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Logical architecture

@frame/core is intentionally flat. It provides utilities and validation schemas for the whole monorepo.

graph TD
    A[@frame/core] --> B(Zod schemas)
    A --> C(TypeScript types and interfaces)
    A --> D(Core configurations / utils)
    B --> E[Consumed by frontend apps]
    B --> F[Consumed by backend services]
  • src/: main source tree
    • schemas/: shared Zod schemas (API payloads, forms, config)
    • types/: shared TypeScript definitions
    • config/: base configuration utilities and constants
    • utils/: pure helpers with no environment-specific APIs
  1. Create the file under src/schemas/.

  2. Define it with Zod:

    import { z } from 'zod'
    export const appConfigSchema = z.object({
    appName: z.string(),
    version: z.string(),
    env: z.enum(['development', 'production', 'test']),
    })
    export type AppConfig = z.infer<typeof appConfigSchema>
  3. Export it from the package entry (regenerate barrels if your workflow uses them).

  4. Consume it from apps via @frame/core.

[!WARNING] Do not add Node.js-only or browser-only APIs here. Keep the package universally runnable.