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.).
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)
const reconstructed = createTableSchema.fromJSON(json);
// JSON → TypeScript code
import { schemaToTypeScript } from "@/lib/table-schema/to-typescript";
const tsCode = schemaToTypeScript(json);Custom renderers (
display("custom", ...),filter.component,sheet.component) are functions and cannot be serialized. They are stripped duringtoJSON()and must be applied manually on reconstructed schemas.
Powered by OpenStatus
