Builder
The /builder page lets you visually build a table schema:
- Paste JSON data (or upload a CSV) in the left panel
- Click Generate Schema — the schema is auto-inferred from your data
- A live table preview appears with filters, sorting, and row details
- Edit the Schema JSON directly and click Apply for instant updates
- Click Export TS to copy the generated
createTableSchema(...)code
Type Inference
The inference engine detects column types from your data:
- ISO 8601 strings / Unix-ms numbers →
timestamp+timerangefilter - Booleans →
boolean+checkboxfilter - Numbers with varying values →
number+sliderfilter - Strings with ≤10 distinct values →
enum+checkboxfilter - Arrays of strings →
arraywith enum items - Plain objects →
record(not filterable)
Post-inference heuristics apply smart defaults (ID-like → code display, latency → "ms" unit, log level → defaultOpen, etc.).
The same inference engine powers the zero-config DataTableAuto component — pass raw data and get a fully rendered table with no schema definition needed.
Example Datasets
Example datasets (Pokemon, HTTP Logs, Space Missions, Cocktails, Orders, Issues, Movies, RPG Characters) are included to explore different configurations.
Serialization & AI
The schema serializes to a function-free JSON descriptor for AI agents, MCP tools, or remote storage.
// Schema → JSON
const json = tableSchema.toJSON();
// JSON.stringify(tableSchema) also works
// JSON → Schema (e.g. from an AI agent)
// Takes `unknown` — untrusted, hand-pasted, or older JSON is migrated and
// validated on the way in, and throws with a message if it cannot be.
const reconstructed = createTableSchema.fromJSON(json);
// JSON → TypeScript code
import { schemaToTypeScript } from "@/lib/table-schema/to-typescript";
const tsCode = schemaToTypeScript(json);The descriptor carries a version field. createTableSchema.fromJSON runs migrateSchemaJSON first, so JSON written by an older build still loads.
Custom renderers (
display("custom", ...),filter.component,sheet.component,sheet.condition) are functions and cannot be serialized. They are stripped duringtoJSON()and must be applied manually on reconstructed schemas. The column's other state is not affected: a column with a custom cell still serializes its real display type, so the reconstructed schema renders the built-in cell for that kind rather than falling back to plain text.
