From 1b02190ab10cafe814cb81c8a4c1a71b28ef0031 Mon Sep 17 00:00:00 2001 From: Mayne0213 Date: Sat, 6 Dec 2025 22:07:17 +0900 Subject: [PATCH] REFACTOR(config): change env path - Change environment path - Update configuration --- deploy/k8s/overlays/dev/kustomization.yaml | 2 +- deploy/k8s/overlays/prod/kustomization.yaml | 3 +- services/nextjs/.gitignore | 41 ------ services/nextjs/README.md | 146 -------------------- services/nextjs/next.config.ts | 6 +- services/nextjs/package-lock.json | 22 ++- services/nextjs/package.json | 1 + 7 files changed, 26 insertions(+), 195 deletions(-) delete mode 100644 services/nextjs/.gitignore delete mode 100644 services/nextjs/README.md diff --git a/deploy/k8s/overlays/dev/kustomization.yaml b/deploy/k8s/overlays/dev/kustomization.yaml index 7ab0065..9f2d6d5 100644 --- a/deploy/k8s/overlays/dev/kustomization.yaml +++ b/deploy/k8s/overlays/dev/kustomization.yaml @@ -15,7 +15,7 @@ commonLabels: # 이미지 태그 설정 images: - name: ghcr.io/mayne0213/todo - newTag: develop-sha-c79cab1655c527f7bb309f1678de8a2326687def + newTag: develop-sha-0e382c41edf46e7cbba7ba281af165f84d7cd8d0 patchesStrategicMerge: - deployment-patch.yaml diff --git a/deploy/k8s/overlays/prod/kustomization.yaml b/deploy/k8s/overlays/prod/kustomization.yaml index e06b9a3..fcf685e 100644 --- a/deploy/k8s/overlays/prod/kustomization.yaml +++ b/deploy/k8s/overlays/prod/kustomization.yaml @@ -17,5 +17,4 @@ images: newTag: main-sha-a7d7b29486e273e8e0c3d39ad9247703b70e9234 patchesStrategicMerge: - - deployment-patch.yaml - + - deployment-patch.yaml \ No newline at end of file diff --git a/services/nextjs/.gitignore b/services/nextjs/.gitignore deleted file mode 100644 index d08ad59..0000000 --- a/services/nextjs/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# env files (can opt-in for committing if needed) -.env* - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts \ No newline at end of file diff --git a/services/nextjs/README.md b/services/nextjs/README.md deleted file mode 100644 index 7061bea..0000000 --- a/services/nextjs/README.md +++ /dev/null @@ -1,146 +0,0 @@ -# Todo App - Pool-C 세미나 - -대학생을 위한 웹 개발 세미나에서 제작된 Todo 애플리케이션입니다. - -## 📚 세미나 소개 - -이 프로젝트는 풀씨 동아리 분들과 함께 진행된 웹 개발 세미나의 실습 프로젝트입니다. -웹 개발의 핵심 개념과 최신 기술 스택을 공부하기 위해 제작되었습니다. - -### 학습 목표 - -- Feature-Sliced Design (FSD) 아키텍처 이해 -- Next.js와 React의 최신 기능 활용 -- TypeScript를 통한 타입 안전성 확보 -- 상태 관리 라이브러리 (Zustand) 사용법 -- 모던 CSS 프레임워크 (Tailwind CSS) 활용 - -## ✨ 주요 기능 - -- ✅ Todo 항목 추가, 완료, 삭제 -- 🔍 실시간 검색 기능 -- 🏷️ 상태별 필터링 (전체/활성/완료) -- 💾 로컬 스토리지를 통한 데이터 영구 저장 -- 📱 반응형 디자인 - -## 🛠️ 기술 스택 - -- **Framework**: [Next.js 15](https://nextjs.org/) (App Router) -- **Language**: TypeScript -- **State Management**: [Zustand](https://zustand-demo.pmnd.rs/) -- **Styling**: [Tailwind CSS](https://tailwindcss.com/) -- **UI Components**: [shadcn/ui](https://ui.shadcn.com/) -- **Architecture**: [Feature-Sliced Design (FSD)](https://feature-sliced.design/) - -## 📁 프로젝트 구조 - -``` -src/ -├── app/ # Next.js App Router -├── entities/ # 비즈니스 엔티티 -│ └── todo/ -│ ├── model/ # 상태 관리 (Zustand) -│ └── ui/ # Todo 컴포넌트 -├── features/ # 기능 모듈 -│ ├── todo-create/ # Todo 생성 기능 -│ ├── todo-filter/ # 필터링 기능 -│ └── todo-search/ # 검색 기능 -├── shared/ # 공유 리소스 -│ └── ui/ # 재사용 가능한 UI 컴포넌트 -└── widgets/ # 복합 컴포넌트 - └── todo-app/ # Todo 앱 위젯 -``` - -## 🚀 시작하기 - -### 설치 - -```bash -npm install -``` - -### 개발 서버 실행 - -```bash -npm run dev -``` - -브라우저에서 [http://localhost:3000](http://localhost:3000)을 열어 확인하세요. - -### 빌드 - -```bash -npm run build -``` - -### 프로덕션 실행 - -```bash -npm start -``` - -## 🎯 Feature-Sliced Design (FSD) - -이 프로젝트는 FSD 아키텍처 원칙을 따릅니다: - -- **Layers**: app → widgets → features → entities → shared -- **Slices**: 비즈니스 도메인별로 구분 -- **Segments**: ui, model, api 등으로 구성 - -### FSD의 장점 - -- 높은 모듈성과 재사용성 -- 명확한 의존성 방향 (단방향) -- 쉬운 확장성과 유지보수 -- 팀 협업에 최적화 - -## 📝 주요 컴포넌트 - -### Entities -- `todo/model/store.ts`: Zustand 기반 상태 관리 -- `todo/ui/TodoItem.tsx`: 개별 Todo 아이템 -- `todo/ui/TodoList.tsx`: Todo 리스트 - -### Features -- `todo-create`: Todo 생성 폼 -- `todo-filter`: 상태 필터 (All/Active/Completed) -- `todo-search`: 검색 입력 - -### Widgets -- `todo-app`: 전체 Todo 앱을 통합하는 위젯 - -## 🎨 UI/UX - -- Tailwind CSS를 사용한 모던한 디자인 -- shadcn/ui 컴포넌트로 일관된 UI -- 반응형 레이아웃 -- 부드러운 애니메이션 효과 - -## 📦 주요 의존성 - -```json -{ - "next": "^15.1.4", - "react": "^19.0.0", - "zustand": "^5.0.2", - "tailwindcss": "^3.4.17", - "typescript": "^5" -} -``` - -## 💡 세미나 참가자를 위한 팁 - -1. **FSD 아키텍처 구조 파악하기**: `src` 폴더의 계층 구조를 먼저 이해하세요 -2. **상태 관리 흐름 추적하기**: `src/entities/todo/model/store.ts`에서 Zustand 패턴을 학습하세요 -3. **컴포넌트 재사용성 고려하기**: `shared/ui` 폴더의 공통 컴포넌트들을 참고하세요 -4. **TypeScript 타입 정의 활용하기**: 각 모듈의 `types.ts` 파일을 확인하세요 - -## 🔗 참고 링크 - -- [Next.js Documentation](https://nextjs.org/docs) -- [Feature-Sliced Design](https://feature-sliced.design/) -- [Zustand Documentation](https://zustand-demo.pmnd.rs/) -- [Tailwind CSS](https://tailwindcss.com/docs) -- [shadcn/ui](https://ui.shadcn.com/) - ---- \ No newline at end of file diff --git a/services/nextjs/next.config.ts b/services/nextjs/next.config.ts index f70ce7d..eedae26 100644 --- a/services/nextjs/next.config.ts +++ b/services/nextjs/next.config.ts @@ -1,7 +1,11 @@ import type { NextConfig } from "next"; +import { config } from "dotenv"; +import { resolve } from "path"; + +// Load .env file from the parent directory (todo folder) +config({ path: resolve(__dirname, "../../.env") }); const nextConfig: NextConfig = { - // Enable standalone output for Docker output: 'standalone', }; diff --git a/services/nextjs/package-lock.json b/services/nextjs/package-lock.json index 8ce6ddd..2876c86 100644 --- a/services/nextjs/package-lock.json +++ b/services/nextjs/package-lock.json @@ -14,6 +14,7 @@ "@radix-ui/react-slot": "^1.2.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "dotenv": "^17.2.3", "lucide-react": "^0.544.0", "next": "15.5.4", "react": "19.1.0", @@ -2745,6 +2746,19 @@ } } }, + "node_modules/c12/node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "devOptional": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/call-bind": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", @@ -3114,10 +3128,10 @@ } }, "node_modules/dotenv": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", - "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", - "devOptional": true, + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, diff --git a/services/nextjs/package.json b/services/nextjs/package.json index 7022074..fea9e1b 100644 --- a/services/nextjs/package.json +++ b/services/nextjs/package.json @@ -15,6 +15,7 @@ "@radix-ui/react-slot": "^1.2.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "dotenv": "^17.2.3", "lucide-react": "^0.544.0", "next": "15.5.4", "react": "19.1.0",