This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
GPUStack UI — Dashboard/management UI for GPUStack, a GPU model serving and management platform. Features include model deployment, playground (chat/embedding/rerank/image/speech), resource management, cluster management, benchmark, and access control.
@umijs/max) — enterprise React framework with built-in routing, state, request, access, locale, and layout pluginsantd) + Pro Components (@ant-design/pro-components)@gpustack/core-ui — shared internal UI componentssrc/atoms/)# Install dependencies
pnpm install
# Start dev server (http://localhost:9000)
npm run dev # or: pnpm dev
# Production build
npm run build
# Preview build output
npm run preview
# Format code
npm run format
# Check locale files
npm run check:locales
Environment variables:
PROXY_HOST — API proxy target for dev serverENABLE_ENTERPRISE — enable enterprise featuresENABLE_PLAYGROUND — enable playground section (default: true)APP_TITLE — custom app titleconfig/ # Umi build configuration
config.ts # Main config (proxy, build, plugins, routes)
routes.ts # Route definitions (main entry for navigation structure)
routes.extensions.ts # Build-time route extensions
proxy.ts # Dev proxy configuration
plugins.ts # Webpack plugins (compression, monaco)
keep-alive.ts # Route keep-alive configuration
mfsu.extensions.ts # MFSU exclusions
src/
app.tsx # App entry: getInitialState, request config, plugin initialization
access.ts # Role-based access control (canSeeAdmin, canSeeOrgAdmin, etc.)
request-config.tsx # Axios interceptors, error handling, 401 redirect
global.tsx # Global setup (dayjs plugins)
global.less # Global styles
atoms/ # Jotai atomic state (user, settings, models, clusters, etc.)
config/ # Runtime config (settings, theme, hotkeys, breakpoints)
layouts/ # Custom layout system (sidebar, menu, logo, error boundary)
pages/ # Page components (feature-based subdirectories)
_components/ # Shared page-level components
dashboard/ # Dashboard
playground/ # Chat, embedding, rerank, images, speech
llmodels/ # Model catalog, user models, deployments
model-routes/ # Model routing
usage/ # Usage statistics
maas-provider/ # Model providers
benchmark/ # Benchmark tests
gpu-service/ # GPU service (instances, templates, storage, public keys)
resources/ # Workers, GPUs, backends, modelfiles
cluster-management/ # Clusters, credentials
users/ # User management
api-keys/ # API key management
login/ # Login page
profile/ # User profile
components/ # Global shared components
plugins/ # Plugin system (manager, enterprise-ready, locale merger)
services/ # API service layer (minimal, most API calls are inline)
locales/ # i18n locale files
assets/ # Images, logos, provider logos
request.extensions.ts # Build-time request interceptor hooks (empty by default)
access.extensions.ts # Build-time access extension hooks (empty by default)
history.type: 'hash')config/routes.ts with icon, access control, and keep-alive supportconfig/routes.extensions.ts for build-time plugin injectionaccess plugin with predicate-based role checkscanSeeAdmin, canSeeOrgAdmin, canManageCurrentOrg, canSeeUser, canDelete, canLogin/login/resources/workerssrc/atoms/ for global state (user info, settings, pagination, route cache, etc.)initialState for currentUser and fetchUserInfosetAtomStorage / clearAtomStorage utilities/v2 (GPUSTACK_API_BASE_URL)/v1/auth, /v1, /version, /proxy, /update) bypass the API base URLsrc/request-config.tsxsrc/request.extensions.ts (empty by default, populated by build-time tooling)GPUStackPluginManager in src/plugins/manager.tsonAppInit and onAppReady lifecycle hookssrc/plugins/enterprise-ready.ts*.extensions.ts filessrc/layouts/ with sidebar, menu, logo, right panelen-US defaultsrc/locales/.extensions.ts files (routes.extensions.ts, request.extensions.ts, access.extensions.ts, etc.) are generated at build time by external tooling — do not edit them directly@monaco-editor/react and monaco-editor-webpack-pluginreact-markdown + GFM + KaTeX math support#/ prefix in the browser