build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / ui / web / README.md
... / ...
CommitLineData
1# Web UI
2
3The Web UI code and configuration is in the repository directory [ui/web](./../../ui/web/). Commands execution is relative to that directory.
4
5## Project setup
6
7```shell
8corepack enable
9corepack prepare pnpm@latest --activate
10pnpm install
11```
12
13The simulator UI server must be enabled, use WebSocket and disable authentication. The simulator main configuration file should have a `uiServer` section like this:
14
15```json
16 "uiServer": {
17 "enabled": true,
18 "type": "ws",
19 "authentication": {
20 "enabled": false,
21 "type": "basic-auth",
22 "username": "admin",
23 "password": "admin"
24 }
25 },
26```
27
28See [here](./../../README.md#charging-stations-simulator-configuration) for more details.
29
30### Run
31
32#### Compiles and run for production
33
34```shell
35pnpm start
36```
37
38#### Compiles and run for development
39
40```shell
41pnpm serve
42```
43
44#### Try it out
45
46For both options above you can then follow the link displayed in the terminal at the end of compilation. The Web UI looks like the following
47
48![webui](./assets/webui.png)
49
501. With the top 2 buttons you can now stop and afterwards start the simulator and inspect the server console for the number of charging stations, e.g. with the default configuration: `Charging stations simulator ... started with 10 charging station(s)`
512. Each charging station is a row in the table below, try "Stop Charging Station" and refresh with the large blue button and see the status Started turns from Yes into No.
52
53### Compiles and minifies for production
54
55```shell
56pnpm build
57```
58
59### Lints files
60
61```shell
62pnpm lint
63```