Back to Docs
Visual Schema Builder (MVP)Issue #801
todos
2 fields
textstring
doneboolean?

Inspector

Select a node to edit fields, or select an edge to rename the relation.

Tip: click a collection to edit it, or use Relation then click source → target.

Generated TypeScript

import { z } from "zod";
import { createApp } from "zerithdb-sdk";

/**
 * Generated by the Visual Schema Builder (MVP).
 * Edit the schemas below or regenerate from the builder UI.
 */

export const TodosSchema = z.object({
  "text": z.string(),
  "done": z.boolean().optional(),
});
export type Todos = z.infer<typeof TodosSchema>;

export const relations = [
] as const;

export const app = createApp({
  appId: "my-app",
  // sync: { signalingUrl: "wss://signal.zerithdb.dev" },
  // debug: { devtools: true },
});

export const db = {
  todos: () => app.db<Todos>("todos"),
} as const;

Note: this generator emits zod usage for validation, but does not change ZerithDB runtime behavior.