Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions apps/aevatar-console-web/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
34 changes: 34 additions & 0 deletions apps/aevatar-console-web/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# aevatar-console-web environment example
#
# Usage:
# 1. Copy to apps/aevatar-console-web/.env.local for `pnpm dev`
# 2. If you use `pnpm dev:stack` and want custom ports, also source it first:
# set -a
# source .env.local
# set +a
#
# Umi reads `.env.local` for frontend proxy config.
# Bash scripts do not auto-load `.env.local`; they only see exported shell vars.

# Frontend proxy targets
# Keep these in sync with the backend ports below if you change them.
AEVATAR_API_TARGET=http://127.0.0.1:5080
AEVATAR_CONFIGURATION_API_TARGET=http://127.0.0.1:6688
AEVATAR_STUDIO_API_TARGET=http://127.0.0.1:6690

# NyxID login
# Register a public client in NyxID and keep redirect URI aligned with the frontend port.
NYXID_BASE_URL=https://nyx.chrono-ai.fun
NYXID_CLIENT_ID=
NYXID_REDIRECT_URI=http://127.0.0.1:5173/auth/callback
NYXID_SCOPE="openid profile email"

# Local dev stack ports used by scripts/dev-stack.sh
# FRONTEND_PORT affects the dev server bind port.
# API/CONFIG ports affect backend startup only; update the proxy targets above too.
AEVATAR_CONSOLE_API_PORT=5080
AEVATAR_CONSOLE_CONFIG_PORT=6688
AEVATAR_CONSOLE_STUDIO_PORT=6690
AEVATAR_CONSOLE_FRONTEND_PORT=5173
AEVATAR_CONSOLE_SCOPE_ID=aevatar
AEVATAR_CONSOLE_STUDIO_NYXID_ENABLED=true
14 changes: 14 additions & 0 deletions apps/aevatar-console-web/.env.production.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Aevatar Console production build-time environment
#
# This file is only for the frontend build.
# The current production topology still expects a same-origin reverse proxy for
# /api/* because Umi dev proxy settings are not used after build.

# NyxID login for the browser client
NYXID_BASE_URL=https://nyx.example.com
NYXID_CLIENT_ID=replace-with-public-client-id
NYXID_REDIRECT_URI=https://console.example.com/auth/callback
NYXID_SCOPE="openid profile email"

# Planned but not wired in the current frontend build:
# AEVATAR_CONSOLE_PUBLIC_PATH=/console/
44 changes: 44 additions & 0 deletions apps/aevatar-console-web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
**/node_modules
.env
.env.local
.env.*.local
# roadhog-api-doc ignore
/src/utils/request-temp.js
_roadhog-api-doc

# production
/dist

# misc
.DS_Store
npm-debug.log*
yarn-error.log

/coverage
.idea
yarn.lock
package-lock.json
*bak
.vscode


# visual studio code
.history
*.log
functions/*
.temp/**

# umi
.umi
.umi-production
.umi-test
.turbopack

# screenshot
screenshot
.firebase

build
1 change: 1 addition & 0 deletions apps/aevatar-console-web/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
21 changes: 21 additions & 0 deletions apps/aevatar-console-web/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019-present Alipay.inc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
111 changes: 111 additions & 0 deletions apps/aevatar-console-web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Aevatar Console Web

`aevatar-console-web` is the Ant Design Pro based admin shell for Aevatar.

## Stack

- `React 19`
- `@umijs/max`
- `antd`
- `@ant-design/pro-components`
- `pnpm`

## Setup

Run all frontend commands from `apps/aevatar-console-web`:

```bash
cd apps/aevatar-console-web
cp .env.example .env.local
pnpm install
```

`pnpm dev` reads proxy targets from `.env.local`. If you want `pnpm dev:stack` to use custom ports from the same file, export it into your shell first:

```bash
cd apps/aevatar-console-web
set -a
source .env.local
set +a
```

If you change backend ports for `dev:stack`, also keep `AEVATAR_API_TARGET`, `AEVATAR_CONFIGURATION_API_TARGET`, and `AEVATAR_STUDIO_API_TARGET` aligned with those ports.

`pnpm dev:stack` also injects a default Studio app scope of `aevatar` through `Cli__App__ScopeId`, and keeps Studio NyxID login enabled. Chrono-storage backed connector and role catalogs require both the scope and a valid Studio NyxID session. Override the scope with `AEVATAR_CONSOLE_SCOPE_ID` if you need a different scope, or set `AEVATAR_CONSOLE_STUDIO_NYXID_ENABLED=false` only when you intentionally want to disable protected Studio APIs.

For NyxID login, also set these values in `.env.local`:

```bash
NYXID_BASE_URL=http://127.0.0.1:3001
NYXID_CLIENT_ID=your-public-client-id
NYXID_REDIRECT_URI=http://127.0.0.1:5173/auth/callback
NYXID_SCOPE="openid profile email"
```

`NYXID_REDIRECT_URI` must exactly match the public client registration in NyxID.
If you change `.env.local`, restart `pnpm dev` so Umi reloads the injected env values.

## Available scripts

```bash
cd apps/aevatar-console-web
pnpm dev
pnpm dev:stack
pnpm dev:stack:status
pnpm dev:stack:stop
pnpm build
pnpm test
pnpm tsc
```

## Local stack

`aevatar-console-web` depends on three local backend services during development:

- `Workflow Host API` on `http://127.0.0.1:5080`
- `Configuration API` on `http://127.0.0.1:6688`
- `Studio sidecar` on `http://127.0.0.1:6690`

Use the bundled stack script to start all required services from one place:

```bash
cd apps/aevatar-console-web
pnpm dev:stack
```

The script will:

- start `src/workflow/Aevatar.Workflow.Host.Api`
- start `tools/Aevatar.Tools.Config`
- start `tools/Aevatar.Tools.Cli -- app --api-base <Workflow Host API>` with `Cli__App__ScopeId=aevatar`
- keep Studio NyxID login enabled so remote chrono-storage catalog access can reuse the app session
- start `pnpm dev`
- write logs to `apps/aevatar-console-web/.temp/dev-stack/`

Current proxy split during local development:

- `/api/chat`, `/api/workflows/*`, `/api/actors/*`, `/api/runs/*`, `/api/primitives`, `/api/capabilities` -> `Workflow Host API`
- `/api/app/*`, `/api/auth/*`, `/api/workspace/*`, `/api/editor/*`, `/api/executions/*`, `/api/roles/*`, `/api/connectors/*`, `/api/settings/*` -> `Studio sidecar`
- `/api/configuration/*` -> `Configuration API`

Useful commands:

```bash
cd apps/aevatar-console-web
pnpm dev:stack:status
pnpm dev:stack:restart
pnpm dev:stack:stop
```

## Current scope

- `Overview`
- `Studio`
- `Primitives`
- `Runs`
- `Actors`
- `Workflows`
- `Observability`
- `Settings`

The shell currently combines direct workflow host APIs with the Studio sidecar APIs and keeps the default Ant Design Pro layout and theme.
49 changes: 49 additions & 0 deletions apps/aevatar-console-web/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"ignoreUnknown": true,
"includes": [
"**/*",
"!**/.umi",
"!**/.umi-production",
"!**/.umi-test",
"!**/.umi-test-production",
"!**/src/services",
"!**/mock",
"!**/dist",
"!**/server",
"!**/public",
"!**/coverage",
"!**/node_modules",
"!biome.json"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off"
},
"correctness": {
"useUniqueElementIds": "off",
"useExhaustiveDependencies": "off"
},
"a11y": {
"noStaticElementInteractions": "off",
"useValidAnchor": "off",
"useKeyWithClickEvents": "off"
}
}
},
"javascript": {
"jsxRuntime": "reactClassic",
"formatter": {
"quoteStyle": "single"
}
}
}
Loading
Loading