Skip to content

Commit 83e92c1

Browse files
Merge pull request #61 from zenml-io/develop
Release
2 parents ee59187 + a45d690 commit 83e92c1

File tree

180 files changed

+9429
-712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+9429
-712
lines changed

.env.example

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22
VITE_BACKEND_URL=http://localhost:8237
33

44
# The version of the UI to be displayed in the UI
5-
VITE_UI_VERSION=0.0.0
5+
VITE_UI_VERSION=0.0.0
6+
7+
# Optional: override API origin for cross-origin deployments (e.g. https://backend.test.com)
8+
VITE_API_BASE_URL=
9+
10+
# URL of the analytics server
11+
VITE_ANALYTICS_SERVER_URL=

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
pnpm build
3434
env:
3535
VITE_UI_VERSION: ${{ steps.get_version.outputs.VERSION }}
36+
VITE_ANALYTICS_SERVER_URL: https://analytics.zenml.io/batch
3637

3738
- name: Create release archive
3839
run: |

AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pnpm generate:types # Generate OpenAPI types: pnpm generate:types -- <base-url
1919

2020
### Authentication & Proxy
2121

22-
The Vite dev server proxies `/api` requests to `VITE_BACKEND_URL` (default `http://localhost:8237`). The app uses cookie-based auth with `credentials: "include"`, so the frontend and backend must appear on the same origin.
22+
By default, API requests are relative (`/api/v1/...`). In development, the Vite dev server proxies `/api` requests to `VITE_BACKEND_URL` (default `http://localhost:8237`) so frontend and backend appear on the same origin. For cross-origin deployments, set `VITE_API_BASE_URL` to an absolute backend origin (for example `https://backend.test.com`) and ensure backend CORS/cookie settings allow credentialed requests from the frontend origin.
2323

2424
## Architecture Overview
2525

@@ -174,10 +174,12 @@ See [DESIGN.md](./DESIGN.md) for design-related guidelines.
174174
- Use PascalCase for React component and context files (e.g. `Dashboard.tsx`, `DashboardContainer.tsx`, `AuthContext.tsx`)
175175
- Use kebab-case for hooks, utilities, API calls, and domain-layer files (e.g. `use-pipeline.tsx`, `api-client.ts`, `fetch-device.ts`)
176176
- Exception: route files should follow TanStack Router naming requirements when those differ (e.g. pathless/layout route conventions)
177+
- define optional props/params like this: `selectedId?: string` instead of `selectedId: string | null` or `selectedId: string | undefined`
177178

178179
### Networking
179180

180-
- `apiClient` prefixes all requests with `/api/v1` and sends `credentials: "include"`
181+
- `apiClient` sends `credentials: "include"` and targets `/api/v1/...` by default
182+
- Optional override: set `VITE_API_BASE_URL` to send requests to `<origin>/api/v1/...`
181183
- Default headers: `Content-Type: application/json`, `Source-Context: dashboard-v2`
182184
- Login is a special case that overrides content type to `application/x-www-form-urlencoded`
183185
- Vite proxies `/api` to `VITE_BACKEND_URL` in development

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ cp .env.example .env
4848
pnpm dev
4949
```
5050

51-
The Vite dev server proxies `/api` requests to `VITE_BACKEND_URL`, so the frontend and backend appear on the same origin. This is required for cookie-based auth (`credentials: "include"`).
51+
By default, the app sends requests to relative paths (for example `/api/v1/current-user`). In local development, the Vite dev server proxies `/api` requests to `VITE_BACKEND_URL`, so the frontend and backend appear on the same origin.
5252

5353
### Environment Variables
5454

55-
| Variable | Default | Description |
56-
| ------------------ | ----------------------- | ------------------------------------------- |
57-
| `VITE_BACKEND_URL` | `http://localhost:8237` | ZenML server URL used by the Vite dev proxy |
55+
| Variable | Default | Description |
56+
| ------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
57+
| `VITE_BACKEND_URL` | `http://localhost:8237` | ZenML server URL used by the Vite dev proxy |
58+
| `VITE_API_BASE_URL` | _(unset)_ | Optional API origin override (build-time). If set (for example `https://backend.test.com`), requests are sent to `<origin>/api/v1/...` directly. |
5859

5960
### Scripts
6061

@@ -134,7 +135,8 @@ Both are excluded from ESLint.
134135

135136
### Authentication
136137

137-
- `apiClient` sends all requests to `/api/v1` with `credentials: "include"` (cookie auth)
138+
- `apiClient` sends all requests with `credentials: "include"` (cookie auth)
139+
- By default requests are relative (`/api/v1/...`); optionally set `VITE_API_BASE_URL` to target a full backend origin
138140
- Vite proxies `/api` to `VITE_BACKEND_URL` in development
139141
- Login uses `application/x-www-form-urlencoded` content type (exception to the default JSON headers)
140142

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"utils": "@/shared/utils",
1818
"ui": "@/shared/ui",
1919
"lib": "@/shared/utils",
20-
"hooks": "@/shared/hooks"
20+
"hooks": "@/shared/business-logic"
2121
},
2222
"menuColor": "default",
2323
"menuAccent": "subtle",

eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ export default defineConfig([
1919
ecmaVersion: 2020,
2020
globals: globals.browser,
2121
},
22+
rules: {
23+
"eslint-comments/no-unused-disable": "off",
24+
},
2225
},
2326
]);

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"format": "prettier --write .",
1010
"generate:types": "node scripts/types.js",
1111
"lint": "eslint .",
12+
"check:types": "tsc --noEmit",
1213
"preview": "vite preview",
1314
"test:unit": "vitest"
1415
},
@@ -17,6 +18,10 @@
1718
"@fontsource-variable/inter": "^5.2.8",
1819
"@fontsource-variable/jetbrains-mono": "^5.2.8",
1920
"@hookform/resolvers": "5.2.2",
21+
"@rjsf/core": "^6.4.1",
22+
"@rjsf/shadcn": "^6.4.1",
23+
"@rjsf/utils": "^6.4.1",
24+
"@rjsf/validator-ajv8": "^6.4.1",
2025
"@tanstack/react-query": "^5.90.21",
2126
"@tanstack/react-router": "^1.166.7",
2227
"@tanstack/react-router-devtools": "^1.166.7",
@@ -25,12 +30,17 @@
2530
"class-variance-authority": "^0.7.1",
2631
"clsx": "^2.1.1",
2732
"date-fns": "^4.1.0",
33+
"dompurify": "^3.3.3",
2834
"es-toolkit": "^1.45.1",
35+
"js-cookie": "^3.0.5",
2936
"next-themes": "^0.4.6",
3037
"openapi-fetch": "^0.17.0",
3138
"react": "^19.2.4",
3239
"react-dom": "^19.2.4",
40+
"react-error-boundary": "^6.1.1",
3341
"react-hook-form": "^7.71.2",
42+
"react-resizable-panels": "^4.7.3",
43+
"shiki": "^4.0.2",
3444
"sonner": "^2.0.7",
3545
"tailwind-merge": "^3.5.0",
3646
"tw-animate-css": "^1.4.0",
@@ -40,6 +50,7 @@
4050
"@eslint/js": "^9.39.4",
4151
"@tailwindcss/vite": "^4.2.1",
4252
"@tanstack/router-plugin": "^1.166.7",
53+
"@types/js-cookie": "^3.0.6",
4354
"@types/node": "^24.12.0",
4455
"@types/react": "^19.2.14",
4556
"@types/react-dom": "^19.2.3",

0 commit comments

Comments
 (0)