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
43 changes: 43 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Copilot Setup Steps"

on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
env:
# 可通过 copilot 环境变量覆盖(如企业代理)
HTTP_PROXY: ${{ vars.HTTP_PROXY }}
HTTPS_PROXY: ${{ vars.HTTPS_PROXY }}
NO_PROXY: ${{ vars.NO_PROXY }}
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Verify npm domains for Codex agent networking guide
run: |
echo "Ensure outbound access for: npmjs.org, npmjs.com, registry.npmjs.com, registry.npmjs.org, skimdb.npmjs.com"
12 changes: 12 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,15 @@ All configuration files are located in the `config` directory and can be modifie
- [Biome](https://biomejs.dev/en/reference/configuration/#javascriptformatterjsxquotestyle): A Rust-based linting and formatting tool that enhances the development experience.
- [Ant Design](https://ant.design/components/overview-cn/): An out-of-the-box React component library, use version 5.x.
- [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages?tab=readme-ov-file#react-1): Provides a routing system based on conventions.

## Added Capabilities (MVP)
- Complete auth flow: login/register/refresh/logout (mock API, backend-replaceable)
- State stack upgraded to `zustand + @tanstack/react-query`
- Admin foundations: profile, role permissions, menu permissions, audit entry
- Plugin architecture: manifest, runtime registry, plugin route/menu mounting
- Third-party extension APIs: event bus, lifecycle hooks, capability registry

## Docs
- UI/UX and animation guidelines: `./docs/ui-ux-animation-guidelines.md`
- Third-party integration guide: `./docs/third-party-integration.md`
- Plugin scaffold template: `./templates/plugin`
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,15 @@
- [Biome](https://biomejs.dev/en/reference/configuration/#javascriptformatterjsxquotestyle): 一个基于Rust的代码检查和格式化工具,可以增强开发体验
- [Ant Design](https://ant.design/components/overview-cn/): 开箱即用的 React 组件库,使用版本 5.x
- [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages?tab=readme-ov-file#react-1): 基于约定的路由系统

## 新增能力(MVP)
- 登录/注册/刷新/退出完整会话流(基于 mock API,可替换真实后端)
- `zustand + @tanstack/react-query` 状态与服务端数据管理
- 基础后台页面:个人中心、角色权限、菜单权限、审计日志入口
- 插件化能力:manifest、运行时注册器、插件路由与菜单挂载
- 三方扩展接口:事件总线、生命周期 hooks、能力注册中心

## 开发文档
- UI/UX 与动效规范:`./docs/ui-ux-animation-guidelines.md`
- 三方接入指南:`./docs/third-party-integration.md`
- 插件模板:`./templates/plugin`
23 changes: 23 additions & 0 deletions docs/third-party-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 三方接入指南(MVP)

## 可用扩展点
- 事件总线:`eventBus.emit/on/off`
- 生命周期:`registerLifecycleHook` / `runLifecycleHook`
- 能力注册:`capabilityRegistry.register/get`

## 接入模式
1. 通过插件 manifest 注册菜单、路由、权限。
2. 在插件启动阶段声明 capability。
3. 通过 lifecycle 在应用关键节点注入逻辑。

## 安全建议
- 三方调用建议附带签名(timestamp + nonce + signature),推荐 `HMAC-SHA256(secret, method + path + body + timestamp + nonce)`。
- 对外接口需限流并记录审计日志。
- 默认白名单机制控制来源。


### 签名示例(伪代码)
```text
base = method + path + body + timestamp + nonce
signature = HMAC_SHA256(secret, base)
```
22 changes: 22 additions & 0 deletions docs/ui-ux-animation-guidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# UI/UX 与动效规范

## 设计 Token
- 主色:`#9d4edc`
- 信息色:`#9d4edc`
- 主题来源:`./global.config.ts`

## 页面结构模板
- 顶部:全局操作(头像、退出、主题)
- 左侧:权限驱动菜单 + 插件菜单
- 内容区:页面标题、筛选、主体卡片、空态/错误态/加载态

## 动效规范
- 页面切换时长:`0.2s`
- 基础动画:淡入 + 轻微位移
- 动画库:`framer-motion`
- 原则:动效不可阻塞业务交互;低性能设备可降级

## 可访问性
- 关键交互可键盘操作
- 颜色对比满足可读性
- 错误消息必须显式可见
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
"dependencies": {
"@ant-design/icons": "^5.3.7",
"@ant-design/plots": "^2.2.2",
"@tanstack/react-query": "^5.97.0",
"antd": "^5.17.3",
"classnames": "^2.5.1",
"dayjs": "^1.11.11",
"framer-motion": "^11.2.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^6.23.1",
"react-router-dom": "^6.23.1"
"react-router-dom": "^6.23.1",
"zustand": "^5.0.12"
},
"devDependencies": {
"@arco-plugins/vite-react": "^1.3.3",
Expand All @@ -52,6 +54,8 @@
"vite-plugin-pages": "^0.32.1"
},
"lint-staged": {
"*": ["pnpm check"]
"*": [
"pnpm check"
]
}
}
Loading
Loading