Skip to content
/ yui Public

AI to JSON to UI for next os interface,also for a2ui AI → JSON → UI

License

Notifications You must be signed in to change notification settings

evilbinary/yui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

423 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YUI - Ya Ya User Interface

License Language Platform

YUI is a lightweight GUI framework designed for AI applications, built with C language and configured via JSON. It features high performance, easy extensibility, and cross-platform support.

🌟 Key Features

  • Lightweight & High Performance: Optimized rendering pipeline with dirty rectangle rendering
  • Declarative UI: Describe interfaces using intuitive JSON configuration
  • Cross Platform: Supports Windows, macOS, and Linux
  • Rich Components: Built-in support for buttons, inputs, lists, grids, dialogs, and more
  • Animation System: Smooth animations with various easing functions
  • Theme System: Dynamic theme switching with JSON-based styling
  • Multiple JS Engines: Support for QuickJS, mquickjs, and Mario JavaScript engines
  • Network Support: Built-in socket and HTTP client capabilities

🚀 Quick Start

Installation

Clone the repository:

git clone https://github.com/evilbinary/YUI.git
cd YUI

Dependencies

Install required libraries:

Windows (MSYS2):

pacman -S mingw-w64-x86_64-SDL2
pacman -S mingw-w64-x86_64-SDL2_ttf
pacman -S mingw-w64-x86_64-SDL2_image
pacman -S mingw-w64-x86_64-cjson
pacman -S mingw-w64-x86_64-dlfcn

macOS:

brew install sdl2 sdl2_ttf sdl2_image cjson

Linux (Ubuntu/Debian):

sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libcjson-dev

Build & Run

# Build the project
python ya.py -b yui

# Run the application
python ya.py -r yui

Basic Configuration

Create a main configuration file (app.json):

{
    "type": "main",
    "assets": "app/assets",
    "font": "Roboto-Regular.ttf",
    "fontSize": "16",
    "source": "app/ui/main.json"
}

Create your UI definition (app/ui/main.json):

{
    "id": "main_window",
    "type": "View",
    "position": [0, 0],
    "size": [800, 600],
    "style": {
        "bgColor": "#2C3E50"
    },
    "children": [
        {
            "id": "hello_label",
            "type": "Label",
            "position": [300, 250],
            "size": [200, 50],
            "text": "Hello, YUI!",
            "style": {
                "color": "#ECF0F1",
                "fontSize": 24
            }
        }
    ]
}

📚 Documentation

Core Documentation

Component Guides

Advanced Topics

🖼️ Screenshots

Inspector Demo Scroll Demo Login Demo

🏗️ Architecture Overview

YUI follows a layered architecture design:

┌─────────────────────────────────────┐
│           Application Layer         │  ← Your App Logic
├─────────────────────────────────────┤
│           JavaScript Engine         │  ← QuickJS/mquickjs/Mario
├─────────────────────────────────────┤
│            Event System             │  ← Input Handling
├─────────────────────────────────────┤
│           Layout Manager            │  ← UI Layout Calculation
├─────────────────────────────────────┤
│          Render Pipeline            │  ← Graphics Rendering
├─────────────────────────────────────┤
│           Backend Layer             │  ← SDL2/Graphics API
└─────────────────────────────────────┘

🤝 Contributing

Contributions are welcome! Please read our Contribution Guidelines before submitting pull requests.

📄 License

This project is licensed under the GNU Lesser General Public License v2.1 (LGPL-2.1) - see the LICENSE file for details.

Key Points of LGPL-2.1:

  • You can freely use, modify, and distribute this library
  • If you modify the library itself, you must release your changes under LGPL-2.1
  • You can link this library with proprietary software
  • When distributing binaries, you must provide access to the library's source code

For commercial use inquiries, please contact the maintainers.

🙏 Acknowledgments

  • SDL2 - Cross-platform development library
  • cJSON - Ultralightweight JSON parser
  • QuickJS - Small and embeddable JavaScript engine

Made with ❤️ for the open-source community

About

AI to JSON to UI for next os interface,also for a2ui AI → JSON → UI

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published