用于搭建fdulaser课题组的workspace前端
- TypeScript 84.7%
- Shell 8.9%
- Python 6.1%
- JavaScript 0.2%
| 文件名 | 最新提交消息 | 最新提交日期 |
|---|---|---|
- Add .env.local.example with placeholder configuration - Add docs/deployment/lan-candidate-env-local-guide.md - Add scripts/lan_proxy.py — Python reverse proxy (/ → frontend, /api → BFF) - Add scripts/lan-stack.sh — orchestration with start/status/test/stop/clean - Add scripts/test_lan_stack.py — 10 fault/mutation tests - Proxy binds only to user-configured LAN IP (0.0.0.0 rejected) - BFF and frontend default to 127.0.0.1 loopback - Log sanitization (real IPs replaced with <LAN_IP>) - Stale PID recovery, port conflict detection - HTTPS support (fail-closed if cert missing) - 12-point verification test suite passes Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
| docs | ||
| e2e | ||
| integration/backend-f2-bundle | ||
| open_project_files | ||
| prompts | ||
| scripts | ||
| src | ||
| .env.candidate.example | ||
| .env.example | ||
| .env.local.example | ||
| .gitignore | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| postcss.config.cjs | ||
| prettier.config.js | ||
| PROJECT_START_PROMPT.md | ||
| README.md | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
Workplace — 激光核物理科研工作台
⚠️ 前端演示版本:当前为 F0/F1 工程骨架与 Application Shell 阶段,使用 mock 数据。
技术栈
- React 19 + TypeScript 5.7 (strict)
- Vite 6.2
- Mantine v7
- TanStack Router + TanStack Query
- Zod
- Vitest + React Testing Library + Playwright
启动
npm install
npm run dev # 开发服务器 http://127.0.0.1:5173
测试
npm run lint # ESLint
npm run typecheck # TypeScript
npm test # 单元/组件测试
npm run build # 生产构建
项目结构
src/
app/router/ # 路由与 AppShell
app/providers/ # AuthProvider, AgentSidebarProvider
pages/ # 页面组件
features/ # 功能模块
components/ # 共享组件
contracts/ # Zod schemas + TS 类型
api/mocks/ # Mock fixtures + adapter
theme/tokens/ # Design tokens
角色演示
登录页可选择三种角色:
system_owner— 系统所有者,可访问管理员和所有权转交原型administrator— 管理员,可访问管理员页面但无转交能力research_user— 科研用户,基础科研功能
当前范围
- ✅ F0: 工程骨架、契约、测试基础设施
- ✅ F1: Application Shell、浅色橙白主题、全局 Agent 栏、页面骨架
- ⏳ F2: 账户与项目完整 UI(待后端契约冻结)
- ⏳ F3: 科研主闭环(待后端契约冻结)
- ⏳ F4: 真实后端联调(待后端提供 BFF)
Mock / 真实后端边界
所有 API 当前使用 mock adapter。后端 Workplace BFF 冻结后,通过 adapter 层替换为真实 API client,无需修改组件。