How zhaojh329/oui works
• Front-end UI Modules:
– There is a common UI core (“oui-ui-core”) which holds shared Vue3/Element Plus assets (e.g., the “htdoc” directory with package.json, vite.config.js, etc.).
– Additionally, several modular “applications” (such as oui-app-acl, oui-app-backup, oui-app-demo, etc.) each have their own “htdoc” directories containing individual Vue components and pages. They represent discrete pages or features that can be packaged as separate IPK modules.
• Back-end API and RPC Services:
– The “oui-rpc-core” directory holds Lua-based code for API endpoints and RPC services, which are built with Lua-eco.
– Within each application, there are “files” directories (often containing menu.json and subdirectories like “rpc”) that supply Lua scripts (such as acl.lua, demo.lua, etc.) which likely serve as back-end logic or configuration.
• Configuration and System Integration:
– The “libuci-lua-53” module indicates integration with OpenWrt’s UCI system, allowing the framework to interact with native configuration systems.
– Other auxiliary files (like Makefiles, node.mk, version.mk, etc.) drive building and deployment.
• Documentation:
– The “docs” directory is present for developer and user guidance and gives context to how the UI and API interact.
Relationships and interactions
– The Front-end is built using Vue3, Element Plus, and Vite. Each modular UI component (from either “oui-ui-core” or individual “oui-app-*” directories) is responsible for the presentation layer.
– The Back-end, developed in Lua using Lua-eco, offers API endpoints via RPC (see “oui-rpc-core” and the rpc scripts in each application).
• How the UI components call the Back-end API:
• Integration with OpenWrt’s UCI system:
Architectural patterns and technologies
• Separation of concerns:
– Highlight that front-end and back-end are independently developed—this is underscored by the project’s stated “separation of front-end and backend.”
• Modular design:
– Each “oui-app-*” is a self-contained module that corresponds to a specific feature (e.g., ACL management, DHCP lease, user management, etc.) similar to the modular approach of Luci.
• Technology Stacks:
– For the Front-end: Vue3, Element Plus, and Vite.
– For the Back-end: Lua (with Lua-eco) along with RPC routing logic found in “oui-rpc-core.”
– Integration with OpenWrt configuration via libuci-lua-53.