Skip to content

Commit 29b15ef

Browse files
committed
Add docs for the new WebConsole project
Signed-off-by: George <bulakh.96@gmail.com>
1 parent d6d3ef3 commit 29b15ef

4 files changed

Lines changed: 76 additions & 29 deletions

File tree

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@ Our known dependencies are:
2525
- a Java Virtual Machine (at least Java 19)
2626
- maven
2727
- graphviz
28-
- Cloud and UI
28+
- Cloud
2929
- Python 3
30-
- typescript
3130
- Redpanda or Kafka
3231
- Earthly (https://earthly.dev/get-earthly)
32+
- Web Console
33+
- Bun
3334

3435
Additional dependencies are automatically installed by the Rust,
35-
maven, Python, and typescript build tools.
36+
maven, Python, and TypeScript build tools.
3637

3738
## Contribution Flow
3839

docs/contributors/dev-flow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ You should now be able to access the Web Console at http://localhost:8080/, conn
3232
You can also open Web Console in dev mode to be able to see your changes to it live:
3333

3434
```bash
35-
cd web-console && yarn install && yarn dev
35+
cd web-console-sveltekit && bun install && bun run dev
3636
```
3737

3838
The Web Console in dev mode is available at http://localhost:3000/

web-console-sveltekit/README.md

Lines changed: 65 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,84 @@
1-
# create-svelte
1+
# Feldera Web Console
22

3-
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
3+
This is the GUI for managing the Feldera deployment.
44

5-
## Creating a project
6-
7-
If you're seeing this, you've probably already done this step. Congrats!
5+
## Setup
86

97
```bash
10-
# create a new project in the current directory
11-
npm create svelte@latest
8+
# Install Node on Ubuntu (optional)
9+
sudo apt-get update
10+
sudo apt-get install -y ca-certificates curl gnupg
11+
sudo mkdir -p /etc/apt/keyrings
12+
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
13+
NODE_MAJOR=20
14+
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
15+
sudo apt-get update
16+
sudo apt-get install nodejs -y
17+
# If you don't run Ubuntu: [other binary distributions for node.js](https://github.com/nodesource/distributions)
18+
19+
# Install Bun
20+
sudo apt-get update
21+
sudo apt-get install -y ca-certificates curl gnupg unzip
22+
sudo curl -fsSL https://bun.sh/install | bash
1223

13-
# create a new project in my-app
14-
npm create svelte@latest my-app
24+
# Install OpenAPI typings generator
25+
sudo bun install --global @hey-api/openapi-ts
26+
27+
# Clone the repo for the UI
28+
git clone https://github.com/feldera/feldera.git
29+
cd dbsp/web-console-sveltekit
1530
```
1631

17-
## Developing
32+
## Development
1833

19-
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
34+
Install dependencies (needs to be done whenever package.json depencies change):
2035

2136
```bash
22-
npm run dev
37+
bun install
38+
```
2339

24-
# or start the server and open the app in a new browser tab
25-
npm run dev -- --open
40+
Start the development server:
41+
42+
```bash
43+
bun run dev
2644
```
2745

28-
## Building
46+
Build & export static website:
47+
48+
```bash
49+
bun build
50+
```
51+
52+
Format the code & linting:
53+
54+
```bash
55+
bun run format
56+
bun run lint
57+
bun run check
58+
```
59+
60+
## OpenAPI bindings
61+
62+
The bindings for OpenAPI (under $lib/services/manager) are generated using
63+
[openapi typescript codegen](https://www.npmjs.com/package/@hey-api/openapi-ts).
2964

30-
To create a production version of your app:
65+
If you change the API, execute the following steps to update the bindings:
3166

3267
```bash
33-
npm run build
68+
bun run build-openapi # If you need to generate a new openapi.json
69+
bun run generate-openapi
3470
```
3571

36-
You can preview the production build with `npm run preview`.
72+
## File Organization
3773

38-
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
74+
- `src/assets/`: Static assets referenced in UI components, but not served as-is
75+
- `src/hooks.server.ts`: Point of injection of HTTP request and page load middleware
76+
- `src/lib/`: Imported modules
77+
- `src/lib/components/`: Reusable Svelte components
78+
- `src/lib/compositions/`: Stateful functions that app state management
79+
- `src/lib/functions/`: Pure functions, or functions that perform side effects through dependency injection
80+
- `src/lib/functions/common`: Utility functions that are not specific to this project
81+
- `src/lib/services/`: Functions that describe side effects (persistent storage, networking etc.)
82+
- `src/lib/types/`: Types used throughout the app
83+
- `src/routes/`: Web app pages used in file-based routing
84+
- `static/`: Static assets served as-is

web-console/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# DBSP Web UI
1+
# Feldera Web Console
22

3-
This is the web UI for the DBSP project.
3+
This is the GUI for managing the Feldera deployment.
44

55
## Setup
66

77
```bash
8-
# Install nodejs
8+
# Install nodejs on Ubuntu
9+
910
sudo apt-get update
1011
sudo apt-get install -y ca-certificates curl gnupg
1112
sudo mkdir -p /etc/apt/keyrings
@@ -14,6 +15,7 @@ NODE_MAJOR=20
1415
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
1516
sudo apt-get update
1617
sudo apt-get install nodejs -y
18+
# If you don't run Ubuntu: [other binary distributions for node.js](https://github.com/nodesource/distributions)
1719

1820
# Install yarn/openapi generator
1921
sudo npm install --global yarn
@@ -24,8 +26,6 @@ git clone https://github.com/feldera/feldera.git
2426
cd dbsp/web-console
2527
```
2628

27-
If you don't run ubuntu: [other binary distributions for node.js](https://github.com/nodesource/distributions)
28-
2929
## Development
3030

3131
Install dependencies (needs to be done whenever package.json depencies change):
@@ -87,4 +87,4 @@ regenerating the API bindings.
8787
- `lib/functions/common`: Utility functions that are not specific to this project
8888
- `lib/services/`: Functions that describe side effects (persistent storage, networking etc.)
8989
- `lib/types/`: Types used throughout the app, OpenAPI generated types.
90-
- `pages/`: Webapp pages used by file-based routing
90+
- `pages/`: Webapp pages used in file-based routing

0 commit comments

Comments
 (0)