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]
Module structure
Section titled “Module structure”src/: main source treeschemas/: shared Zod schemas (API payloads, forms, config)types/: shared TypeScript definitionsconfig/: base configuration utilities and constantsutils/: pure helpers with no environment-specific APIs
Guides
Section titled “Guides”Add a new schema
Section titled “Add a new schema”-
Create the file under
src/schemas/. -
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> -
Export it from the package entry (regenerate barrels if your workflow uses them).
-
Consume it from apps via
@frame/core.
[!WARNING] Do not add Node.js-only or browser-only APIs here. Keep the package universally runnable.