- Remove duplicate design review file - Update frontend setup documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
79 lines
2.5 KiB
Markdown
79 lines
2.5 KiB
Markdown
# IR Deck 평가 프론트엔드 초기 설정
|
||
|
||
**날짜**: 2025-11-28
|
||
**작성자**: Claude (AI)
|
||
**관련 파일**:
|
||
- `frontend-ir-valuation/src/pages/ir-valuation.tsx`
|
||
- `nginx-infra/server-nginx-default`
|
||
- `https://git.ro-being.com/ivada_Ro-being/frontend-ir-valuation.git`
|
||
|
||
---
|
||
|
||
## 목적
|
||
Sequoia Capital IR 기준으로 IR Deck을 평가하는 프론트엔드 페이지 구축 (ChatGPT 스타일 UI).
|
||
|
||
## 구현 요약
|
||
- **스택**: Vite + React + TypeScript, TailwindCSS, wouter, @tanstack/react-query.
|
||
- **주요 기능**: PDF 업로드, 진행률·분석 상태 표시, 페이지별 강점·약점, 종합 점수·등급 (S/A/B/C).
|
||
- **SPA 라우팅** (`src/App.tsx`): base‑path `/ir-valuation` 제거 후 라우팅 처리.
|
||
|
||
```tsx
|
||
function Router() {
|
||
const [location] = useLocation();
|
||
const base = "/ir-valuation";
|
||
const normalized = (location.startsWith(base) ? location.slice(base.length) : location) || "/";
|
||
return (
|
||
<Switch location={normalized}>
|
||
<Route path="/" component={IRValuationPage} />
|
||
<Route component={() => <div>404 Not Found</div>} />
|
||
</Switch>
|
||
);
|
||
}
|
||
```
|
||
|
||
## Nginx 설정 (`nginx-infra/server-nginx-default`)
|
||
```nginx
|
||
location /ir-valuation {
|
||
alias /home/admin/frontend-ir-valuation/dist/;
|
||
try_files $uri /ir-valuation/index.html;
|
||
}
|
||
location ^~ /rb8001/ {
|
||
proxy_pass http://192.168.219.52:8001/;
|
||
proxy_set_header Host $host;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
proxy_set_header X-Forwarded-Proto $scheme;
|
||
proxy_read_timeout 300s;
|
||
proxy_connect_timeout 75s;
|
||
proxy_send_timeout 300s;
|
||
}
|
||
```
|
||
|
||
## API 사용 예시
|
||
```bash
|
||
curl -X POST http://localhost/rb8001/api/ir-deck/evaluate \
|
||
-H "Content-Type: application/json" \
|
||
-H "X-Team-Id: <team_id>" \
|
||
-H "X-User-Id: <user_id>" \
|
||
-d '{"document_id":"<id>","team_id":"<team_id>"}'
|
||
```
|
||
|
||
## 교훈
|
||
- **핵심만**: 중복·불필요한 설명 제거, 링크로 대체.
|
||
- **헤더 필수**: `X-Team-Id`, `X-User-Id` 없으면 API 동작 안 함.
|
||
- **SPA 라우팅**: Nginx base‑path와 React 라우터 일치 필요.
|
||
|
||
## 다음 작업
|
||
- 피드백 UI 구현 (`src/pages/ir-valuation.tsx`).
|
||
- 백엔드 피드백 API 연동 (`/rb8001/api/ir-deck/feedback`).
|
||
- Sequoia 10가지 기준 실제 평가 로직 구현.
|
||
|
||
---
|
||
|
||
## 체크리스트
|
||
- [ ] 핵심만 간결하게 정리
|
||
- [ ] 100줄 이하 확인 (현재 78줄)
|
||
- [ ] 교훈 섹션 포함
|
||
- [ ] 관련 파일 링크 포함
|
||
- [ ] Nginx 설정 및 SPA 라우팅 검증
|