This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
JeecgBoot Vue3 frontend — an enterprise low-code platform built with Vue 3 + Vite 6 + Ant Design Vue 4 + TypeScript. Uses pnpm as package manager. Node 18 or 20+ required (engines: "^18 || >=20").
pnpm dev # Start dev server (port 3100, mock enabled)
pnpm build # Production build (output: dist/)
pnpm build:docker # Docker production build
pnpm build:dockercloud # Docker cloud production build
pnpm build:report # Build with bundle visualizer
pnpm preview # Build + preview
# Linting (no unified "lint" script — run individually)
npx eslint src/path/to/file.vue # Lint specific file
npx stylelint "src/**/*.{vue,less,css}" # Stylelint
pnpm batch:prettier # Format all src files
# Testing (Jest configured but not integrated into npm scripts)
# Tests exist in tests/ directory but no test script in package.json
# Run manually if needed: npx jest
pnpm clean:cache # Clear Vite cache
pnpm gen:icon # Regenerate icon data
pnpm reinstall # Clean reinstall all dependencies
/@/ and @/ → src//#/ and #/ → types/~icons/{collection}/{name} → unplugin-icons (compile-time icon imports)The /@/ prefix (with leading slash) is the project's conventional alias — prefer it for consistency.
createApp → createRouter → setupStore (pinia) → setupProps → i18n → initAppConfigStore → registerPackages (@jeecg/online) → registerGlobComp (core Ant Design components) → SSO login → registerSuper (dynamic module discovery) → setupRouter → guards → directives → error handler → registerThirdComp (vxe-table, emoji, dayjs) → setupElectron → router.isReady() → mount
getBackMenuAndPerms()src/store/modules/permission.tsimport.meta.glob('./**/register.ts') in src/views/super/registerSuper.tsKey stores in src/store/modules/:
user.ts (app-user) — auth token, user info, roles, tenant, dict itemspermission.ts (app-permission) — dynamic routes, permission codes, backend menusapp.ts (app) — project config, theme, layout settingslocale.ts (app-locale) — i18n localemultipleTab.ts (app-multiple-tab) — tab stateAuth persisted in localStorage via src/utils/auth/index.ts.
src/utils/http/axios/ — configured instance exported as defHttpsignMd5UtilsVITE_GLOB_TENANT_MODE is enabled{ code, result, message, success } where code === 200 is successunplugin-vue-components with AntDesignVueResolver auto-imports all Ant Design Vue components (no manual import needed in templates)registerGlobComp.ts registers Icon, AIcon, JUploadButton, Button, TinyMCE EditorregisterThirdComp.ts registers vxe-table (full import), custom vxe cell components, emoji picker, dayjs pluginssrc/utils/factory/createAsyncComponent.tsxThree icon approaches:
<Icon icon="mdi:home" /> via @iconify/iconify CDN lazy-load<Icon icon="icon-name|svg" /> via vite-plugin-svg-iconsimport IconName from '~icons/collection/name' for compile-time tree-shaken iconsbuild/generate/generateModifyVars.tstheme.darkAlgorithm--j-global-primary-color set dynamically from theme colorjeecg (defined in src/settings/designSetting.ts)@jeecg/online and @jeecg/aiflow are external monorepo packages excluded from Vite optimizeDeps (CJS compatibility issues)registerPackages(app) in main.tsCritical: Use dynamic imports for non-critical modules
import at top of file causes the entire dependency chain to load on initial pageawait import('module') or import('path/to/module').then() for lazy loadingsrc/settings/registerThirdComp.ts — vxe-table, emoji picker (loaded after mount)src/views/super/registerSuper.ts — dynamic module discoveryVite optimizeDeps
vite.config.ts include: dayjs, axios, pinia, nprogress, qs, crypto-js, md5, sortablejs, xe-utils, vue-i18n, lodash-es, xss, mockjs@jeecg/*) excluded due to CJS issuessrc/qiankun/, sub-apps via VITE_APP_SUB_* env varsVITE_GLOB_QIANKUN_MICRO_APP_NAME is setsrc/electron/ — uses hash router modeVITE_GLOB_RUN_PLATFORM === 'electron'.env — base config (port 3100, app title, SSO/qiankun flags).env.development — mock enabled, proxy to localhost:8080/jeecg-boot.env.production — mock disabled, gzip compression.env.docker — Docker production build config.env.dockercloud — Docker cloud production build config.env.prod_electron — Electron production build configVITE_GLOB_* vars are injected at runtime via dist/_app.config.js (changeable post-build)vue-vendor, antd-vue-vendor, vxe-table-vendor, emoji-mart-vue-fast, china-area-data-vendorbuild/script/postBuild.ts generates runtime config; copyChat.ts copies chat assetsendOfLine: 'auto', vueIndentScriptAndStyle: true (indent inside <script>/<style>), htmlWhitespaceSensitivity: 'strict'any is allowed. Unused vars prefixed with _ are ignored. Note: prettier/prettier rule is 'off' — Prettier is not enforced via ESLint, run it separatelysrc/locales/lang/build/ # Vite plugins, build scripts, theme generation
src/api/ # API definitions (sys/, common/, demo/)
src/components/jeecg/ # Jeecg-specific components (JVxeTable, OnLine, etc.)
src/layouts/default/ # Main app layout (header, sider, tabs, menu)
src/settings/ # Project settings (design, components, locale, encryption)
src/utils/http/axios/ # HTTP client configuration
src/views/system/ # System management pages (user, role, menu, dict, etc.)
src/views/super/ # Dynamically-discovered extension modules
types/ # Global TypeScript declarations