feat(frontend): add Front/ — Vite/React frontend with backend pipeline integration
Mirror of design_agent_front/design-agent/ for shipping alongside backend.
Vite plugin (vitePluginPhaseZApi) endpoints :
- POST /api/run — spawn `python -m src.phase_z2_pipeline` with overrides
- GET /api/sample-mdx?mdx=03/04/05 — fixed sample MDX
- GET /frame-preview/{n} — figma preview thumbnails
- GET /data/runs/{run_id}/{path} — pipeline artifacts (final.html, step*.json, ...)
Env toggle forward (보고용) :
PHASE_Z_ALLOW_RESTRUCTURE / PHASE_Z_ALLOW_REJECT / PHASE_Z_MAX_RANK=32
Components :
- LeftMdxPanel (03/04/05 fix list + section tree)
- SlideCanvas (iframe + slideOverrideCss prop for inline CSS inject)
- FramePanel (label priority + confidence sort)
- LayoutPanel
README with mermaid diagrams covering the 5-step demo flow.
node_modules / dist / .manus-logs / .env excluded via .gitignore.
This commit is contained in:
44
Front/README.md
Normal file
44
Front/README.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Design Agent Frontend
|
||||
|
||||
React + Vite + TypeScript frontend.
|
||||
|
||||
## 위치
|
||||
|
||||
- `Front/` — 이 폴더
|
||||
- 원본 작업 위치 = `D:\ad-hoc\kei\design_agent_front\design-agent\` (로컬 dev)
|
||||
|
||||
## 실행
|
||||
|
||||
```
|
||||
cd Front/
|
||||
pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
http://localhost:3000 에서 확인. `DESIGN_AGENT_ROOT` env 로 backend 경로 지정 가능.
|
||||
|
||||
## 구조
|
||||
|
||||
```
|
||||
Front/
|
||||
├── client/ React frontend (Vite root)
|
||||
│ └── src/
|
||||
│ ├── pages/
|
||||
│ ├── components/
|
||||
│ ├── services/
|
||||
│ └── ...
|
||||
├── server/ production express
|
||||
├── vite.config.ts dev plugin + backend 연결
|
||||
└── ...
|
||||
```
|
||||
|
||||
## Backend 연결 (vite.config.ts)
|
||||
|
||||
Vite dev plugin 이 다음 endpoint 등록 :
|
||||
|
||||
| Endpoint | 동작 |
|
||||
|---|---|
|
||||
| `POST /api/run` | MDX + overrides → backend pipeline spawn → run_id 반환 |
|
||||
| `GET /api/sample-mdx?mdx=...` | sample MDX serve |
|
||||
| `GET /frame-preview/{n}` | frame thumbnail |
|
||||
| `GET /data/runs/{run_id}/{path}` | pipeline 산출물 serve |
|
||||
Reference in New Issue
Block a user