Contributor
Ayushman

LuCI Migration to JavaScript based Framework: Improved UX and Performance on OpenWrt-based Devices


Mentors
andibraeu, Paul Spooren
Organization
freifunk
Technologies
javascript, lua, html, ash
Topics
web, performance optimization, New RPCD Services
LuCI is a framework used to build web interfaces for configuration and monitoring on embedded devices such as WiFi routers, etc. In the old CBI based system, pages were rendered on the router and delivered as HTML to the browser, leading to a higher load on the embedded devices. To address this issue, LuCI applications must be migrated to JavaScript-based framework to reduce the load on embedded devices and improve performance. This migration involves rendering pages on the client-side using JavaScript, rather than on the router. To facilitate this migration, LuCI provides a JavaScript API that will be used to build web interfaces that can be rendered in the browser. To make this migration possible, new RPCD services will be developed to provide data to the client side that was formerly used directly on the router. This data will be provided in JSON format via RPCD (Remote Procedure Call Daemon) and UBUS. These new RPCD services will need to provide the same functionality as the old system but in a format that can be used by client-side JavaScript. The migration of LuCI to JavaScript-based framework will offer several benefits to OpenWrt community and other users of OpenWrt-based devices. One of the primary benefits is improved performance and reduced load on embedded devices such as WiFi routers. By rendering pages on the client-side using JavaScript, rather than on the router, this will reduce the workload on the router and improve the UX for those interacting with the LuCI web interface. This will be particularly beneficial for users with lower-specification routers etc. Another benefit of the new system is increased flexibility for developers. The use of a client-side JavaScript framework provides developers with more options for customizing and extending the LuCI web interface. And this also provides a standardized way for developers to interact with the router's services which should make it easier to develop and maintain LuCI-based applications.