diff --git a/docs/en/api-reference/protocols/esp_http_server.rst b/docs/en/api-reference/protocols/esp_http_server.rst
index 458ed327e2..88078305da 100644
--- a/docs/en/api-reference/protocols/esp_http_server.rst
+++ b/docs/en/api-reference/protocols/esp_http_server.rst
@@ -106,7 +106,7 @@ Asynchronous Handlers
RESTful API
-----------
-:example:`protocols/http_server/restful_server` demonstrates how to implement a RESTful API server and HTTP server, with a frontend browser UI, and designs several APIs to fetch resources, using mDNS to parse the domain name, and deploying the webpage to host PC via semihost technology or to SPI flash or SD Card.
+:example:`protocols/http_server/restful_server` demonstrates how to implement a RESTful API server and web server, with a modern frontend UI, and designs several APIs to fetch resources, using mDNS to parse the domain name, and deploying the webpage to SPI flash.
URI Handlers
------------
diff --git a/docs/zh_CN/api-reference/protocols/esp_http_server.rst b/docs/zh_CN/api-reference/protocols/esp_http_server.rst
index 842719283e..4fa545f442 100644
--- a/docs/zh_CN/api-reference/protocols/esp_http_server.rst
+++ b/docs/zh_CN/api-reference/protocols/esp_http_server.rst
@@ -106,7 +106,7 @@ ESP HTTP 服务器有各种事件,当特定事件发生时,:doc:`事件循
RESTful API
-----------
-:example:`protocols/http_server/restful_server` 演示了如何实现 RESTful API 服务器和 HTTP 服务器,并结合前端浏览器 UI,设计了多个 API 来获取资源,使用 mDNS 解析域名,并通过半主机技术将网页部署到主机 PC、SPI flash 或 SD 卡上。
+:example:`protocols/http_server/restful_server` 演示了如何实现 RESTful API 服务器和网页服务器,设计了多个 API 服务端点,使用 mDNS 解析域名,以及将网页部署到 SPI flash 中。
URI 处理程序
------------
diff --git a/examples/protocols/http_server/restful_server/CMakeLists.txt b/examples/protocols/http_server/restful_server/CMakeLists.txt
index 0ea48face2..e619339e99 100644
--- a/examples/protocols/http_server/restful_server/CMakeLists.txt
+++ b/examples/protocols/http_server/restful_server/CMakeLists.txt
@@ -1,6 +1,5 @@
cmake_minimum_required(VERSION 3.16)
-
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
idf_build_set_property(MINIMAL_BUILD ON)
diff --git a/examples/protocols/http_server/restful_server/README.md b/examples/protocols/http_server/restful_server/README.md
index 512a5531b0..1f92712d83 100644
--- a/examples/protocols/http_server/restful_server/README.md
+++ b/examples/protocols/http_server/restful_server/README.md
@@ -7,135 +7,102 @@
## Overview
-This example mainly introduces how to implement a RESTful API server and HTTP server on ESP32, with a frontend browser UI.
+This example demonstrates on the implementation of both the RESTful API server and web server on ESP32, with a modern UI made by Vue.js and Vuetify frameworks. Please note, using the Vue is not a must, we're just using it as an example to show how to build a modern web UI with the latest web technologies in an IoT application.
-This example designs several APIs to fetch resources as follows:
+This example exposes several APIs for the clients to fetch resources as follows:
-| API | Method | Resource Example | Description | Page URL |
-| -------------------------- | ------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------- | -------- |
-| `/api/v1/system/info` | `GET` | { version:"v4.0-dev", cores:2 } | Used for clients to get system information like IDF version, ESP32 cores, etc | `/` |
-| `/api/v1/temp/raw` | `GET` | { raw:22 } | Used for clients to get raw temperature data read from sensor | `/chart` |
-| `/api/v1/light/brightness` | `POST` | { red:160, green:160, blue:160 } | Used for clients to upload control values to ESP32 in order to control LED’s brightness | `/light` |
-
-**Page URL** is the URL of the webpage which will send a request to the API.
+| API | Method | Resource Example | Description |
+| -------------------------- | ------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------- |
+| `/api/v1/system/info` | `GET` | { version:"v6.0-dev", cores:2 } | Return system information like IDF version, CPU cores, etc |
+| `/api/v1/temp/raw` | `GET` | { raw:22 } | Return temperature data (note, this API returns a random number just for illustration) |
+| `/api/v1/light/brightness` | `POST` | { red:160, green:160, blue:160 } | Set the RGB value of the LED light |
### About mDNS
-The IP address of an IoT device may vary from time to time, so it’s impracticable to hard code the IP address in the webpage. In this example, we use the `mDNS` to parse the domain name `esp-home.local`, so that we can always get access to the web server by this URL no matter what the real IP address behind it. See [here](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/protocols/mdns.html) for more information about mDNS.
+The IP address of an IoT device may vary from time to time, so it’s impracticable to hard code the IP address in the webpage. In this example, we use the `mDNS` to parse the domain name `dashboard.local`, so that we can always get access to the web server by this URL no matter what the real IP address behind it. See [here](https://docs.espressif.com/projects/esp-protocols/mdns/docs/latest/en/index.html) for more information about mDNS.
**Notes: mDNS is installed by default on most operating systems or is available as separate package.**
-### About deploy mode
-
-In development mode, it would be awful to flash the whole webpages every time we update the html, js or css files. So it is highly recommended to deploy the webpage to host PC via `semihost` technology. Whenever the browser fetch the webpage, ESP32 can forward the required files located on host PC. By this mean, it will save a lot of time when designing new pages.
-
-After developing, the pages should be deployed to one of the following destinations:
-
-* SPI Flash - which is recommended when the website after built is small (e.g. less than 2MB).
-* SD Card - which would be an option when the website after built is very large that the SPI Flash have not enough space to hold (e.g. larger than 2MB).
-
### About frontend framework
-Many famous frontend frameworks (e.g. Vue, React, Angular) can be used in this example. Here we just take [Vue](https://vuejs.org/) as example and adopt the [vuetify](https://vuetifyjs.com/) as the UI library.
+Many famous frontend frameworks (e.g. Vue, React, Svelte) can be used in this example. Here we just take [Vue](https://vuejs.org/) as example and adopt the [vuetify](https://vuetifyjs.com/) as the UI component library.
-## How to use example
+### About developing frontend and backend independently
+
+In this example, the webpage files (html, js, css, images, etc) are stored in the filesystem on the ESP chip (we use the littlefs as an example). You can, however, develop the frontend without flashing the filesystem to the ESP every time:
+
+1. First, disable the `EXAMPLE_DEPLOY_WEB_PAGES` from the menuconfig, implement the endpoints in the backend (the application running on the ESP) and flash it to the device.
+2. Start developing the frontend on the PC, using Vite dev mode: `pnpm dev`. In dev mode, you can edit the source code of the frontend and see the changes in the web browser immediately. The frontend will be served from your PC, while the Vite proxy will automatically forward the HTTP requests to the `/api` endpoints to the ESP chip.
+3. Once the frontend development and debugging is done, build the web pages by running `pnpm build`, which will generate the static files in the `dist` directory.
+4. Finally, enable the `EXAMPLE_DEPLOY_WEB_PAGES` option in the menuconfig, and flash the webpages with the backend firmware together to the ESP chip again.
+
+This way, you can develop the frontend and backend independently, which is very convenient for web developers.
+
+## How to use the example
### Hardware Required
-To run this example, you need an ESP32 dev board (e.g. ESP32-WROVER Kit, ESP32-Ethernet-Kit) or ESP32 core board (e.g. ESP32-DevKitC). An extra JTAG adapter might also needed if you choose to deploy the website by semihosting. For more information about supported JTAG adapter, please refer to [select JTAG adapter](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html#jtag-debugging-selecting-jtag-adapter). Or if you choose to deploy the website to SD card, an extra SD slot board is needed.
-
-#### Pin Assignment:
-
-Only if you deploy the website to SD card, then the following pin connection is used in this example.
-
-| ESP32 | SD Card |
-| ------ | ------- |
-| GPIO2 | D0 |
-| GPIO4 | D1 |
-| GPIO12 | D2 |
-| GPIO13 | D3 |
-| GPIO14 | CLK |
-| GPIO15 | CMD |
-
+To run this example, you need an ESP32 dev board (e.g. ESP32-WROVER Kit, ESP32-Ethernet-Kit) with Wi-Fi or Ethernet connection.
### Configure the project
Open the project configuration menu (`idf.py menuconfig`).
-In the `Example Connection Configuration` menu:
-
-* Choose the network interface in `Connect using` option based on your board. Currently we support both Wi-Fi and Ethernet.
-* If you select the Wi-Fi interface, you also have to set:
- * Wi-Fi SSID and Wi-Fi password that your esp32 will connect to.
-* If you select the Ethernet interface, you also have to set:
- * PHY model in `Ethernet PHY` option, e.g. IP101.
- * PHY address in `PHY Address` option, which should be determined by your board schematic.
- * EMAC Clock mode, GPIO used by SMI.
-
In the `Example Configuration` menu:
* Set the domain name in `mDNS Host Name` option.
-* Choose the deploy mode in `Website deploy mode`, currently we support deploy website to host PC, SD card and SPI Nor flash.
- * If we choose to `Deploy website to host (JTAG is needed)`, then we also need to specify the full path of the website in `Host path to mount (e.g. absolute path to web dist directory)`.
* Set the mount point of the website in `Website mount point in VFS` option, the default value is `/www`.
+* Enable the `Deploy web pages to device's filesystem` option to deploy the web pages to the device's filesystem. This will flash the files from `front/web-demo/dist` to the device's filesystem.
-### Build and Flash
+### Build the web project
After the webpage design work has been finished, you should compile them by running following commands:
```bash
cd path_to_this_example/front/web-demo
-npm install
-npm run build
+pnpm install
+pnpm build
```
-> **_NOTE:_** This example needs `nodejs` version `v10.19.0`
After a while, you will see a `dist` directory which contains all the website files (e.g. html, js, css, images).
-Run `idf.py -p PORT flash monitor` to build and flash the project..
+Refer to [front/web-demo/README.md](front/web-demo/README.md) for more information about the front-end development.
+
+### Build and Flash to ESP32 device
+
+Then, you can Run `idf.py -p PORT flash monitor` to build and flash the project (including the webpage bundle) to ESP32;
(To exit the serial monitor, type ``Ctrl-]``.)
See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html) for full steps to configure and use ESP-IDF to build projects.
-### Extra steps to do for deploying website by semihost
-
-We need to run the latest version of OpenOCD which should support semihost feature when we test this deploy mode:
-
-```bash
-openocd-esp32/bin/openocd -s openocd-esp32/share/openocd/scripts -f board/esp32-wrover-kit-3.3v.cfg
-```
-
## Example Output
-### Render webpage in browser
+### Check the webpage in browser
-In your browser, enter the URL where the website located (e.g. `http://esp-home.local`). You can also enter the IP address that ESP32 obtained if your operating system currently don't have support for mDNS service.
+In your browser, enter the URL where the website located (e.g. `http://dashboard.local`). You can also enter the IP address that ESP32 obtained if your operating system currently don't have support for mDNS service.
-Besides that, this example also enables the NetBIOS feature with the domain name `esp-home`. If your OS supports NetBIOS and has enabled it (e.g. Windows has native support for NetBIOS), then the URL `http://esp-home` should also work.
-
-
+Besides that, this example also enables the NetBIOS feature with the domain name `dashboard`. If your OS supports NetBIOS and has enabled it (e.g. Windows has native support for NetBIOS), then the URL `http://dashboard` should also work.
### ESP monitor output
-In the *Light* page, after we set up the light color and click on the check button, the browser will send a post request to ESP32, and in the console, we just print the color value.
+In the *Light* page, after we set up the light color and click on the check button, the browser will send a post request to ESP32, and the RGB value will be printed in the ESP32's console.
```bash
-I (6115) example_connect: Connected to Ethernet
-I (6115) example_connect: IPv4 address: 192.168.2.151
-I (6325) esp-home: Partition size: total: 1920401, used: 1587575
-I (6325) esp-rest: Starting HTTP Server
-I (128305) esp-rest: File sending complete
-I (128565) esp-rest: File sending complete
-I (128855) esp-rest: File sending complete
-I (129525) esp-rest: File sending complete
-I (129855) esp-rest: File sending complete
-I (137485) esp-rest: Light control: red = 50, green = 85, blue = 28
+I (422) main_task: Calling app_main()
+I (422) mdns_mem: mDNS task will be created from internal RAM
+I (422) example_connect: Start example_connect.
+I (612) example_connect: Connecting to TP-LINK_CB59...
+I (622) example_connect: Waiting for IP(s)
+I (4792) esp_netif_handlers: example_netif_sta ip: 192.168.0.112, mask: 255.255.255.0, gw: 192.168.0.1
+I (4792) example_connect: Got IPv4 event: Interface "example_netif_sta" address: 192.168.0.112
+I (4792) example_common: Connected to example_netif_sta
+I (4802) example_common: - IPv4 address: 192.168.0.112,
+I (4832) example: Partition size: total: 2097152, used: 770048
+I (4832) esp-rest: Starting HTTP Server
+I (4832) main_task: Returned from app_main()
+I (49052) esp-rest: File sending complete
+I (67352) esp-rest: Light control: red = 160, green = 160, blue = 48
```
-## Troubleshooting
-
-1. Error occurred when building example: `...front/web-demo/dist doesn't exit. Please run 'npm run build' in ...front/web-demo`.
- * When you choose to deploy website to SPI flash, make sure the `dist` directory has been generated before you building this example.
-
(For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you as soon as possible.)
diff --git a/examples/protocols/http_server/restful_server/front/web-demo/.browserslistrc b/examples/protocols/http_server/restful_server/front/web-demo/.browserslistrc
index 9dee646463..dc3bc09a24 100644
--- a/examples/protocols/http_server/restful_server/front/web-demo/.browserslistrc
+++ b/examples/protocols/http_server/restful_server/front/web-demo/.browserslistrc
@@ -1,3 +1,4 @@
> 1%
last 2 versions
-not ie <= 8
+not dead
+not ie 11
diff --git a/examples/protocols/http_server/restful_server/front/web-demo/.eslintrc-auto-import.json b/examples/protocols/http_server/restful_server/front/web-demo/.eslintrc-auto-import.json
new file mode 100644
index 0000000000..7ea7de726a
--- /dev/null
+++ b/examples/protocols/http_server/restful_server/front/web-demo/.eslintrc-auto-import.json
@@ -0,0 +1,82 @@
+{
+ "globals": {
+ "Component": true,
+ "ComponentPublicInstance": true,
+ "ComputedRef": true,
+ "DirectiveBinding": true,
+ "EffectScope": true,
+ "ExtractDefaultPropTypes": true,
+ "ExtractPropTypes": true,
+ "ExtractPublicPropTypes": true,
+ "InjectionKey": true,
+ "MaybeRef": true,
+ "MaybeRefOrGetter": true,
+ "PropType": true,
+ "Ref": true,
+ "Slot": true,
+ "Slots": true,
+ "VNode": true,
+ "WritableComputedRef": true,
+ "computed": true,
+ "createApp": true,
+ "customRef": true,
+ "defineAsyncComponent": true,
+ "defineComponent": true,
+ "defineStore": true,
+ "effectScope": true,
+ "getCurrentInstance": true,
+ "getCurrentScope": true,
+ "h": true,
+ "inject": true,
+ "isProxy": true,
+ "isReactive": true,
+ "isReadonly": true,
+ "isRef": true,
+ "markRaw": true,
+ "nextTick": true,
+ "onActivated": true,
+ "onBeforeMount": true,
+ "onBeforeRouteLeave": true,
+ "onBeforeRouteUpdate": true,
+ "onBeforeUnmount": true,
+ "onBeforeUpdate": true,
+ "onDeactivated": true,
+ "onErrorCaptured": true,
+ "onMounted": true,
+ "onRenderTracked": true,
+ "onRenderTriggered": true,
+ "onScopeDispose": true,
+ "onServerPrefetch": true,
+ "onUnmounted": true,
+ "onUpdated": true,
+ "onWatcherCleanup": true,
+ "provide": true,
+ "reactive": true,
+ "readonly": true,
+ "ref": true,
+ "resolveComponent": true,
+ "shallowReactive": true,
+ "shallowReadonly": true,
+ "shallowRef": true,
+ "storeToRefs": true,
+ "toRaw": true,
+ "toRef": true,
+ "toRefs": true,
+ "toValue": true,
+ "triggerRef": true,
+ "unref": true,
+ "useAttrs": true,
+ "useCssModule": true,
+ "useCssVars": true,
+ "useId": true,
+ "useModel": true,
+ "useRoute": true,
+ "useRouter": true,
+ "useSlots": true,
+ "useTemplateRef": true,
+ "watch": true,
+ "watchEffect": true,
+ "watchPostEffect": true,
+ "watchSyncEffect": true
+ }
+}
diff --git a/examples/protocols/http_server/restful_server/front/web-demo/.eslintrc.js b/examples/protocols/http_server/restful_server/front/web-demo/.eslintrc.js
deleted file mode 100644
index 98d043169d..0000000000
--- a/examples/protocols/http_server/restful_server/front/web-demo/.eslintrc.js
+++ /dev/null
@@ -1,17 +0,0 @@
-module.exports = {
- root: true,
- env: {
- node: true
- },
- 'extends': [
- 'plugin:vue/essential',
- '@vue/standard'
- ],
- rules: {
- 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
- },
- parserOptions: {
- parser: 'babel-eslint'
- }
-}
diff --git a/examples/protocols/http_server/restful_server/front/web-demo/.gitignore b/examples/protocols/http_server/restful_server/front/web-demo/.gitignore
index d0d94890c3..46c09f8138 100644
--- a/examples/protocols/http_server/restful_server/front/web-demo/.gitignore
+++ b/examples/protocols/http_server/restful_server/front/web-demo/.gitignore
@@ -10,6 +10,7 @@ node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+pnpm-debug.log*
# Editor directories and files
.idea
@@ -20,7 +21,5 @@ yarn-error.log*
*.sln
*.sw?
-# APIs used in this example is simple and stable enough.
-# There shouldn't be risk of compatibility unless the major version of some library changed.
-# To compress the package size, just exclude the package-lock.json file.
-package-lock.json
+# Ignore pnpm lock file
+pnpm-lock.yaml
diff --git a/examples/protocols/http_server/restful_server/front/web-demo/README.md b/examples/protocols/http_server/restful_server/front/web-demo/README.md
new file mode 100644
index 0000000000..637719eca2
--- /dev/null
+++ b/examples/protocols/http_server/restful_server/front/web-demo/README.md
@@ -0,0 +1,44 @@
+# Dashboard
+
+This is a modernized version of the dashboard web interface.
+
+## Features
+
+- **Home**: Display ESP system information (IDF version, CPU name)
+- **Chart**: Real-time temperature data visualization with spark-line chart
+- **Light**: RGB light control with color sliders
+
+## Technology Stack
+
+- **Vue 3**: Modern Vue.js framework with Composition API
+- **Vuetify 3**: Material Design component library
+- **Alova**: Modern HTTP client with better performance and features
+- **Pinia**: State management
+- **Vite**: Fast build tool and development server
+
+## Performance Optimizations
+
+- **Tree-shaking for icons**: Only imports specific MDI icons used in the app (this is important for deploying web pages to embedded devices like ESP32)
+- **Modern bundle size**: Smaller bundle with Vite and modern dependencies
+- **Composition API**: Better performance and code organization
+
+## API Endpoints
+
+The application expects the following endpoints from ESP32 device:
+
+- `GET /api/v1/system/info` - System information
+- `GET /api/v1/temp/raw` - Temperature sensor data
+- `POST /api/v1/light/brightness` - Set RGB LED colors
+
+## Development
+
+```bash
+# Install dependencies
+pnpm install
+
+# Start development server
+pnpm dev
+
+# Build for production
+pnpm build
+```
diff --git a/examples/protocols/http_server/restful_server/front/web-demo/babel.config.js b/examples/protocols/http_server/restful_server/front/web-demo/babel.config.js
deleted file mode 100644
index ba179669a1..0000000000
--- a/examples/protocols/http_server/restful_server/front/web-demo/babel.config.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = {
- presets: [
- '@vue/app'
- ]
-}
diff --git a/examples/protocols/http_server/restful_server/front/web-demo/eslint.config.js b/examples/protocols/http_server/restful_server/front/web-demo/eslint.config.js
new file mode 100644
index 0000000000..bb027414d0
--- /dev/null
+++ b/examples/protocols/http_server/restful_server/front/web-demo/eslint.config.js
@@ -0,0 +1,3 @@
+import vuetify from 'eslint-config-vuetify'
+
+export default vuetify()
diff --git a/examples/protocols/http_server/restful_server/front/web-demo/index.html b/examples/protocols/http_server/restful_server/front/web-demo/index.html
new file mode 100644
index 0000000000..94fa3fe5f4
--- /dev/null
+++ b/examples/protocols/http_server/restful_server/front/web-demo/index.html
@@ -0,0 +1,13 @@
+
+
+