FSD 아키텍처로 프로젝트 구조 리팩토링

주요 변경사항:
- FSD(Feature-Sliced Design) 아키텍처 도입
- shared 레이어 구조 생성 (ui, lib, api, model, types, config)
- 공통 UI 컴포넌트를 shared/ui로 이동 (Header, BottomNavigation, Loading, Toast)
- 라이브러리 코드를 shared/lib로 이동 (theme-provider, react-query-provider, theme)
- 모든 import 경로 업데이트하여 새로운 구조 반영
- 기존 components, lib 디렉토리 제거
- 빌드 검증 완료

향후 확장:
- widgets: 복잡한 UI 블록
- features: 기능 단위 코드
- entities: 비즈니스 엔티티

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cherry2250 2025-10-27 09:45:41 +09:00
parent ea94dc97a1
commit edcd0cd559
13 changed files with 7 additions and 61 deletions

View File

@ -15,7 +15,7 @@ import {
Payments,
People,
} from '@mui/icons-material';
import Header from '@/components/layout/Header';
import Header from '@/shared/ui/Header';
// Mock 데이터
const mockAnalyticsData = {

View File

@ -19,7 +19,7 @@ import {
Grid,
} from '@mui/material';
import { Search, FilterList } from '@mui/icons-material';
import Header from '@/components/layout/Header';
import Header from '@/shared/ui/Header';
// Mock 데이터
const mockEvents = [

View File

@ -1,5 +1,5 @@
import { Box } from '@mui/material';
import BottomNavigation from '@/components/layout/BottomNavigation';
import BottomNavigation from '@/shared/ui/BottomNavigation';
export default function MainLayout({ children }: { children: React.ReactNode }) {
return (

View File

@ -21,7 +21,7 @@ import {
Edit,
CheckCircle,
} from '@mui/icons-material';
import Header from '@/components/layout/Header';
import Header from '@/shared/ui/Header';
// Mock 사용자 데이터 (API 연동 전까지 임시 사용)
const mockUser = {

View File

@ -1,6 +1,6 @@
import type { Metadata, Viewport } from 'next';
import { MUIThemeProvider } from '@/lib/theme-provider';
import { ReactQueryProvider } from '@/lib/react-query-provider';
import { MUIThemeProvider } from '@/shared/lib/theme-provider';
import { ReactQueryProvider } from '@/shared/lib/react-query-provider';
import '@/styles/globals.css';
export const metadata: Metadata = {

View File

@ -1,54 +0,0 @@
'use client';
import { usePathname, useRouter } from 'next/navigation';
import { BottomNavigation, BottomNavigationAction, Paper } from '@mui/material';
import HomeIcon from '@mui/icons-material/Home';
import EventIcon from '@mui/icons-material/Event';
import BarChartIcon from '@mui/icons-material/BarChart';
import PersonIcon from '@mui/icons-material/Person';
export function BottomNav() {
const pathname = usePathname();
const router = useRouter();
const navItems = [
{ label: '홈', icon: <HomeIcon />, value: '/' },
{ label: '이벤트', icon: <EventIcon />, value: '/events' },
{ label: '분석', icon: <BarChartIcon />, value: '/analytics' },
{ label: '프로필', icon: <PersonIcon />, value: '/profile' },
];
const currentValue = navItems.find((item) => item.value === pathname)?.value || '/';
return (
<Paper
sx={{
position: 'fixed',
bottom: 0,
left: 0,
right: 0,
zIndex: 1100,
display: { xs: 'block', md: 'none' },
}}
elevation={3}
>
<BottomNavigation
value={currentValue}
onChange={(_, newValue) => {
router.push(newValue);
}}
showLabels
sx={{ height: 60 }}
>
{navItems.map((item) => (
<BottomNavigationAction
key={item.value}
label={item.label}
icon={item.icon}
value={item.value}
/>
))}
</BottomNavigation>
</Paper>
);
}

View File

@ -3,7 +3,7 @@
import { ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import { AppRouterCacheProvider } from '@mui/material-nextjs/v14-appRouter';
import { theme } from '@/styles/theme';
import { theme } from '@/shared/lib/theme';
import { ReactNode } from 'react';
export function MUIThemeProvider({ children }: { children: ReactNode }) {