The framework: Next.js.
Next.js supports SPA, SSG and SSR. With this feature, the dashboard ui can be deployed in
- Standalone machine serving only dashboard UI with a backend. (e.g. Dashboard for cloud product)
- Meta service node. (e.g. Static HTML files integrated in meta service without any other dependencies like node.js)
dashboard/
--.next/ (generated by nextjs)
--node_modules/ (development dependencies)
--out/ (generated static files)
--components/ (React Component)
--lib/ (useful functions and classes)
--pages/ (web pages)
--public/ (static resources)
--styles/ (static css files)
--test/ (test cases)
TODO: Find a suitable testing framework
Start the RisingWave database, remove drop tables from tpch_snapshot.slt
./risedev d
sqllogictest -p 4566 -d dev './e2e_test/streaming/tpch_snapshot.slt'
Install Dependencies.
npm i
The website will be served at port 3000.
npm run dev
You should also run:
node mock-server.js
To start a mock API server when developing. You can use fetch.sh
to update the mock APIs.
To replace the built static files in RisingWave with your newest code, run the following scripts in the root directory.
./risedev export-dashboard-v2
Build static files for standalone deployment without node.js. The built files are generated at ./out
.
Check more details at Static HTML Export.
npm run build-static
The built files are generated at ./.next
.
npm run build
npm run start