From 2c6bd6b499bc1918ef9e9305d6ed78553c0503c7 Mon Sep 17 00:00:00 2001 From: XiaoDaiGua-Ray <51957438+XiaoDaiGua-Ray@users.noreply.github.com> Date: Fri, 6 Nov 2026 22:10:09 +0800 Subject: [PATCH] docs: highlight AI collaboration and project strengths --- README.md | 235 +++++++++++++++++++++++++++--------------------- README.zh-CN.md | 235 +++++++++++++++++++++++++++--------------------- 2 files changed, 264 insertions(+), 206 deletions(-) diff --git a/README.md b/README.md index 6e6e6c0d..a370f363 100644 --- a/README.md +++ b/README.md @@ -1,105 +1,50 @@ # Ray Template -**Four visual styles. Five navigation layouts. A Vue 3 workspace you can make your own.** +**A Vue 3 admin template built for AI-assisted development.** -[简体中文](README.zh-CN.md) · **[Live demo](https://xiaodaigua-ray.github.io/ray-template/)** · **[Documentation](https://xiaodaigua-ray.github.io/ray-template/docs/)** · [Quick start](#quick-start) · [Architecture](#one-workspace-shared-building-blocks) +Give developers and coding agents the same path through the project: **find the implementation, understand its contracts, reuse existing capabilities, and verify the change.** -Ray Template is an open-source frontend template for admin dashboards, operations consoles, and internal tools. It brings together a working application, reusable packages, and interactive documentation. Start with the demo, choose a look, and connect your business APIs. +[简体中文](README.zh-CN.md) · **[Live demo](https://xiaodaigua-ray.github.io/ray-template/)** · **[Documentation](https://xiaodaigua-ray.github.io/ray-template/docs/)** · [Quick start](#quick-start) · [Develop with AI](#develop-with-ai) -**4 visual styles · 5 navigation layouts · 11 TablePro examples · 10 shared packages** +Ray Template uses Vue 3, TypeScript / TSX, and Naive UI for admin dashboards, operations consoles, and internal tools. The repository brings together a working application, shared components, interactive documentation, and engineering context organized by task. -[![The complete Ray Admin welcome page in the default Modern light style with side navigation](docs/assets/readme/welcome-modern-light.png)](https://xiaodaigua-ray.github.io/ray-template/#/dashboard) +**Task context and verification commands · 4 visual styles · 5 navigation layouts · 11 TablePro examples** -[![TablePro with automatic height, search, pagination, and toolbar actions in Modern light mode](docs/assets/readme/table-modern-light.png)](https://xiaodaigua-ray.github.io/ray-template/#/tables/auto-height) +[![TablePro in Modern light mode, with search, pagination, automatic height, and toolbar actions](docs/assets/readme/table-modern-light.png)](https://xiaodaigua-ray.github.io/ray-template/#/tables/auto-height) -_Welcome page and TablePro · Default Modern style · Light mode._ +## Why choose Ray Template -## Choose your look and layout +### Engineering context for AI collaboration -### Four styles across the interface +[AGENTS.md](AGENTS.md) sets the collaboration rules; [llms.txt](llms.txt) maps tasks to source, contracts, examples, and checks. When working on tables, routing, layout, or APIs, read the relevant context and use Harness to run the corresponding checks and save their results. -| Style | Character | -| ------------ | ------------------------------------------------------------------------ | -| **Modern** | Blue accents, balanced spacing, and soft corners. The default workspace. | -| **Naive UI** | Native controls, familiar proportions, and green accents. | -| **Material** | Tonal surfaces, larger corners, and capsule-shaped buttons. | -| **Plain** | Neutral colors, compact corners, and flat surfaces. | +### Applications, documentation, and examples share source -Styles cover the shell, controls, tables, and chart themes. Each supports light and dark modes; follow the system or choose a mode yourself. Customize the primary color and export or import your preferences as JSON. +The admin application and documentation consume the same workspace packages. Interactive examples use real components, and the TablePro documentation includes the source of the examples it runs. Changes to public capabilities can be checked in both the application and documentation. [Explore the examples](apps/docs/reference/table-pro-examples.md) · [Documentation workflow](docs/docs-handoff.md) -![The complete Ray Admin welcome page in Modern dark mode, using the same layout as the light version](docs/assets/readme/welcome-modern-dark.png) +### Four styles across the business interface -[![TablePro with automatic height, search, pagination, and toolbar actions in Modern dark mode](docs/assets/readme/table-modern-dark.png)](https://xiaodaigua-ray.github.io/ray-template/#/tables/auto-height) +Modern, Naive UI, Material, and Plain cover the shell, controls, tables, and charts, each with light and dark modes. Custom pages inherit colors, corners, and shadows through semantic theme tokens, while runtime layout variables adapt them to the workspace. [Theme integration](apps/docs/guide/appearance.md) · [CSS contract](docs/ui-design.md#custom-css-contract) -_The same welcome page and TablePro in Modern dark mode._ +### TablePro handles interaction and data state -### Five ways to organize the workspace +One table component supports local data, remote requests, and controlled pagination, with advanced search, column settings, export, printing, and instance hooks. Request races, cancellation signals, failure recovery, and export scope have explicit contracts and regression coverage. [11 runnable examples](https://xiaodaigua-ray.github.io/ray-template/docs/reference/table-pro-examples.html) · [Component contract](packages/ui/src/RTablePro/README.md) -**Side · Top · Mixed · Right · Split** +### One contract from the static demo to your business API -Keep navigation in a sidebar, move it to the top or right, or separate top-level groups from their child menus. Choose fluid or centered content, adjust spacing, and pin the header or footer. Narrow screens use a menu drawer. +Development and the static hosted demo share MSW HTTP mocks, with pages fetching data through the application's API layer. Shared TypeScript types, Valibot schemas, and generated OpenAPI 3.1 definitions guide backend integration; a dedicated command checks that generated contracts stay in sync. [API contracts](packages/api-contracts/README.md) · [Backend integration](apps/docs/guide/backend.md) -Page tabs, KeepAlive, breadcrumbs, `⌘/Ctrl + K` search, content maximization, page transitions, and English / Simplified Chinese are built in. Layout, appearance, and menu preferences update live and persist in the browser. +### Visual route editing with a validated configuration contract -[Appearance and theme tokens](apps/docs/guide/appearance.md) · [Layout playground](apps/docs/guide/layout.md) · [Shell integration](apps/admin/src/layout/README.md) +Manage menu order, roles, visibility, and caching through a visual editor or JSON. Tree previews, import/export, JSON Schema, and registered view IDs help maintain the configuration. Both editors use the same route model, with documented integration constraints and permission boundaries. [Routes and menus](apps/admin/src/router/README.md) -## TablePro, ready for business workflows + -Use `RTablePro` for a plain table, a searchable directory, or a dense operations page. Column definitions and custom cells follow Naive UI DataTable. +### Choose frontend or fullstack source from one project -- **Search that grows with the page.** Text, numbers, multiple selection, dates, trees, cascades, and custom fields; validation, dependent remote options, and manual or debounced submission. -- **Local and remote data.** Local filtering, component-managed requests, or pagination controlled by the page. Remote queries accept only the latest result and forward cancellation signals. -- **A usable data workspace.** Automatic height, virtual scrolling, column visibility, reordering, pinning, and stored column preferences. -- **Everyday tools.** Copy the table as a PNG, export CSV, print a table or custom region, and add row menus or toolbar actions. -- **Control from your page.** `useTablePro` exposes search, pagination, current-page data, and request state. Selection stays in the page's controlled row keys. +Export an independently runnable frontend, or include the NestJS, PostgreSQL, and Redis implementation. Distribution scripts use the dependency graph to prune workspaces, the lockfile, and edition-specific documentation, then record the version, source commit, and content digest. [Source distributions and startup](apps/docs/guide/distributions.md) -Failed queries clear the failed result and report the error; users can query again or reload. The examples cover success, cancellation, and failure recovery. - -Explore [11 runnable examples](https://xiaodaigua-ray.github.io/ray-template/docs/reference/table-pro-examples.html), including advanced search, controlled pagination, column settings, printing, and instance hooks. Each includes the source that actually runs. - -[TablePro API](apps/docs/reference/table-pro.md) · [Component contract](packages/ui/src/RTablePro/README.md) · [First business page](apps/docs/guide/first-page.md) - -## A working application to build on - -| Area | Included | -| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -| **Users and organizations** | Organization tree, member search, create/edit/detail flows, account status, roles, and permission-aware actions. | -| **Routes and permissions** | Visual and JSON route editors, menu generation, role-based navigation, direct-route guards, and page caching. | -| **Forms and dialogs** | `RForm`, `useForm`, and `RModal` with validation, reset, loading, and runnable examples. | -| **Charts and interaction** | ECharts lifecycle and theme handling, LogicFlow, draggable cards, context menus, screenshots, printing, and fullscreen. | -| **Icons and utilities** | Typed SVG names and generated sprites, QR codes, barcodes, precision arithmetic, storage helpers, composables, and directives. | -| **Documentation** | Guides, API references, and interactive examples using the same workspace packages as the application. | - -The demo uses **MSW HTTP mocks** for login, users, routes, and example data, both in development and on the static hosted site. To connect a backend, set `VITE_API_BASE_URL` and `VITE_API_MOCK=false`. Shared schemas and generated **OpenAPI 3.1** describe the contract; your backend owns real sessions and API authorization. - -[Backend integration](apps/docs/guide/backend.md) · [Routing guide](apps/admin/src/router/README.md) · [Components](apps/docs/reference/components.md) · [Composables](apps/docs/reference/hooks.md) - -## One workspace, shared building blocks - -Ray Admin and the documentation live in one **pnpm monorepo**. Business integration stays in the application; reusable capabilities have explicit package entry points. - -```mermaid -flowchart TB - Admin["Ray Admin · apps/admin"] - Docs["Interactive docs · apps/docs"] - Shared["10 shared workspace packages"] - UI["Interface: ui · admin-shell"] - Interaction["Interaction: composables · directives · icons"] - Data["Data: http · api-contracts · demo-data · routing · utils"] - Admin --> Shared - Docs --> Shared - Shared --> UI - Shared --> Interaction - Shared --> Data -``` - -- **[apps/admin](apps/admin)** owns pages, sessions, Pinia, route registration, API integration, and mocks. -- **[apps/docs](apps/docs)** runs shared components and embeds application examples from the same build. -- **[packages](packages)** exposes public `exports`; boundary checks validate imports, declared dependencies, and cycles. These are workspace packages, not separately published npm packages. - -Semantic theme tokens let custom pages follow the selected style, mode, and primary color. The shell exposes runtime layout dimensions and slots for the header, sidebar, tabs, footer, and content. - -[Architecture map](docs/architecture.md) · [API contracts](packages/api-contracts/README.md) · [Custom CSS contract](docs/ui-design.md#custom-css-contract) + ## Quick start @@ -115,59 +60,143 @@ pnpm install --frozen-lockfile pnpm dev ``` -Open [http://127.0.0.1:9527/ray-template/](http://127.0.0.1:9527/ray-template/) and click **Continue with demo account**. The login page also offers manager and read-only accounts. No business backend is needed to explore the demo. +Open [http://127.0.0.1:9527/ray-template/](http://127.0.0.1:9527/ray-template/) and click **Continue with demo account**. Switch to manager or read-only accounts to explore permission differences. The frontend demo needs no database or business backend. -1. **Try the interface.** Open Settings to change styles and layouts, then explore Users and TablePro. -2. **Build a page.** Start with an [existing example](apps/admin/src/views/demo), register its view ID, and add a route with bilingual menu labels. -3. **Connect your API.** Keep the page contract and connect your backend using the [integration guide](apps/docs/guide/backend.md). +- **Try the interface.** Open Settings to change styles and layouts, then explore Users and TablePro. +- **Build your first page.** Follow the [business page guide](apps/docs/guide/first-page.md), reuse components, and register the route with English and Chinese menu labels. +- **Connect your service.** Follow the [backend integration guide](apps/docs/guide/backend.md) to configure `VITE_API_BASE_URL` and `VITE_API_MOCK=false`. -## Choose a source distribution +## Develop with AI -The frontend distribution contains Admin, documentation, shared packages, and Mock. It installs and runs independently without a database or Redis. Run `pnpm dist:frontend` to produce `ray-template-frontend-.tar.gz` and its source directory under `dist/distributions/`. Extract it, then run `pnpm install --frozen-lockfile` and `pnpm dev`. +AI support is part of the everyday development workflow. Coding agents that can read the repository and run commands can use the same Markdown documents, source entry points, and verification commands as maintainers. -Each artifact includes `distribution.json` with its version, source commit and workspace state, workspace list, and content digest. Export prunes the lockfile, dependencies, commands, and fullstack-only documentation, and excludes local configuration, credentials, build output, and installed dependencies. See [distributions and startup](apps/docs/guide/distributions.md). +| Development question | Evidence in the repository | +| -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Where should I start, and which conventions apply? | [AGENTS.md](AGENTS.md): scope, reuse, documentation updates, and acceptance rules. | +| Which files matter for this task? | [llms.txt](llms.txt) → [task context](harness/context): implementations, callers, contracts, and tests. | +| Which module owns the behavior, and where are its boundaries? | The [architecture map](docs/architecture.md), public `exports`, and [package boundary checks](scripts/check-package-boundaries.mjs). | +| How do existing capabilities work, and what do their parameters and states mean? | [Component references](apps/docs/reference/components.md), [hook references](apps/docs/reference/hooks.md), module READMEs, and [runnable examples](apps/docs/reference/table-pro-examples.md). | +| How do mocks and business requests agree on API shapes? | [Shared schemas and OpenAPI](packages/api-contracts/README.md), with `pnpm api:check` checking generated contract synchronization. | +| What should I run after a change, and where are the results? | [Verification scopes](harness/scopes.json) and `pnpm harness verify `, with reports saved under `.harness-local/runs/`. | + +For a TablePro task, read its context first, then select verification for the change: + +```sh +pnpm harness context table-pro +pnpm harness verify table-pro +``` + +You can give a coding agent a request like this and replace the business details: + +```text +Read AGENTS.md and llms.txt first, then locate the context for this task. +Add a project list page with name, status, and owner filters and remote pagination. +Check existing TablePro examples, route registration, API contracts, and English/Chinese copy before implementing. Reuse existing capabilities. +Identify the modules that need to change, complete the implementation, and run the relevant checks. Verify visible interactions in a browser. +Report the changes, checks that actually passed, and anything still unverified. +``` + +Here, `llms.txt` is a repository task index that you can explicitly ask an agent to read. Load context by task and confirm behavior against current source and contracts. Harness runs only the commands registered for the selected scope; add type, lint, formatting, and browser checks as the change requires. Use `pnpm check` for full verification. See the [verification rules](harness/README.md#choosing-the-verification-scope). + +## Everyday admin capabilities + +| Area | Included | +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Users and accounts** | Login, logout, session restoration, and screen lock; organization tree, member search, create/edit/detail flows, account status, roles, profiles, and password forms. | +| **Routes and permissions** | Visual and JSON route editors, menu generation, role-based navigation, action permissions, direct-route guards, and KeepAlive. | +| **Navigation and workspace** | Page tabs, context menus, breadcrumbs, `⌘/Ctrl + K` search, account-scoped recent pages and favorites, content maximization, transitions, and 403/404/500 pages. | +| **Tables and search** | Local data, remote requests, controlled pagination, advanced search, dependent remote options, automatic height, virtual scrolling, saved column visibility, reordering, and pinning. | +| **Forms and dialogs** | `RForm`, `useForm`, and `RModal`, with validation, reset, loading states, and interactive examples. | +| **Visualization and interaction** | ECharts lifecycle and themes, LogicFlow, draggable cards, context menus, screenshots, CSV export, printing, and fullscreen. | +| **Themes and localization** | Four styles, light/dark/system modes, custom primary colors, English and Chinese copy, live preference persistence, and JSON import/export. | +| **Icons and utilities** | Typed SVG names and generated sprites, QR codes, barcodes, precision arithmetic, storage, composables, and directives. | +| **Engineering and integration** | pnpm workspaces, request cancellation, type and package boundary checks, Vitest, ESLint / Prettier, and a [Wujie sub-application entry point](apps/admin/src/main.ts). | + +Frontend permissions shape the page experience; your backend validates real sessions and API authorization. See the [backend integration guide](apps/docs/guide/backend.md) for demo data and integration boundaries. + +## Styles and layouts + +| Style | Character | +| ------------ | -------------------------------------------------------------------- | +| **Modern** | The default style: blue accents, balanced spacing, and soft corners. | +| **Naive UI** | Native library controls, proportions, and green accents. | +| **Material** | Tonal surfaces, larger corners, and capsule-shaped buttons. | +| **Plain** | Neutral colors, small corners, and flat surfaces. | + +**Side · Top · Mixed · Right · Split.** Choose fluid or fixed-width content, adjust spacing, and pin the header or footer. Narrow screens use a menu drawer. Switch layouts in the [live demo](https://xiaodaigua-ray.github.io/ray-template/) or explore the [layout playground](apps/docs/guide/layout.md). + +
+View the workspace and dark theme previews + +![The workspace in Modern light mode](docs/assets/readme/welcome-modern-light.png) + +![The workspace in Modern dark mode](docs/assets/readme/welcome-modern-dark.png) + +[![TablePro in Modern dark mode](docs/assets/readme/table-modern-dark.png)](https://xiaodaigua-ray.github.io/ray-template/#/tables/auto-height) + +
+ +## Workspaces and source distributions + +A **pnpm monorepo** keeps business integration separate from shared capabilities. + +| Location | Responsibility | +| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| [apps/admin](apps/admin) | Pages, sessions, Pinia, route registration, business APIs, and mocks. | +| [apps/docs](apps/docs) | VitePress guides, API references, and interactive examples. | +| [packages](packages) | 10 shared packages: `ui`, `admin-shell`, `composables`, `directives`, `icons`, `http`, `api-contracts`, `demo-data`, `routing`, and `utils`. | +| [harness](harness/README.md) | Task context, verification scopes, check commands, and result reports. | + +Shared packages expose public `exports`. Boundary checks cover imports, dependency declarations, runtime environments, and dependency cycles. These packages are used within the workspace and are not separately published to npm. [Architecture map](docs/architecture.md) + +**Frontend source:** Run `pnpm dist:frontend` to generate `ray-template-frontend-.tar.gz` and its source directory under `dist/distributions/`. Extract it, then run `pnpm install --frozen-lockfile` and `pnpm dev`. The export includes Admin, documentation, shared packages, and mocks; it excludes local configuration, credentials, build output, and installed dependencies. `distribution.json` records the version, source commit, workspace state, and content digest. -The complete source also includes an optional [NestJS server](apps/server). PostgreSQL stores users, permissions, sessions, route configuration, and audits; Redis provides rate limits and cache for demonstration reads. Run `pnpm dist:fullstack` to export the matching fullstack source archive. +**Optional fullstack source:** The complete repository also includes [apps/server](apps/server), using NestJS, PostgreSQL, and Redis for sessions, API permissions, users, route configuration, audits, and rate limits. Run `pnpm dist:fullstack` to export the fullstack source for the same version. -After installing dependencies, prepare Docker Compose and run: +After installing dependencies and preparing Docker Compose, run: ```sh pnpm fullstack:setup pnpm dev:full ``` -To build and start the entire stack in Docker without installing host dependencies, run `node scripts/fullstack.mjs up` from the complete source. Open `http://127.0.0.1:8080/ray-template/`. +`setup` creates the private `apps/server/.env.local`, starts PostgreSQL and Redis, applies migrations, and initializes the administrator. The generated administrator password is stored in that file; mock demo passwords do not authenticate against the server. For existing databases and Redis, use `pnpm fullstack:setup --external` and follow the [startup guide](apps/docs/guide/distributions.md) for configuration. -`setup` creates the private `apps/server/.env.local`, starts PostgreSQL and Redis, applies migrations, and initializes the administrator. The generated administrator password is stored in that file; Mock passwords do not authenticate against the server. For existing PostgreSQL and Redis services, provide `DATABASE_URL` and `REDIS_URL` and run `pnpm fullstack:setup --external`. `pnpm fullstack:stop` retains data volumes. +Alternatively, run `node scripts/fullstack.mjs up` to build and start the entire stack with Docker, without first installing project dependencies on the host. The default entry point is `http://127.0.0.1:8080/ray-template/`. `pnpm fullstack:stop` stops services and retains data volumes. -The [Source distributions workflow](.github/workflows/distributions.yaml) verifies both archives before it can update the generated `frontend` branch or attach assets to an existing GitHub Release. Those actions are explicitly selected when running the workflow from `main`. See the [Compose and release instructions](apps/docs/guide/distributions.md#容器启动). +The [source distributions workflow](.github/workflows/distributions.yaml) provides manual options to verify archives, generate the `frontend` branch, and attach assets to an existing Release. [Container startup and release instructions](apps/docs/guide/distributions.md#容器启动) -## Development and delivery +## Development and verification **Vue 3 · TypeScript / TSX · Naive UI · Vite / Rolldown · Pinia · Vue Router · Vue I18n · Axios · MSW · Vitest** -| Command | Purpose | -| ------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `pnpm dev` / `pnpm docs:dev` | Develop the application or documentation. | -| `pnpm build` / `pnpm preview` | Build or preview the admin application. | -| `pnpm pages:build` | Assemble the admin and documentation into `dist/pages`. | -| `pnpm harness context ` | Find the implementation, contracts, and relevant checks. | -| `pnpm harness verify ` | Run checks for the affected area and save a report. | -| `pnpm check` | Check the environment, contracts, package boundaries, types, lint, formatting, tests, and both builds. | +| Command | Purpose | +| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `pnpm dev` / `pnpm docs:dev` | Develop the admin application or documentation. | +| `pnpm build` / `pnpm preview` | Build or preview the admin application. | +| `pnpm pages:build` | Assemble the admin and documentation into `dist/pages`. | +| `pnpm harness context ` | Read task entry points and relevant check commands. | +| `pnpm harness verify ` | Run checks for the selected scope and save a report. | +| `pnpm harness check` | Validate task indexes, relative file links, and registered verification scopes. | +| `pnpm check` | Run the full checks configured for this source edition: environment, contracts, package boundaries, types, lint, formatting, tests, site builds, and distribution plans. | -CI is configured for **Linux, Windows, and macOS**. The [task index](llms.txt) and [AI Harness](harness/README.md) provide navigable engineering context for maintainers and coding agents. + -Default deployment paths are `/ray-template/` for the admin and `/ray-template/docs/` for documentation. See [deployment guidance](docs/architecture.md#deployment-and-search-discovery) before changing the base paths. +In the complete repository, `pnpm check` also checks server types, tests, and builds. Distribution plan checks validate export structure and dependencies; independent installation, runtime, and deployment environments require their own acceptance checks. + + + +CI is configured for **Linux, Windows, and macOS**. Read [AGENTS.md](AGENTS.md) and the [Harness verification guide](harness/README.md) before contributing. Default deployment paths are `/ray-template/` for the admin and `/ray-template/docs/` for documentation. See the [deployment guidance](docs/architecture.md#deployment-and-search-discovery) before changing them. ## Version boundaries -**v6 introduces the monorepo architecture.** It does not provide an in-place upgrade from v5 or guarantee compatibility with v5 imports, APIs, deployment settings, or browser data. +**v6 introduces the monorepo architecture and does not provide an in-place upgrade from v5.** Compatibility with v5 internal imports, APIs, deployment settings, and browser data is not guaranteed. -Existing projects can stay on [legacy/v5](https://github.com/XiaoDaiGua-Ray/ray-template/tree/legacy/v5), the final v5 main snapshot `6f095b7` with manifest version `5.2.5`, or use the matching [v5.2.5 tag](https://github.com/XiaoDaiGua-Ray/ray-template/tree/v5.2.5). Read the [migration notes](apps/docs/migration.md) before adopting v6. +Existing projects can stay on [legacy/v5](https://github.com/XiaoDaiGua-Ray/ray-template/tree/legacy/v5) or the [v5.2.5 tag](https://github.com/XiaoDaiGua-Ray/ray-template/tree/v5.2.5). Read the [migration notes](apps/docs/migration.md) before adopting v6. --- diff --git a/README.zh-CN.md b/README.zh-CN.md index e2d589d4..7ac0ff96 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,105 +1,50 @@ # Ray Template -**四种视觉风格,五种导航布局,把中后台做得顺手,也做得好看。** +**面向 AI 协作开发的 Vue 3 中后台模板。** -[English](README.md) · **[在线演示](https://xiaodaigua-ray.github.io/ray-template/)** · **[在线文档](https://xiaodaigua-ray.github.io/ray-template/docs/)** · [快速开始](#快速开始) · [架构设计](#monorepo-架构) +让开发者与编码助手沿着同一条路径工作:**找到实现入口,理解模块契约,复用现有能力,验证实际改动。** -Ray Template 是基于 Vue 3、TypeScript / TSX 和 Naive UI 的开源中后台模板,适合管理后台、运营工作台和内部工具。完整应用、共享包和交互文档放在同一工作区,克隆即可运行,再按业务调整界面、页面和接口。 +[English](README.md) · **[在线演示](https://xiaodaigua-ray.github.io/ray-template/)** · **[在线文档](https://xiaodaigua-ray.github.io/ray-template/docs/)** · [快速开始](#快速开始) · [与 AI 一起开发](#与-ai-一起开发) -**4 种视觉风格 · 5 种导航布局 · 11 个 TablePro 示例 · 10 个共享包** +Ray Template 基于 Vue 3、TypeScript / TSX 和 Naive UI,适合管理后台、运营工作台与内部工具。仓库同时提供可运行的应用、共享组件、交互文档,以及按任务组织的工程上下文。 -[![默认 Modern 浅色风格的完整欢迎页,展示侧边导航和工作空间概览](docs/assets/readme/welcome-modern-light.png)](https://xiaodaigua-ray.github.io/ray-template/#/dashboard) +**任务索引与验证入口 · 4 种完整视觉风格 · 5 种导航布局 · 11 个 TablePro 示例** -[![Modern 浅色主题下的 TablePro,展示自适应高度、搜索、分页与工具栏操作](docs/assets/readme/table-modern-light.png)](https://xiaodaigua-ray.github.io/ray-template/#/tables/auto-height) +[![Modern 浅色风格的 TablePro,展示搜索、分页、自适应高度和工具栏](docs/assets/readme/table-modern-light.png)](https://xiaodaigua-ray.github.io/ray-template/#/tables/auto-height) -_欢迎页与 TablePro · 默认 Modern 风格 · 浅色主题。_ +## 为什么选择 Ray Template -## 风格与布局 +### 为 AI 协作准备的工程上下文 -### 四种风格,覆盖整套界面 +[AGENTS.md](AGENTS.md) 说明协作约定,[llms.txt](llms.txt) 按任务导航到源码、契约、示例和检查入口。处理表格、路由、布局或接口问题时,可以按范围读取相关上下文,并通过 Harness 执行对应检查、保存结果。 -| 风格 | 视觉特点 | -| ------------------- | ---------------------------------------------- | -| **Modern · 现代化** | 蓝色主调、适度留白与柔和圆角,作为默认工作台。 | -| **Naive UI · 原生** | 保留组件库的原生控件、比例与绿色主调。 | -| **Material** | 带色阶的面板、更大的圆角与胶囊按钮。 | -| **Plain · 朴素** | 中性色、小圆角与平面化界面。 | +### 应用、文档与示例共用源码 -风格会应用到布局外壳、控件、表格与图表主题。每种风格都支持浅色和深色,可以手动选择或跟随系统;主题色可以自定义,偏好配置支持 JSON 导入与导出。 +后台与文档站消费同一工作区的共享包。交互示例使用真实组件,TablePro 文档引用实际运行的示例源码;修改公共能力时,应用与文档都能参与验证。[查看示例](apps/docs/reference/table-pro-examples.md) · [文档协作约定](docs/docs-handoff.md) -![Modern 深色主题下的完整欢迎页,与浅色版本使用相同布局](docs/assets/readme/welcome-modern-dark.png) +### 四种风格覆盖业务界面 -[![Modern 深色主题下的 TablePro,展示自适应高度、搜索、分页与工具栏操作](docs/assets/readme/table-modern-dark.png)](https://xiaodaigua-ray.github.io/ray-template/#/tables/auto-height) +Modern、Naive UI、Material、Plain 覆盖布局外壳、控件、表格和图表,并分别提供明暗模式。自定义页面通过语义化主题变量继承颜色、圆角与阴影,通过运行时布局变量适应工作区尺寸。[主题接入](apps/docs/guide/appearance.md) · [样式契约](docs/ui-design.md#custom-css-contract) -_相同的欢迎页与 TablePro,切换至 Modern 深色主题。_ +### TablePro 兼顾交互与数据状态 -### 五种导航,适配不同工作方式 +一个表格入口支持本地数据、远程请求和受控分页,并配套高级搜索、列设置、导出、打印与实例 Hooks。请求竞态、取消信号、失败恢复和导出范围都有明确契约与对应回归用例。[11 个在线示例](https://xiaodaigua-ray.github.io/ray-template/docs/reference/table-pro-examples.html) · [组件契约](packages/ui/src/RTablePro/README.md) -**侧边导航 · 顶部导航 · 混合导航 · 右侧导航 · 通栏分组** +### 从静态演示到业务 API,沿用同一套契约 -菜单可以放在左侧、顶部或右侧,也可以将一级分组与子菜单分开。工作区支持流式铺满、定宽居中、间距调整和顶栏/页脚固定,窄屏自动使用菜单抽屉。 +开发环境与静态在线演示共用 MSW HTTP Mock,页面通过真实的 API 调用链获取数据。共享 TypeScript 类型、Valibot Schema 与生成的 OpenAPI 3.1 为后端接入提供依据,契约同步由命令检查。[接口契约](packages/api-contracts/README.md) · [后端接入](apps/docs/guide/backend.md) -多标签页、KeepAlive、面包屑、`⌘/Ctrl + K` 全局搜索、内容最大化和页面动效均已接入,提供中英文切换。布局、外观和菜单偏好即时生效,并保存在当前浏览器。 +### 路由配置既能可视化编辑,也有可校验的契约 -[主题与样式变量](apps/docs/guide/appearance.md) · [布局实验室](apps/docs/guide/layout.md) · [外壳接入](apps/admin/src/layout/README.md) +通过可视化编辑器或 JSON 管理菜单顺序、角色、可见性与缓存,结合树预览、导入导出、JSON Schema 和可用页面 ID 维护配置。配置最终落到同一套路由模型,接入约束与权限边界有专门说明。[路由与菜单](apps/admin/src/router/README.md) -## TablePro:从展示数据到处理业务 + -同一个 `RTablePro`,可以用于纯表格、可查询的管理列表,也可以承载密集的运营页面。列定义与自定义单元格沿用 Naive UI DataTable 的方式。 +### 同一工程,按需要选择前端或全栈源码 -- **搜索随业务扩展**:文本、数字、多选、日期、树选择、级联和自定义字段,支持校验、远程候选联动、手动提交与防抖自动提交。 -- **本地与远端共用入口**:本地筛选、组件管理请求或页面控制分页;远端查询只采用最新结果,并透传取消信号。 -- **充分利用工作区**:自适应高度、虚拟滚动、列显隐、顺序调整、固定和列偏好存储。 -- **常用操作直接可用**:复制表格为 PNG、导出 CSV、打印表格或自定义区域,以及行菜单和工具栏扩展。 -- **页面可以主动控制**:通过 `useTablePro` 操作搜索、分页,读取当前页数据与请求状态;行选择由页面维护受控的行键。 +可以导出独立运行的纯前端源码,也可以保留 NestJS、PostgreSQL 与 Redis 的全栈实现。发行脚本按依赖图裁剪工作区、锁文件和专属说明,并记录版本、来源提交与内容摘要。[发行版本与启动方式](apps/docs/guide/distributions.md) -请求失败时清空失败结果并提示错误,可以重新查询或刷新。示例同时覆盖成功、取消和失败恢复过程。 - -[11 个在线示例](https://xiaodaigua-ray.github.io/ray-template/docs/reference/table-pro-examples.html)包含高级搜索、受控分页、列设置、打印和实例 Hooks,每个场景都附上实际运行的源码。 - -[TablePro API](apps/docs/reference/table-pro.md) · [组件契约](packages/ui/src/RTablePro/README.md) · [第一个业务页面](apps/docs/guide/first-page.md) - -## 带着完整应用开始 - -| 能力 | 已有内容 | -| -------------- | ----------------------------------------------------------------------------- | -| **用户与组织** | 组织树、成员查询、新增/编辑/详情、账号状态、角色和权限控制的操作。 | -| **路由与权限** | 可视化和 JSON 路由编辑器、菜单生成、角色导航、直接访问守卫与页面缓存。 | -| **表单与弹窗** | `RForm`、`useForm`、`RModal`,配套校验、重置、加载状态与交互示例。 | -| **图表与交互** | ECharts 实例和主题管理、LogicFlow、拖拽卡片、右键菜单、截图、打印和全屏。 | -| **图标与工具** | 带类型提示的 SVG 名称与精灵图、二维码、条形码、精度运算、存储、Hooks 和指令。 | -| **交互文档** | 指南、API 参考和可运行示例,与后台应用使用同一工作区的组件。 | - -开发环境和静态在线演示共用 **MSW HTTP Mock**,登录、用户、路由和示例数据都经过 API 层。接入后端时配置 `VITE_API_BASE_URL` 与 `VITE_API_MOCK=false`,共享 Schema 和自动生成的 **OpenAPI 3.1** 提供接口契约;真实会话与接口授权由业务后端负责。 - -[后端接入](apps/docs/guide/backend.md) · [路由与菜单](apps/admin/src/router/README.md) · [组件参考](apps/docs/reference/components.md) · [Hooks 参考](apps/docs/reference/hooks.md) - -## Monorepo 架构 - -Ray Admin 与文档站采用 **pnpm Monorepo**。业务接入留在应用层,可复用能力通过共享包的明确入口提供。 - -```mermaid -flowchart TB - Admin["Ray Admin · apps/admin"] - Docs["交互文档 · apps/docs"] - Shared["10 个共享 workspace 包"] - UI["界面:ui · admin-shell"] - Interaction["交互:composables · directives · icons"] - Data["数据:http · api-contracts · demo-data · routing · utils"] - Admin --> Shared - Docs --> Shared - Shared --> UI - Shared --> Interaction - Shared --> Data -``` - -- **[apps/admin](apps/admin)**:页面、会话、Pinia、路由注册、业务 API 和 Mock。 -- **[apps/docs](apps/docs)**:运行共享组件,并嵌入同一次构建中的后台示例。 -- **[packages](packages)**:通过公开 `exports` 提供入口,边界检查覆盖导入、依赖声明与循环依赖。目前作为工作区包使用,未单独发布到 npm。 - -主题使用语义化变量,让自定义页面跟随风格、明暗模式和主题色。布局外壳提供运行时尺寸变量,以及顶栏、侧栏、标签、页脚和内容插槽。 - -[架构地图](docs/architecture.md) · [接口契约包](packages/api-contracts/README.md) · [自定义样式约定](docs/ui-design.md#custom-css-contract) + ## 快速开始 @@ -115,59 +60,143 @@ pnpm install --frozen-lockfile pnpm dev ``` -打开 [http://127.0.0.1:9527/ray-template/](http://127.0.0.1:9527/ray-template/),点击 **使用演示账号进入**。登录页还提供管理者和只读账号,无需先搭建业务后端。 +打开 [http://127.0.0.1:9527/ray-template/](http://127.0.0.1:9527/ray-template/),点击 **使用演示账号进入**。还可以切换管理者与只读账号,体验权限差异;前端演示无需数据库或业务后端。 -1. **先体验界面**:在「设置」中切换风格与布局,再查看用户管理和 TablePro。 -2. **写第一个页面**:参考[现有示例](apps/admin/src/views/demo),登记页面组件 ID,添加路由及中英文菜单文案。 -3. **接入业务接口**:保留页面契约,按[后端接入指南](apps/docs/guide/backend.md)连接自己的服务。 +- **先看界面**:在「设置」中切换风格与布局,再体验用户管理和 TablePro。 +- **开始写业务**:参考[第一个业务页面](apps/docs/guide/first-page.md),复用组件并登记路由与中英文菜单。 +- **接入自己的服务**:按[后端接入指南](apps/docs/guide/backend.md)配置 `VITE_API_BASE_URL` 和 `VITE_API_MOCK=false`。 -## 选择源码发行版本 +## 与 AI 一起开发 -纯前端发行包包含 Admin、文档、共享包和 Mock,独立安装与运行,不需要数据库或 Redis。执行 `pnpm dist:frontend`,在 `dist/distributions/` 得到 `ray-template-frontend-.tar.gz` 和对应源码目录。解压后执行 `pnpm install --frozen-lockfile`、`pnpm dev`。 +AI 友好体现在日常开发路径中。能够读取仓库并执行命令的编码助手,可以和维护者使用相同的 Markdown 文档、源码入口与验证命令。 -每份发行物都包含 `distribution.json`,记录版本、来源提交及工作区状态、工作区清单和内容摘要。导出会裁剪锁文件与依赖、命令和仅供全栈使用的说明,并排除本地配置、凭据、构建输出和依赖目录。详情见[发行版本与快速启动](apps/docs/guide/distributions.md)。 +| 开发时需要回答的问题 | 工程中的依据 | +| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 从哪里开始,遵守哪些约定? | [AGENTS.md](AGENTS.md):改动范围、复用、文档同步与验收约定。 | +| 这项任务要读哪些文件? | [llms.txt](llms.txt) → [任务索引](harness/context):实现、调用方、契约和测试入口。 | +| 哪个模块负责,哪些边界不能跨? | [架构地图](docs/architecture.md)、公共 `exports` 与[包边界检查](scripts/check-package-boundaries.mjs)。 | +| 已有能力怎么用,参数和状态有什么约束? | [组件参考](apps/docs/reference/components.md)、[Hooks 参考](apps/docs/reference/hooks.md)、模块 README 与[可运行示例](apps/docs/reference/table-pro-examples.md)。 | +| 接口形状、Mock 与业务请求如何对齐? | [共享 Schema 与 OpenAPI](packages/api-contracts/README.md),通过 `pnpm api:check` 检查生成文件同步。 | +| 改完应该跑什么,实际结果在哪里? | [验证范围](harness/scopes.json)、`pnpm harness verify `,结果保存在 `.harness-local/runs/`。 | + +例如,处理 TablePro 时先查看任务上下文,再按改动范围验证: + +```sh +pnpm harness context table-pro +pnpm harness verify table-pro +``` + +也可以把下面的需求交给编码助手,替换其中的业务内容: + +```text +请先读取 AGENTS.md 和 llms.txt,定位这项任务对应的上下文。 +新增一个项目列表页,包含名称、状态和负责人筛选,支持远程分页。 +先检查现有 TablePro 示例、路由注册、接口契约与中英文文案,复用已有能力。 +说明需要修改的模块后完成实现,执行相关检查;可见交互需要浏览器验证。 +交付时列出改动、实际通过的检查和仍未验证的部分。 +``` + +`llms.txt` 在这里是仓库任务索引,可显式交给助手阅读。上下文按任务读取,具体行为以当前源码和契约为准。Harness 只执行所选范围注册的命令;类型、Lint、格式与浏览器检查按改动补充,完整检查使用 `pnpm check`。详见[验证规则](harness/README.md#choosing-the-verification-scope)。 + +## 中后台常用能力 + +| 能力 | 已有内容 | +| ---------------- | ------------------------------------------------------------------------------------------------------------------------- | +| **用户与账号** | 登录、退出、会话恢复与锁屏;组织树、成员查询、新增/编辑/详情、账号状态、角色、个人资料与密码表单。 | +| **路由与权限** | 可视化和 JSON 路由编辑、菜单生成、角色导航、操作权限、直接访问守卫与 KeepAlive。 | +| **导航与工作区** | 多标签页、右键操作、面包屑、`⌘/Ctrl + K` 搜索、按账号隔离的最近访问与收藏、内容最大化、页面动效与 403/404/500 页面。 | +| **表格与搜索** | 本地/远程/受控分页,高级搜索与远程候选联动,自适应高度、虚拟滚动、列显隐偏好存储、列顺序调整与固定。 | +| **表单与弹窗** | `RForm`、`useForm`、`RModal`,支持校验、重置、加载状态与交互示例。 | +| **可视化与交互** | ECharts 生命周期和主题管理、LogicFlow、拖拽卡片、右键菜单、截图、CSV 导出、打印与全屏。 | +| **主题与国际化** | 四种风格、明暗与系统模式、自定义主题色、中英文文案、偏好即时保存及 JSON 导入/导出。 | +| **图标与工具** | 带类型提示的 SVG 名称与生成精灵图,二维码、条形码、精度运算、存储、组合式函数与指令。 | +| **工程与集成** | pnpm 工作区、请求取消、类型与包边界检查、Vitest、ESLint / Prettier,以及 [Wujie 子应用启动入口](apps/admin/src/main.ts)。 | + +前端权限用于控制页面体验,真实会话与 API 授权由业务后端验证。演示数据的用途和接入边界见[后端接入指南](apps/docs/guide/backend.md)。 + +## 风格与布局 + +| 风格 | 视觉特点 | +| ------------------- | ---------------------------------------- | +| **Modern · 现代化** | 默认风格,蓝色主调、适度留白与柔和圆角。 | +| **Naive UI · 原生** | 保留组件库原生控件、比例与绿色主调。 | +| **Material** | 带色阶的面板、大圆角与胶囊按钮。 | +| **Plain · 朴素** | 中性色、小圆角与平面化界面。 | + +**侧边导航 · 顶部导航 · 混合导航 · 右侧导航 · 通栏分组**。支持流式或定宽内容、间距调整、固定顶栏/页脚,窄屏使用菜单抽屉。可以在[在线演示](https://xiaodaigua-ray.github.io/ray-template/)中直接切换,或查看[布局实验室](apps/docs/guide/layout.md)。 + +
+查看工作台与深色主题预览 + +![Modern 浅色工作台](docs/assets/readme/welcome-modern-light.png) + +![Modern 深色工作台](docs/assets/readme/welcome-modern-dark.png) + +[![Modern 深色 TablePro](docs/assets/readme/table-modern-dark.png)](https://xiaodaigua-ray.github.io/ray-template/#/tables/auto-height) + +
+ +## 工作区与源码发行 + +采用 **pnpm Monorepo**,业务接入与共享能力分别维护。 + +| 位置 | 职责 | +| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| [apps/admin](apps/admin) | 页面、会话、Pinia、路由注册、业务 API 与 Mock。 | +| [apps/docs](apps/docs) | VitePress 指南、API 参考与交互示例。 | +| [packages](packages) | 10 个共享包:`ui`、`admin-shell`、`composables`、`directives`、`icons`、`http`、`api-contracts`、`demo-data`、`routing`、`utils`。 | +| [harness](harness/README.md) | 任务上下文、验证范围、检查命令与结果报告。 | + +共享包通过公开 `exports` 提供能力,边界检查覆盖导入、依赖声明、运行环境与循环依赖。包随工作区使用,未单独发布到 npm。[查看架构地图](docs/architecture.md) + +**纯前端源码**:执行 `pnpm dist:frontend`,在 `dist/distributions/` 生成 `ray-template-frontend-.tar.gz` 及源码目录。解压后运行 `pnpm install --frozen-lockfile` 和 `pnpm dev`。导出包含 Admin、文档、共享包与 Mock,排除本地配置、凭据、构建结果和已安装依赖。`distribution.json` 记录版本、来源提交、工作区状态与内容摘要。 -完整源码还包含可选的 [NestJS 服务端](apps/server),以 PostgreSQL 保存用户、权限、会话、路由与审计,并使用 Redis 提供限流和演示数据缓存。执行 `pnpm dist:fullstack` 生成同版本的全栈源码归档。 +**可选全栈源码**:完整仓库还包含 [apps/server](apps/server),使用 NestJS、PostgreSQL 与 Redis,实现会话、API 权限、用户、路由配置、审计与限流。执行 `pnpm dist:fullstack` 导出同版本全栈源码。 -安装依赖后,准备 Docker Compose,执行: +安装依赖并准备 Docker Compose 后,运行: ```sh pnpm fullstack:setup pnpm dev:full ``` -如需直接用 Docker 构建并启动整套服务,从完整源码根目录运行 `node scripts/fullstack.mjs up`。宿主机无需先安装前端依赖,默认打开 `http://127.0.0.1:8080/ray-template/`。 +`setup` 创建私有 `apps/server/.env.local`,启动 PostgreSQL 与 Redis,迁移并初始化管理员。随机生成的管理员密码保存在该文件中;真实后端不接受 Mock 演示密码。已有数据库和 Redis 时使用 `pnpm fullstack:setup --external`,配置方式见[启动指南](apps/docs/guide/distributions.md)。 -`setup` 创建私有的 `apps/server/.env.local`、启动数据库与 Redis、迁移并初始化管理员。管理员密码随机生成并保存在该文件中;真实后端不接受 Mock 演示密码。已有 PostgreSQL 和 Redis 时,提供 `DATABASE_URL`、`REDIS_URL` 后执行 `pnpm fullstack:setup --external`。`pnpm fullstack:stop` 停止 Compose 服务并保留数据卷。 +也可以运行 `node scripts/fullstack.mjs up`,由 Docker 构建并启动整套服务,宿主机无需预先安装项目依赖,默认入口为 `http://127.0.0.1:8080/ray-template/`。`pnpm fullstack:stop` 停止服务并保留数据卷。 -[源码发行工作流](.github/workflows/distributions.yaml) 验证两个归档后,可以生成或更新 `frontend` 分支,也可以给已有 GitHub Release 附加源码归档。需要从 `main` 手动运行并选择对应操作。容器启动见[发行版本与快速启动](apps/docs/guide/distributions.md#容器启动)。 +[源码发行工作流](.github/workflows/distributions.yaml)提供归档验证、生成 `frontend` 分支和附加已有 Release 资产的手动选项。[容器启动与发布说明](apps/docs/guide/distributions.md#容器启动) -## 开发与交付 +## 开发与验证 **Vue 3 · TypeScript / TSX · Naive UI · Vite / Rolldown · Pinia · Vue Router · Vue I18n · Axios · MSW · Vitest** -| 命令 | 用途 | -| ------------------------------ | ---------------------------------------------------------------- | -| `pnpm dev` / `pnpm docs:dev` | 开发后台应用或文档站。 | -| `pnpm build` / `pnpm preview` | 构建或预览后台应用。 | -| `pnpm pages:build` | 将后台与文档组装到 `dist/pages`。 | -| `pnpm harness context ` | 查找实现入口、契约与相关检查。 | -| `pnpm harness verify ` | 执行对应任务域的检查并保存报告。 | -| `pnpm check` | 检查环境、契约、包边界、类型、Lint、格式、测试和两个站点的构建。 | +| 命令 | 用途 | +| ------------------------------ | ---------------------------------------------------------------------------------------------------- | +| `pnpm dev` / `pnpm docs:dev` | 开发后台或文档站。 | +| `pnpm build` / `pnpm preview` | 构建或预览后台。 | +| `pnpm pages:build` | 将后台与文档组装到 `dist/pages`。 | +| `pnpm harness context ` | 读取任务入口与相关检查命令。 | +| `pnpm harness verify ` | 执行选定范围的检查并保存报告。 | +| `pnpm harness check` | 检查任务索引、相对文件链接与验证范围注册。 | +| `pnpm check` | 执行当前源码版本配置的完整检查,包括环境、契约、包边界、类型、Lint、格式、测试、站点构建与发行计划。 | -CI 配置覆盖 **Linux、Windows 和 macOS**。[任务索引](llms.txt)与 [AI Harness](harness/README.md) 为维护者和编码智能体提供可导航的工程上下文。 + -默认部署路径为后台 `/ray-template/`、文档 `/ray-template/docs/`。修改 base 前请阅读[部署约定](docs/architecture.md#deployment-and-search-discovery)。 +完整仓库的 `pnpm check` 还包含服务端类型、测试与构建。发行计划检查验证导出结构与依赖,独立安装、运行和部署环境仍需对应验收。 + + + +CI 配置覆盖 **Linux、Windows 与 macOS**。贡献前阅读 [AGENTS.md](AGENTS.md) 与 [Harness 验证说明](harness/README.md)。默认部署路径为后台 `/ray-template/`、文档 `/ray-template/docs/`,修改前请查看[部署约定](docs/architecture.md#deployment-and-search-discovery)。 ## 版本边界 -**v6 启用 Monorepo 架构。** 不提供 v5 原地升级,也不保证兼容 v5 的内部导入、接口、部署配置或浏览器数据。 +**v6 启用 Monorepo 架构,不提供 v5 原地升级。** v5 的内部导入、接口、部署配置和浏览器数据不保证兼容。 -已有项目可以继续使用 [legacy/v5](https://github.com/XiaoDaiGua-Ray/ray-template/tree/legacy/v5)(最后的 v5 主线快照 `6f095b7`,清单版本 `5.2.5`),或使用对应的 [v5.2.5 标签](https://github.com/XiaoDaiGua-Ray/ray-template/tree/v5.2.5)。采用 v6 前请先阅读[迁移说明](apps/docs/migration.md)。 +已有项目可以继续使用 [legacy/v5](https://github.com/XiaoDaiGua-Ray/ray-template/tree/legacy/v5) 或 [v5.2.5 标签](https://github.com/XiaoDaiGua-Ray/ray-template/tree/v5.2.5)。采用 v6 前请阅读[迁移说明](apps/docs/migration.md)。 ---