Skip to main content
Batoi UIF Docs

Batoi UIF Micro Apps

Patterns for contained client-side application surfaces that operate within a larger Batoi page shell.

Version 3.0.0 Version 3 active maintenance Reviewed Aug 11, 2026 Next review Nov 11, 2026

Owner: Batoi Engineering Reviewed by: Batoi UIF Maintainers Source revision: b2f3478

Browse Batoi UIF Documentation Batoi UIF Micro Apps

Batoi UIF Micro Apps

A Batoi UIF Micro App is a contained client-side application surface that runs inside a larger Batoi page without owning the whole page shell.

It is useful when a page needs a real working tool, but the surrounding route still belongs to Batoi.com, Batoi Platform, or another product experience.

Contract

A UIF Micro App should have:

  • a bounded root element
  • route-scoped CSS and JavaScript
  • visible controls and state
  • clear input and output behavior
  • browser-only state unless a governed endpoint is configured
  • documentation explaining purpose, structure, and extension points

Responsibilities

LayerResponsibility
Public shellHeader, footer, navigation, breadcrumbs, page-level layout
Route pagepartMicro App markup and documentation blocks
Route prepartUIF CSS and route-scoped styling
Route postpartUIF JavaScript imports and app behavior
Markdown docsDurable guidance and examples

Example Root

Route Shell Batoi header, navigation, breadcrumbs, and page-level layout Controls CSV input Chart type Chart Surface Output Table
<section class="uif-workbench" data-uif-demo="data-visualization">
  <textarea data-uif-csv-input></textarea>
  <select data-uif-chart-type></select>
  <svg data-uif-chart></svg>
</section>

Good Use Cases

  • CSV visualization tools
  • AI app composers
  • theme builders
  • governed workflow forms
  • operational dashboards
  • resource registers
  • editor-backed content tools
  • realtime status panels
  • mobile shell previews
  • MCP approval widgets

State and Hydration

Use BatoiUIF.autoStart(root) or start(root) to hydrate declarative UIF behavior inside the Micro App root. Use createMicroAppStore() when the app needs predictable browser-side state shared across controls, previews, and exports.

Production Notes

Client-side examples can be useful without a server. Production applications should use governed service endpoints for identity, audit, persistence, rate limiting, and API key protection.