feat: React 성능 최적화 및 Vercel 배포 시스템 구축 완료
🚀 성능 최적화 (Task 8): - React.lazy를 활용한 코드 스플리팅 구현 - React.memo, useMemo, useCallback을 통한 메모이제이션 최적화 - 초기 번들 크기 87% 감소 (470kB → 62kB) - 백그라운드 동기화 간격 최적화 (5분 → 30초) 📦 Vercel 배포 인프라 구축 (Task 9): - vercel.json 배포 설정 및 보안 헤더 구성 - GitHub Actions 자동 배포 워크플로우 설정 - 환경별 배포 및 미리보기 시스템 구현 - 자동화된 배포 스크립트 및 환경 변수 관리 - 포괄적인 배포 가이드 및 체크리스트 작성 🔧 코드 품질 개선: - ESLint 주요 오류 수정 (사용하지 않는 변수/import 정리) - 테스트 커버리지 확장 (229개 테스트 통과) - TypeScript 타입 안전성 강화 - Prettier 코드 포맷팅 적용 ⚠️ 참고: 테스트 파일의 any 타입 및 일부 경고는 향후 개선 예정 🛠️ Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,23 +9,23 @@ interface AppState {
|
||||
theme: "light" | "dark" | "system";
|
||||
sidebarOpen: boolean;
|
||||
globalLoading: boolean;
|
||||
|
||||
|
||||
// 에러 처리
|
||||
globalError: string | null;
|
||||
|
||||
|
||||
// 알림 및 토스트
|
||||
notifications: Notification[];
|
||||
|
||||
|
||||
// 앱 메타데이터
|
||||
lastSyncTime: string | null;
|
||||
isOnline: boolean;
|
||||
|
||||
|
||||
// 액션
|
||||
setTheme: (theme: "light" | "dark" | "system") => void;
|
||||
setSidebarOpen: (open: boolean) => void;
|
||||
setGlobalLoading: (loading: boolean) => void;
|
||||
setGlobalError: (error: string | null) => void;
|
||||
addNotification: (notification: Omit<Notification, 'id'>) => void;
|
||||
addNotification: (notification: Omit<Notification, "id">) => void;
|
||||
removeNotification: (id: string) => void;
|
||||
clearNotifications: () => void;
|
||||
setLastSyncTime: (time: string) => void;
|
||||
@@ -46,7 +46,7 @@ interface Notification {
|
||||
|
||||
/**
|
||||
* 앱 전체 상태 스토어
|
||||
*
|
||||
*
|
||||
* 전역 UI 상태, 테마, 에러 처리, 알림 등을 관리
|
||||
*/
|
||||
export const useAppStore = create<AppState>()(
|
||||
@@ -83,7 +83,7 @@ export const useAppStore = create<AppState>()(
|
||||
},
|
||||
|
||||
// 알림 추가
|
||||
addNotification: (notificationData: Omit<Notification, 'id'>) => {
|
||||
addNotification: (notificationData: Omit<Notification, "id">) => {
|
||||
const notification: Notification = {
|
||||
...notificationData,
|
||||
id: crypto.randomUUID(),
|
||||
@@ -169,23 +169,24 @@ export const useGlobalError = () => {
|
||||
};
|
||||
|
||||
export const useNotifications = () => {
|
||||
const {
|
||||
notifications,
|
||||
addNotification,
|
||||
removeNotification,
|
||||
clearNotifications
|
||||
const {
|
||||
notifications,
|
||||
addNotification,
|
||||
removeNotification,
|
||||
clearNotifications,
|
||||
} = useAppStore();
|
||||
|
||||
return {
|
||||
notifications,
|
||||
addNotification,
|
||||
removeNotification,
|
||||
clearNotifications
|
||||
|
||||
return {
|
||||
notifications,
|
||||
addNotification,
|
||||
removeNotification,
|
||||
clearNotifications,
|
||||
};
|
||||
};
|
||||
|
||||
export const useSyncStatus = () => {
|
||||
const { lastSyncTime, setLastSyncTime, isOnline, setOnlineStatus } = useAppStore();
|
||||
const { lastSyncTime, setLastSyncTime, isOnline, setOnlineStatus } =
|
||||
useAppStore();
|
||||
return { lastSyncTime, setLastSyncTime, isOnline, setOnlineStatus };
|
||||
};
|
||||
|
||||
@@ -216,4 +217,4 @@ export const cleanupOnlineStatusListener = () => {
|
||||
onlineStatusListener();
|
||||
onlineStatusListener = null;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Zustand 스토어 통합 export
|
||||
*
|
||||
*
|
||||
* 모든 스토어와 관련 훅을 중앙에서 관리
|
||||
*/
|
||||
|
||||
@@ -49,4 +49,4 @@ export type {
|
||||
SignUpResponse,
|
||||
ResetPasswordResponse,
|
||||
AppwriteInitializationStatus,
|
||||
} from "@/contexts/auth/types";
|
||||
} from "@/contexts/auth/types";
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/**
|
||||
* Zustand 스토어 초기화 유틸리티
|
||||
*
|
||||
*
|
||||
* 앱 시작시 필요한 스토어 초기화 작업을 처리
|
||||
*/
|
||||
|
||||
import {
|
||||
useAuthStore,
|
||||
startSessionValidation,
|
||||
import {
|
||||
useAuthStore,
|
||||
startSessionValidation,
|
||||
stopSessionValidation,
|
||||
setupOnlineStatusListener,
|
||||
cleanupOnlineStatusListener
|
||||
cleanupOnlineStatusListener,
|
||||
} from "./index";
|
||||
import { authLogger } from "@/utils/logger";
|
||||
|
||||
@@ -45,9 +45,9 @@ export const cleanupStores = (): void => {
|
||||
try {
|
||||
stopSessionValidation();
|
||||
cleanupOnlineStatusListener();
|
||||
|
||||
|
||||
authLogger.info("스토어 정리 완료");
|
||||
} catch (error) {
|
||||
authLogger.error("스토어 정리 실패", error);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user