How opentiny/tiny-engine works
Main System Components
• Designer UI Client: This is the front-end “designer” application. Look at directories like “designer-demo” and packages such as “packages/design-core” and “packages/canvas”. These contain the canvas, components for layout, configurators, and the real-time preview.
• Plugin Ecosystem: Under “packages/plugins” you have many subpackages (block, bridge, datasource, help, i18n, materials, page, robot, state, tree, script, etc.). These represent independent plug-in modules that add extensibility and customized functionalities.
• Built-in Components & Configurators: Highlight “packages/builtinComponent” and “packages/configurator” which offer core UI components (like CanvasRow, CanvasCol, etc.) and configuration panels for low-code development.
• Engine CLI: The “packages/engine-cli” serves as a command-line tool to scaffold projects, generate configuration files, and bundle code for deployment.
• Supporting Services: Although the main focus is on the front-end and design frameworks, note the “mockServer” directory which simulates back-end APIs and data. Also, reference in the README the connection to external projects “tiny-engine-webservice” and “tiny-engine-data-center” for production integration.
How Components Interact
• The Designer UI interacts with users (developers) via a browser with a design canvas, configurable panels, and a real-time preview. It communicates with the back-end (or a mock server during local development) for fetching/saving application data.
• The Plugin modules are loosely coupled with the Designer. They extend functionality (e.g., block creation, advanced UI controls, material management) and interact with core components through well-defined APIs and extension hooks.
• The Engine CLI acts as a development tool to generate deployable source code based on the current design and configuration. It interacts with the core design system to output customized code.
• Built-in components (including canvas and layout modules) render the view and support real-time editing, while configurators provide property and event editing capabilities.
Architectural Patterns and Technologies
• Modular / Plugin Architecture: The repository is organized as a monorepo with many independent packages, enabling flexible extension and maintenance.
• Component-Based Front-End: Built primarily with Vue (as evidenced by *.vue files) and managed via Vite as the build tool.
• CLI & Code Generation: A dedicated CLI package for generating configuration and scaffolding output, which is critical for both high-code and low-code integration.
• Environment-Specific Configuration: Different parts (like “designer-demo”, “mockServer”, and multiple Vite config files) indicate support for development vs. production environments with live-reload and mock data features.