You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/
├── app/ # Next.js App Router
│ ├── (authorized)/ # 인증된 사용자 전용 라우트 그룹
│ │ ├── creator/ # 크리에이터 페이지
│ │ └── learner/ # 러너 페이지
│ ├── login/ # 로그인 페이지
│ ├── signup/ # 회원가입 페이지
│ └── _components/ # 앱 레벨 컴포넌트
│
└── shared/ # 공유 리소스 (재사용 가능)
├── components/ui/ # UI 컴포넌트 라이브러리
├── lib/ # 유틸리티 함수
├── services/ # API 서비스 레이어
│ └── [domain]/ # 도메인별 구성
│ ├── *.service.ts # API 호출 함수
│ ├── *.hook.ts # React Query 훅
│ └── *.type.ts # 타입 정의
├── stores/ # Zustand 스토어
├── providers/ # React Context Providers
└── types/ # 전역 타입 정의
라우트 그룹 전략
(authorized) - 인증 필요한 페이지 그룹화
(mypage) - 마이페이지 관련 라우트 그룹
URL에 영향을 주지 않으면서 레이아웃 공유
🎨 디자인 시스템
컬러 시스템
Primary Colors (브랜드 그린)
--color-primary-green-50:#f6fdf1--color-primary-green-100:#e8fbd9--color-primary-green-200:#d1f8b4--color-primary-green-300:#b2f381--color-primary-green-400:#9bef5b--color-primary-green-500:#7dea29/* 메인 컬러 */--color-primary-green-600:#67d215/* 버튼 기본 */--color-primary-green-700:#51a611/* 버튼 호버 */--color-primary-green-800:#3b780c--color-primary-green-900:#244a08;
시맨틱 컬러 (oklch 색상 공간 사용)
Background: 흰색 (Light) / 어두운 회색 (Dark)
Primary: 기본 버튼 및 강조 색상
Secondary: 보조 버튼
Muted: 비활성화 요소
Destructive: 삭제/경고 액션
타이포그래피
폰트: Pretendard Variable (가변 폰트)
폴백: Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic
// API 호출 로직만 담당exportconstPOST_login=async(data: LoginRequest): Promise<ApiResponse<LoginResponse>>=>{constresponse=awaitapi.post('/api/v1/auth/login',data);returnresponse.data;};
② Hook Layer (*.hook.ts)
// React Query를 사용한 상태 관리exportconstusePostLogin=()=>{returnuseMutation({mutationKey: [POST_login.name],mutationFn: (data: LoginRequest)=>POST_login(data),});};
③ Component Layer
// 비즈니스 로직 실행const{mutateAsync: postLogin}=usePostLogin();constonSubmit=async(data: LoginRequest)=>{awaitpostLogin(data).then((response)=>{// 성공 처리});};