- TypeScript 88.4%
- Shell 7.4%
- Python 2.1%
- CSS 1.1%
- JavaScript 0.6%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| .github/ISSUE_TEMPLATE | ||
| apps/panel-ui | ||
| changelog | ||
| deploy | ||
| docs | ||
| release | ||
| scripts | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .npmrc | ||
| .secretlintignore | ||
| .secretlintrc.json | ||
| ACCEPTANCE.md | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| eslint.config.js | ||
| LICENSE | ||
| NOTICE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| prettier.config.js | ||
| README.md | ||
| RELEASE.md | ||
| SECURITY.md | ||
| SUPPORT.md | ||
| tsconfig.base.json | ||
| VERSION | ||
Xtrape Panel CE
React Web operator UI for Xtrape Platform CE.
Xtrape Panel CE 是访问 Xtrape Platform CE open API 的 Web 运维前端;生产通过同源 canonical
/platform-ce反向代理访问内部 platform-ce(/server-ce仅作 deprecated 兼容路径保留)。
Repository role
| Repository | Role |
|---|---|
xtrape-platform-ce |
Headless control plane — open API, business data, auth/authz |
xtrape-panel-ce |
React Web operator UI |
xtrape-demo |
Reference Worker / demo Service (not part of the public set) |
xtrape-telegram |
Telegram interaction adapter |
browser -> panel-ui (React SPA + Nginx /platform-ce proxy) -> xtrape-platform-ce open API
Panel CE does not include a BFF, business backend, or Panel-owned database. Operator identity and durable state live in platform-ce.
Layout
apps/panel-ui # React SPA (CE Runtime and future pages)
Quick start
pnpm install
cp apps/panel-ui/.env.example apps/panel-ui/.env
# for local dev only, set VITE_XTRAPE_SERVER_URL if platform-ce is not proxied at /platform-ce (or the deprecated /server-ce leg)
pnpm dev # http://localhost:5173
For a static container:
docker compose -f deploy/compose/docker-compose.yml up --build
Primary development commands
pnpm install
pnpm typecheck
pnpm build
pnpm test
pnpm contracts:check
Panel capabilities
The UI currently exposes CE Runtime (/ce-runtime):
- Services, instances, messages
- Registration tokens and control clients
- Telegram operator link
New product surfaces should be added as frontend routes backed by platform-ce APIs.
API boundary
apps/panel-ui/src/api/
platformCeAuthClient.ts # Browser-side platform-ce auth/session helper
platformCeClient.ts # Typed calls to platform-ce open API
types.ts
Runtime configuration is loaded from /runtime-config.js. Nginx serves the canonical same-origin /platform-ce path plus the deprecated /server-ce compatibility leg, both proxying to PLATFORM_CE_INTERNAL_URL (canonical name; SERVER_CE_INTERNAL_URL remains a deprecated alias), so platform-ce can remain internal-only; production should set PANEL_PLATFORM_CE_PUBLIC_BASE_URL=/platform-ce (the image's built-in default is still the compat leg — the serverCeBaseUrl runtime-config key name is a frozen wire key). Direct cross-origin VITE_XTRAPE_SERVER_URL is a local/dev fallback and requires platform-ce CORS.
Panel login is per-operator: the browser exchanges an operator principal's username/password at POST /v1/auth/login for a short-lived operator session token (the Panel's JS client keeps it in tab-scoped sessionStorage and sends it as Authorization: Bearer without depending on cookies — though Platform CE may additionally set an httpOnly same-origin session cookie; validated via GET /v1/auth/whoami; the server-side session terminates via POST /v1/auth/logout, expiry, or revocation — closing the tab clears only the tab-local token; first login forces a password change). It must not use shared XTRAPE_ADMIN_USERNAME / XTRAPE_ADMIN_PASSWORD credentials. Control-client tokens are provisioning/automation credentials for non-browser control-plane clients — managed on the Provisioning pages, never pasted into the Panel login. Do not put Telegram bot tokens, server-side secrets, or unrelated internal credentials in VITE_* variables.
See docs/operator-identity.md.
Related repositories
| Repo | Purpose |
|---|---|
| Documentation | Architecture and product documentation |
xtrape-platform-ce |
Headless CE control plane and open API |
xtrape-demo |
Reference Worker / demo Service (not part of the public set) |
xtrape-stack |
Public integrated compose: quickstart, demo/nightly channels, public stack pins |
License
Apache-2.0. "Xtrape" is a trademark of its respective owner; the open-source license does not grant trademark rights.