chore: 미사용 파일/의존성 정리

- HtsHeader.tsx/css 삭제 (레거시, 미사용)
- realtime/examples.py 삭제 (예제 파일, 프로덕션 미사용)
- backtest_results/ 삭제 + .gitignore 추가
- .env.bak 삭제
- requirements.txt: celery 제거 (미사용), httpx 중복 제거
- package.json: recharts 제거 (미사용)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 20:29:54 +09:00
parent f92479f3b0
commit e8ab41d164
21 changed files with 5 additions and 104021 deletions

View File

@@ -21,7 +21,6 @@
"react-chartjs-2": "^5.3.1",
"react-dom": "^18.2.0",
"react-router-dom": "^6.20.0",
"recharts": "^2.10.3",
"tailwind-merge": "^2.1.0"
},
"devDependencies": {

View File

@@ -1,123 +0,0 @@
.hts-header {
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
padding: 12px 20px;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #00ff88;
box-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}
.header-left {
display: flex;
align-items: center;
gap: 15px;
}
.header-left h1 {
margin: 0;
font-size: 20px;
font-weight: 700;
color: #00ff88;
text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}
.header-center {
flex: 1;
display: flex;
justify-content: center;
}
.hts-nav {
display: flex;
gap: 5px;
background: rgba(0, 0, 0, 0.3);
padding: 5px;
border-radius: 8px;
}
.nav-item {
padding: 8px 20px;
color: #8892b0;
text-decoration: none;
font-size: 14px;
font-weight: 500;
border-radius: 6px;
transition: all 0.3s ease;
cursor: pointer;
}
.nav-item:hover {
background: rgba(0, 255, 136, 0.1);
color: #00ff88;
}
.nav-item.active {
background: #00ff88;
color: #0a192f;
font-weight: 600;
}
.header-right {
display: flex;
align-items: center;
gap: 20px;
}
.live-indicator {
font-size: 11px;
padding: 3px 8px;
background: rgba(244, 67, 54, 0.2);
border: 1px solid #f44336;
border-radius: 3px;
}
.header-right .time {
font-size: 13px;
color: #999;
}
.mcp-status-inline {
display: flex;
align-items: center;
gap: 6px;
margin-left: 10px;
}
.status-indicator.connected {
width: 10px;
height: 10px;
background: #00ff88;
border-radius: 50%;
border: 1px solid #00ff88;
margin-right: 2px;
}
.status-indicator.disconnected {
width: 10px;
height: 10px;
background: #f44336;
border-radius: 50%;
border: 1px solid #f44336;
margin-right: 2px;
}
.mcp-indicator {
font-size: 11px;
padding: 3px 8px;
background: rgba(0, 255, 136, 0.15);
border: 1px solid #00ff88;
border-radius: 3px;
margin-left: 8px;
color: #00ff88;
font-weight: 600;
letter-spacing: 1px;
display: inline-flex;
align-items: center;
}
.mcp-indicator.offline {
background: rgba(244, 67, 54, 0.15);
border: 1px solid #f44336;
color: #f44336;
}

View File

@@ -1,122 +0,0 @@
/**
* @deprecated 이 컴포넌트는 더 이상 사용되지 않습니다.
* Layout.tsx가 메인 헤더 역할을 담당하며, App.tsx에서도 import하지 않습니다.
* 삭제 여부는 팀 확인 후 결정하세요.
*
* HtsHeader.tsx — HTS 스타일 상단 헤더 컴포넌트 (레거시)
*
* 역할:
* - 네비게이션 메뉴, MCP 연결 상태, 현재 시각 표시
* - 리스크 체크 버튼을 통한 MCP 포트폴리오 리스크 평가 요청
*/
import { useEffect, useState } from 'react'
import { Link, useLocation } from 'react-router-dom'
import { useQuery } from '@tanstack/react-query'
import api from '../lib/api'
import './HtsHeader.css'
/** 네비게이션 메뉴 항목 정의 */
const navItems = [
{ path: '/', label: '대시보드' },
{ path: '/rules', label: '트레이딩 규칙' },
{ path: '/trades', label: '거래 내역' },
{ path: '/mcp', label: 'MCP 상태' },
]
/**
* HtsHeader — HTS(홈 트레이딩 시스템) 스타일 헤더
*
* 상태(State):
* - currentTime: 1초마다 갱신되는 현재 시각 (setInterval)
*
* 쿼리:
* - mcp-status: MCP 서버 연결 상태 (5초 폴링)
*/
const HtsHeader = () => {
const location = useLocation()
// 현재 시각 — 1초 간격 갱신
const [currentTime, setCurrentTime] = useState(() => new Date())
// 1초마다 현재 시각 업데이트
useEffect(() => {
const timer = setInterval(() => {
setCurrentTime(new Date())
}, 1000)
return () => clearInterval(timer)
}, [])
// MCP 서버 연결 상태 가져오기 (5초 폴링)
const { data: mcpStatus } = useQuery({
queryKey: ['mcp-status'],
queryFn: async () => (await api.get('/mcp/status')).data,
refetchInterval: 5000,
})
/**
* 리스크 체크 핸들러
* MCP 서버에 RISK_ASSESSMENT 분석을 요청하고 결과를 alert로 표시
*/
const handleRiskCheck = async () => {
try {
const response = await api.post('/mcp/analyze', {
analysis_type: 'RISK_ASSESSMENT',
data: { message: '현재 포트폴리오 리스크를 분석해주세요' }
});
const result = response.data;
alert(`포트폴리오 리스크 평가:\n\n${result.analysis || result.result}`);
} catch (error) {
console.error('리스크 평가 실패:', error);
alert('리스크 평가에 실패했습니다. MCP 서버를 확인해주세요.');
}
}
return (
<div className="hts-header">
<div className="header-left">
<h1>📊 Auto Stock Trading Dashboard</h1>
</div>
<div className="header-center">
<nav className="hts-nav">
{navItems.map((item) => (
<Link
key={item.path}
to={item.path}
className={`nav-item ${location.pathname === item.path ? 'active' : ''}`}
>
{item.label}
</Link>
))}
</nav>
</div>
<div className="header-right">
{/* MCP 상태 표시 */}
<span className={`mcp-indicator ${mcpStatus?.status === 'connected' ? 'live' : 'offline'}`}>
{mcpStatus?.status === 'connected' ? '🟢 MCP LIVE' : '⚫ MCP'}
</span>
<span className="live-indicator" style={{ marginLeft: '8px' }}>🔴 LIVE</span>
<button
onClick={handleRiskCheck}
style={{
marginLeft: '16px',
padding: '6px 12px',
background: '#f59e0b',
color: '#fff',
border: 'none',
borderRadius: '4px',
cursor: 'pointer',
fontSize: '12px',
fontWeight: '600'
}}
onMouseOver={(e) => e.currentTarget.style.background = '#d97706'}
onMouseOut={(e) => e.currentTarget.style.background = '#f59e0b'}
>
⚠️ 리스크 체크
</button>
<span className="time" style={{ marginLeft: '16px' }}>{currentTime.toLocaleTimeString('ko-KR')}</span>
</div>
</div>
)
}
export default HtsHeader