Skip to content

♻️ [Refactor] FSD 구조 적용 #3

@zero0205

Description

@zero0205

📣 리펙토링 이름

FSD 구조 적용

📣 리펙토링 목적

현재 디렉토리 구조의 문제점

1. src/components의 평면적인 구조

  • 페이지 종속 컴포넌트는 src/pages 하위에 잘 분리되어 있으나, src/components 내부 구조에 문제가 있음
  • 문제점:
    • 성격이 다른 컴포넌트들이 구분 없이 한 폴더에 섞여있음
      • 실제 재사용 컴포넌트 (ChatContainer, Header 등)
      • SVG 아이콘 컴포넌트 (Icons)
    • 컴포넌트의 역할과 책임이 불명확함

2. src/hooks의 평면적인 구조

  • 각기 다른 기능을 담당하는 훅들이 동일 레벨에 위치
    • 스트리밍 관련: useConsumer, useProducer, useMedia, useTransport
    • 인증 관련: useAuth,
    • api 관련: useAPI
    • 공통 기능: useSocket, useTheme, useToast, useIntersect
  • 관련 기능의 훅들이 분산되어 있어 코드 파악이 어려움

✅ 리펙토링 리스트

  • FSD 도입

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions