Schema & Knowledge Graph
Contextual UI uses a Single Source of Truth (SSOT) schema definition to automatically compile and serve a referentially-linked Schema.org @graph for search engines and AI agents.
Single Source of Truth Schema
site.schema.tsCentral schema definition combining standard Zod types with pre-built schema registries ( websiteRegistry, faqRegistry, navbarRegistry ) that power both runtime UI and semantic metadata.
import {
defineSchema,
organizationRegistry,
websiteRegistry,
webpageRegistry,
navbarRegistry,
faqRegistry,
footerRegistry,
} from 'contextual-ui/server';
import { z } from 'zod';
export const siteSchema = defineSchema({
organization: organizationRegistry(),
website: websiteRegistry(),
webpage: webpageRegistry(),
navbar: navbarRegistry(),
faq: faqRegistry(),
footer: footerRegistry(),
announcement: {
schema: z.object({
enabled: z.boolean(),
message: z.string().describe('Announcement Banner Text'),
}),
},
});Compiled Knowledge Graph JSON
The generated Schema.org @graph compiled from the SSOT schema and connector data, served sitewide for search crawlers and AI agents. It can be consumed directly from the auto-generated endpoint /api/graph.json
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "Organization",
"@id": "https://contextual.site/#organization",
"name": "Tasuku Studio",
"url": "https://tasuku.io",
"logo": "https://contextual.site/images/onigiri_logo.svg",
"description": "Creator and maintainer of Contextual UI.",
"sameAs": [
"https://github.com/orchidtexture",
"https://twitter.com/orchidtexture"
]
},
{
"@type": "WebSite",
"@id": "https://contextual.site/#website",
"name": "Contextual UI",
"url": "https://contextual.site",
"description": "A headless UI and semantic SEO Knowledge Graph library.",
"publisher": {
"@id": "https://contextual.site/#organization"
}
},
{
"@type": "WebPage",
"@id": "https://contextual.site/#webpage:home",
"name": "Contextual UI - Home",
"url": "https://contextual.site/",
"description": "A headless UI and semantic SEO Knowledge Graph library.",
"isPartOf": {
"@id": "https://contextual.site/#website"
},
"hasPart": [
{
"@id": "https://contextual.site/#navbar"
},
{
"@id": "https://contextual.site/#faq"
},
{
"@id": "https://contextual.site/#footer"
}
]
},
{
"@type": "WebPage",
"@id": "https://contextual.site/#webpage:docs",
"name": "Documentation - Contextual UI",
"url": "https://contextual.site/docs",
"description": "Learn how to use Contextual UI.",
"isPartOf": {
"@id": "https://contextual.site/#website"
},
"hasPart": [
{
"@id": "https://contextual.site/#navbar"
},
{
"@id": "https://contextual.site/#faq"
},
{
"@id": "https://contextual.site/#footer"
}
]
},
{
"@type": "WebPage",
"@id": "https://contextual.site/#webpage:schema",
"name": "Schema Inspector - Contextual UI",
"url": "https://contextual.site/schema",
"description": "Inspect the generated Schema.org JSON-LD graph.",
"isPartOf": {
"@id": "https://contextual.site/#website"
},
"hasPart": [
{
"@id": "https://contextual.site/#navbar"
},
{
"@id": "https://contextual.site/#faq"
},
{
"@id": "https://contextual.site/#footer"
}
]
},
{
"@type": "WebPage",
"@id": "https://contextual.site/#webpage:studio",
"name": "Studio Playground - Contextual UI",
"url": "https://contextual.site/studio",
"description": "Interactive playground and code generator for Contextual UI.",
"isPartOf": {
"@id": "https://contextual.site/#website"
},
"hasPart": [
{
"@id": "https://contextual.site/#navbar"
},
{
"@id": "https://contextual.site/#faq"
},
{
"@id": "https://contextual.site/#footer"
}
]
},
{
"@type": "WebPage",
"@id": "https://contextual.site/#webpage:cms",
"name": "CMS Dashboard - Contextual UI",
"url": "https://contextual.site/cms",
"description": "Manage content and validate schemas.",
"isPartOf": {
"@id": "https://contextual.site/#website"
},
"hasPart": [
{
"@id": "https://contextual.site/#navbar"
},
{
"@id": "https://contextual.site/#faq"
},
{
"@id": "https://contextual.site/#footer"
}
]
},
{
"@type": "WebPage",
"@id": "https://contextual.site/#webpage:privacy",
"name": "Privacy Policy - Contextual UI",
"url": "https://contextual.site/privacy",
"description": "Privacy policy and data protection information for Contextual UI.",
"isPartOf": {
"@id": "https://contextual.site/#website"
},
"hasPart": [
{
"@id": "https://contextual.site/#navbar"
},
{
"@id": "https://contextual.site/#faq"
},
{
"@id": "https://contextual.site/#footer"
}
]
},
{
"@type": "WebPage",
"@id": "https://contextual.site/#webpage:terms",
"name": "Terms of Service - Contextual UI",
"url": "https://contextual.site/terms",
"description": "Terms of service and usage agreements for Contextual UI.",
"isPartOf": {
"@id": "https://contextual.site/#website"
},
"hasPart": [
{
"@id": "https://contextual.site/#navbar"
},
{
"@id": "https://contextual.site/#faq"
},
{
"@id": "https://contextual.site/#footer"
}
]
},
{
"@type": "SiteNavigationElement",
"@id": "https://contextual.site/#navbar",
"isPartOf": {
"@id": "https://contextual.site/#webpage"
},
"name": "Contextual",
"url": "https://contextual.site/",
"hasPart": [
{
"@type": "SiteNavigationElement",
"name": "Home",
"url": "https://contextual.site/"
},
{
"@type": "SiteNavigationElement",
"name": "Docs",
"url": "https://contextual.site/docs"
},
{
"@type": "SiteNavigationElement",
"name": "Schema Graph",
"url": "https://contextual.site/schema"
},
{
"@type": "SiteNavigationElement",
"name": "Studio",
"url": "https://contextual.site/studio"
}
]
},
{
"@type": "WPFooter",
"@id": "https://contextual.site/#footer",
"isPartOf": {
"@id": "https://contextual.site/#webpage"
},
"name": "Contextual",
"description": "Headless UI components with built-in Agentic AI infrastructure and Schema.org SEO.",
"url": "https://contextual.site/",
"copyrightHolder": {
"@id": "https://contextual.site/#organization"
},
"copyrightYear": 2026,
"hasPart": [
{
"@type": "SiteNavigationElement",
"name": "Docs",
"url": "https://contextual.site/docs"
},
{
"@type": "SiteNavigationElement",
"name": "Schema Graph",
"url": "https://contextual.site/schema"
},
{
"@type": "SiteNavigationElement",
"name": "/api/graph.json ↗",
"url": "https://contextual.site/api/graph.json"
},
{
"@type": "SiteNavigationElement",
"name": "Tasuku Studio",
"url": "https://tasuku.io"
},
{
"@type": "SiteNavigationElement",
"name": "GitHub Repository",
"url": "https://github.com/orchidtexture/contextual-ui"
},
{
"@type": "SiteNavigationElement",
"name": "Privacy Policy",
"url": "https://contextual.site/privacy"
},
{
"@type": "SiteNavigationElement",
"name": "Terms of Service",
"url": "https://contextual.site/terms"
}
]
},
{
"@type": "FAQPage",
"@id": "https://contextual.site/#faq",
"isPartOf": {
"@id": "https://contextual.site/#webpage"
},
"mainEntity": [
{
"@type": "Question",
"name": "What is Contextual UI?",
"acceptedAnswer": {
"@type": "Answer",
"text": "An open-source library that provides the building blocks for next-gen AI-ready websites."
}
},
{
"@type": "Question",
"name": "How does semantic SEO work with Contextual UI?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Contextual UI automatically injects structured JSON-LD graphs for search engines and AI agents."
}
},
{
"@type": "Question",
"name": "Can I use custom Zod schemas for CMS validation?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes, any Zod schema can be plugged into the CMS dashboard and form generator."
}
},
{
"@type": "Question",
"name": "Why use Contextual UI for building websites when AI is getting better and better?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Well, libraries like Contextual UI are the kind of thing that make AI better, so lets use it!"
}
}
]
},
{
"@type": "ContactAction",
"@id": "https://contextual.site/#action:form-contact-sales",
"name": "Contact Sales & Support",
"description": "Send our team a direct message. Submissions are dynamically validated and Agentic AI ready.",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://contextual.site/api/contact",
"httpMethod": "POST",
"contentType": "application/json"
},
"isPartOf": {
"@id": "https://contextual.site/#webpage"
},
"object": [
{
"@type": "PropertyValueSpecification",
"valueName": "name",
"valueRequired": true,
"valueMinLength": 2
},
{
"@type": "PropertyValueSpecification",
"valueName": "email",
"valueRequired": true,
"valuePattern": "^.+@.+\\..+$"
},
{
"@type": "PropertyValueSpecification",
"valueName": "topic",
"valueRequired": true,
"valueOption": [
"general",
"sales",
"support",
"partnership"
]
},
{
"@type": "PropertyValueSpecification",
"valueName": "message",
"valueRequired": true,
"valueMinLength": 10
}
]
}
]
}