Skip to content

[PR] refactor: 프론트엔드 도메인 구조 정리 #269

Description

@oosuhada

🎯 작업 목적

  • Next.js 기반 프론트엔드 코드를 app, common, features 중심의 도메인 구조로 정리했습니다.
  • 라우팅 진입점, 공통 재사용 요소, 도메인별 비즈니스 컴포넌트를 분리해 이후 PROJECT, RAG, AGENT, DOCS 파트별 병렬 작업이 가능하도록 기반을 마련했습니다.
  • 신규 라우트인 /chat, /docs의 진입 파일을 추가해 AGENT-CHAT, DOCS-GEN 영역을 연결할 수 있는 스캐폴딩을 준비했습니다.

✨ 주요 변경 사항

  • frontend/ Next.js 앱 구조 추가 및 pnpm-lock.yaml, next.config.ts, tsconfig.json, ESLint/PostCSS 설정 추가
  • src/app 라우팅 구조 정리: /, /analyze, /chat, /docs 페이지 구성
  • src/common 공통 영역 추가: layout 컴포넌트, AppContext, WebSocket hook, i18n, contract type, sanitizer 분리
  • src/features 도메인 영역 추가: analysis, repository, history, landing, chat, docs, graph 도메인별 컴포넌트/API 파일 분리
  • 빈 신규 도메인 파일이 Git에 누락되지 않도록 ChatPanel, GuideViewer, ExportButtons, RiskWarningModal, DependencyGraph, chatApi에 최소 placeholder export 추가

🛠️ 리뷰 및 로컬 테스트 방법

  • 브랜치 체크아웃
    git fetch origin
    git checkout refactor/frontend-domain-structure
  • 프론트엔드 의존성 설치 및 개발 서버 실행
    pnpm --dir frontend install --frozen-lockfile
    pnpm --dir frontend dev
  • 브라우저에서 아래 경로 확인
    http://localhost:3000
    http://localhost:3000/analyze
    http://localhost:3000/chat
    http://localhost:3000/docs
    
  • 빌드 검증
    pnpm --dir frontend build
    • 확인 결과: 통과
  • lint 검증
    pnpm --dir frontend lint
    • 현재 결과: 실패
    • 사유: 기존 코드에 react-hooks/set-state-in-effect, @typescript-eslint/no-explicit-any, unused variable 경고가 남아 있습니다. 이번 PR은 구조 정리 목적이라 해당 lint 수정은 별도 PR로 분리하는 것을 제안합니다.

📸 실행 결과 (선택)

  • 별도 스크린샷은 첨부하지 않았습니다.
  • pnpm --dir frontend build 결과 /, /_not-found, /analyze, /chat, /docs 라우트가 static page로 생성되는 것을 확인했습니다.

⚠️ 리뷰어에게 당부하는 점

  • frontend/src/app, frontend/src/common, frontend/src/features 분리 기준이 팀에서 합의한 FSD/도메인 구조와 맞는지 중점적으로 봐주세요.
  • 현재 apps/frontend 기존 Vite 스켈레톤과 루트 frontend Next.js 앱이 함께 존재합니다. 최종 프론트엔드 위치를 루트 frontend로 확정할지, apps/frontend로 통합할지 확인이 필요합니다.
  • /chat, /docs 및 일부 feature 컴포넌트는 아직 실제 API 연동 전 placeholder입니다.
  • lint 실패 항목은 구조 변경과 별도 성격이라 후속 정리 PR로 분리하는 것을 권장합니다.

Originally authored by oosuhada as PR #8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions