UXI Implementation in this Repo¶
This page explains how the UXI architecture is instantiated in the uxi-landing project.
Project Role¶
- Blueprint: This repo is the reference implementation of the OVES UXI architecture.
- Demo: It acts as a live demo for:
- JSON-configured pages rendered via UXI blocks
- Cloudinary-backed media registry
- Block-with-props pattern for all UXI components
Key Directories¶
src/uxi/blocks/: domain blocks such asHero,FeatureGrid,StatsStrip,StoryTimeline, andCta.layout/:AppShell, header, footer, navigation wrappers.media/:media.jsonregistry, typedregistry.ts, andUxiImagewrapper for Cloudinary assets.PageRenderer.tsx: maps JSON page configs into block rendering viaBlockRegistry.BlockRegistry.tsx: centraltype -> componentmapping with typed props.content/pages/home.json: homepage defined as a sequence of UXI blocks with props.mobility.json: mobility-focused page using the same blocks and a Cloudinary background video.src/app/page.tsx: loadshome.json, appliesUxiHeader/UxiFooter, and callsPageRenderer.mobility/page.tsx: loadsmobility.jsonand renders it through the same UXI engine.
Block with Props + JSON Pattern¶
- Each block in
src/uxi/blocksdefines a TypeScript props interface (e.g.HeroProps). BlockRegistrydefines a typed union of{ type, props }wherepropsmust match that interface.- Page JSON files provide
typeandpropsfor each block instance. PageRenderersimply loops throughblocks[]and callsrenderBlockto instantiate the right component.
JSON Schema Validation¶
To prevent typos and ensure type safety in JSON content:
schema/block-config.schema.json: Defines all valid block types and their prop structuresschema/page-config.schema.json: Defines the full page configuration format.vscode/settings.json: Wires schemas into VS Code for authoring-time validation and autocompletescripts/validate-content.js: Build-time validation script (runs beforenpm run build)
Benefits:
- ✅ Catch typos like "hero1" before runtime
- ✅ IDE autocomplete for block types and props
- ✅ Build fails early if content is invalid
- ✅ MCP-ready schemas for AI agent integration
See schema/README.md for full documentation.
Media and Cloudinary¶
- Cloudinary is used as the central media repository.
- The UXI media layer is organized as:
media.json: JSON catalog of media assets with semantic IDs (e.g.logo.oves.primary.lockup.en).registry.ts: typed access to those assets viagetMediaandUxiMediaId.UxiImage.tsx: abstraction overnext/imagethat acceptsmediaIdinstead of raw URLs.- Page JSON can also pass Cloudinary URLs directly as
imageUrl/backgroundEmbedUrlprops when appropriate.
Background Video Behavior¶
- Hero blocks can accept a
backgroundEmbedUrl(Cloudinary player URL). - The component appends
autoplay=true&muted=true&loop=true&controls=falseand renders the video at 50% opacity so it stays in the background while content remains primary.
For broader architectural principles, see UXI Architecture in the navigation.