yao/sui
Max ebf3dcc870 Refactor Documentation for Backend API Method Naming and Iframe Communication
- Updated iframe documentation to remove token handling from the setup message, clarifying the focus on theme and locale.
- Added a new section in MCP documentation detailing HTTP transport configuration for API access, enhancing clarity on authorization.
- Revised frontend API documentation to standardize method naming by removing the 'Api' prefix in examples, improving consistency across backend calls.
- Enhanced event handling documentation by updating method names in examples, ensuring alignment with the new naming conventions.
2026-01-03 11:42:23 +08:00
..
api Refactor SUI Command Arguments and Enhance Default Template Handling 2026-01-01 10:28:45 +08:00
core Refactor SUI Command Arguments and Enhance Default Template Handling 2026-01-01 10:28:45 +08:00
docs Refactor Documentation for Backend API Method Naming and Iframe Communication 2026-01-03 11:42:23 +08:00
libsui Refactor SUI Command Arguments and Enhance Default Template Handling 2026-01-01 10:28:45 +08:00
storages Refactor SUI Command Arguments and Enhance Default Template Handling 2026-01-01 10:28:45 +08:00
README.md Update Documentation for Frontend API and Event Handling Enhancements 2026-01-03 11:31:15 +08:00

SUI - Simple User Interface

SUI is a full-stack web development framework that allows you to create web applications using HTML, CSS, and TypeScript/JavaScript without complex build tools.

Features

  • Page as Component: Every page is a component, unifying the development model
  • Template Syntax: Intuitive data binding, conditionals, and loops
  • Backend Scripts: Server-side logic with TypeScript
  • Scoped Styles: Automatic CSS scoping per component
  • i18n Support: Built-in internationalization
  • Agent SUI: Special configuration for AI Agent applications

Quick Start

Directory Structure

/templates/<template_name>/
├── __document.html         # Global document template
├── __assets/               # Static assets
├── __locales/              # Locale files
└── <route>/                # Pages
    └── <page>/
        ├── <page>.html     # HTML template
        ├── <page>.css      # Styles
        ├── <page>.ts       # Frontend script
        ├── <page>.json     # Data configuration
        ├── <page>.config   # Page configuration
        └── <page>.backend.ts  # Backend script

Basic Page

/home/home.html:

<div class="home">
  <h1>{{ title }}</h1>
  <p s:if="{{ showMessage }}">{{ message }}</p>
</div>

/home/home.json:

{
  "title": "Welcome",
  "showMessage": true,
  "message": "Hello, World!"
}

Commands

# Build templates
yao sui build <sui> [template]

# Watch for changes
yao sui watch <sui> [template]

# Build Agent SUI
yao sui build agent

# Watch Agent SUI
yao sui watch agent

Documentation

Agent SUI

Agent SUI is designed for AI Agent applications with automatic page loading from assistants:

<app>/
├── agent/
│   └── template/              # Agent SUI template
│       ├── __document.html
│       ├── __assets/
│       └── pages/
└── assistants/
    └── <name>/
        └── pages/             # Assistant pages

Build with: yao sui build agent

See Agent SUI Documentation for details.

License

This project is part of the Yao App Engine and follows the Yao Open Source License.