-
Notifications
You must be signed in to change notification settings - Fork 18
[김원] Sprint 12 #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
The head ref may contain hidden characters: "Next-\uAE40\uC6D0"
Merged
[김원] Sprint 12 #186
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
d57cf88
[Refactor] 회원가입, 로그인 로직 수정
cccwon2 e770fb6
[Feat] zod, react-query 추가
cccwon2 686528d
[Chore] react-hook-form zod 스키마를 연결해주는 resolver 추가
cccwon2 e908572
[Refactor] react query 적용하는 중
cccwon2 f0142af
[Refactor] 리팩토링 중
cccwon2 3411baf
[Refactor] middleware, 로그인 및 회원가입 페이지 폴더 변경
cccwon2 e7952ef
[Refactor] 게시글 관련 리팩토링
cccwon2 528adce
[Refactor] comment 관련 컴포넌트에 useComment 훅 적용
cccwon2 ee89cce
[Refactor] ItemDetailSection 에 useProduct 훅 적용
cccwon2 c7c3eb5
[Refactor] 나머지 부분 리팩토링
cccwon2 8306df7
[Refactor] auth 관련 수정
cccwon2 16fd666
[Refactor] auth 관련 파일 및 middleware 수정
cccwon2 643b09f
[Fix] 루트 경로에 남아있는 pages 폴더 삭제
cccwon2 aa3c9ba
[Fix] 로그인, 로그아웃 버그 수정
cccwon2 929d80c
[Docs] README.md 수정
cccwon2 d2f0c67
[Chore] header logout 관련 에러 수정
cccwon2 9d9b52e
[Refactor] 게시글 목록 수정
cccwon2 4a68388
[Feat] comments, products 리스트, 상세 API 추가
cccwon2 4663763
[Refactor] Comment 관련 수정
cccwon2 834238a
[Refactor] login 페이지 수정
cccwon2 e65bbc4
[Refactor] Signup 페이지 수정
cccwon2 810049e
[Refactor] 상품 페이지 관련 수정
cccwon2 e643b44
[Chore] 사용하지 않는 import 제거
cccwon2 06e9573
[Fix] 생략된 interface 추가 및 적용
cccwon2 cdccf91
[Chore] 상품 등록하기 버튼 추가
cccwon2 c610acb
[Feat] 개발 모드에서 react-query-devtools 적용
cccwon2 ece1af2
[Feat] useUser 훅 추가, 새로고침시 refreshToken 으로 사용자 정보 갱신
cccwon2 761bd69
[Fix] 게시글 좋아요 버그 수정, CSS 수정
cccwon2 9aaf4f7
[Refactor] 이미지 프록시 관련 및 API 구조 변경
cccwon2 36cd949
[Feat] 상품 및 게시글 수정/삭제 기능 추가
cccwon2 9a2236a
[Feat] 상품 및 게시글 댓글 수정/삭제 기능 추가
cccwon2 018fbf0
[Chore] 필요없는 라이브러리 제거 및 README.md 수정
cccwon2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,78 +1,159 @@ | ||
| # FE9 Weekly Mission | ||
| # FE9 Sprint Mission | ||
|
|
||
| 이 프로젝트는 [Next.js](https://nextjs.org)를 기반으로 만들어진 주간 미션 프로젝트입니다. | ||
| ## 소개 | ||
|
|
||
| ## 배포 사이트 | ||
| 이 프로젝트는 Next.js Page Router 기반의 커뮤니티 및 중고마켓 플랫폼입니다. 사용자들은 게시글을 작성하고, 상품을 등록하며, 댓글과 좋아요 기능을 통해 상호작용할 수 있습니다. | ||
|
|
||
| 프로젝트는 다음 URL에서 확인할 수 있습니다: [https://next-panda-market.vercel.app](https://next-panda-market.vercel.app) | ||
| ## 주요 기능 | ||
|
|
||
| ## 시작하기 | ||
| ### 커뮤니티 | ||
|
|
||
| 먼저, 개발 서버를 실행하세요: | ||
| - 게시글 CRUD | ||
| - 댓글 시스템 | ||
| - 좋아요 기능 | ||
| - 베스트 게시글 | ||
| - 실시간 검색 | ||
| - 정렬 기능 (최신순/인기순) | ||
|
|
||
| ### 중고마켓 | ||
|
|
||
| - 상품 등록/수정/삭제 | ||
| - 상품 문의 | ||
| - 찜하기 기능 | ||
| - 베스트 상품 | ||
| - 검색 및 정렬 | ||
|
|
||
| ## 기술 스택 | ||
|
|
||
| ### 핵심 의존성 | ||
|
|
||
| [](https://nextjs.org/) | ||
| [](https://reactjs.org/) | ||
| [](https://www.typescriptlang.org/) | ||
| [](https://tailwindcss.com/) | ||
|
|
||
| ### 상태 관리 & API | ||
|
|
||
| [](https://tanstack.com/query) | ||
| [](https://jotai.org/) | ||
| [](https://axios-http.com/) | ||
|
|
||
| ### 폼 & 유효성 검증 | ||
|
|
||
| [](https://react-hook-form.com/) | ||
| [](https://github.com/react-hook-form/resolvers) | ||
| [](https://zod.dev/) | ||
|
|
||
| ### UI/UX | ||
|
|
||
| [](https://react-hot-toast.com/) | ||
| [](https://www.davidhu.io/react-spinners/) | ||
| [](https://github.com/dcastil/tailwind-merge) | ||
|
|
||
| ### 유틸리티 | ||
|
|
||
| [](https://sharp.pixelplumbing.com/) | ||
| [](https://date-fns.org/) | ||
| [](https://github.com/form-data/form-data) | ||
| [](https://github.com/node-formidable/formidable) | ||
|
|
||
| ## 프로젝트 설정 | ||
|
|
||
| ### 환경 설정 | ||
|
|
||
| 1. 의존성 설치: | ||
|
|
||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| 2. 개발 서버 실행: | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| # 또는 | ||
| yarn dev | ||
| # 또는 | ||
| pnpm dev | ||
| ``` | ||
|
|
||
| 브라우저에서 [http://localhost:3000](http://localhost:3000)을 열어 결과를 확인하세요. | ||
| 3. 프로덕션 빌드: | ||
|
|
||
| ```bash | ||
| npm run build | ||
| ``` | ||
|
|
||
| 4. 프로덕션 서버 실행: | ||
|
|
||
| ```bash | ||
| npm run start | ||
| ``` | ||
|
|
||
| ## 사용된 기술 스택 | ||
| ### 주요 설정 파일 | ||
|
|
||
| - [Next.js](https://nextjs.org/) - React 기반의 웹 애플리케이션 프레임워크 | ||
| - [React](https://reactjs.org/) - UI 구축을 위한 라이브러리 | ||
| - [TypeScript](https://www.typescriptlang.org/) - JavaScript의 정적 타입 검사 확장 | ||
| - [Tailwind CSS](https://tailwindcss.com/) - 유틸리티-퍼스트 CSS 프레임워크 | ||
| - [Jotai](https://jotai.org/) - React 상태 관리 라이브러리 | ||
| #### TailwindCSS (tailwind.config.ts) | ||
|
|
||
| ## 주요 의존성 | ||
| - 커스텀 색상 및 스페이싱 | ||
| - Pretendard 폰트 설정 | ||
| - 반응형 디자인 지원 | ||
|
|
||
| - next: 14.2.12 | ||
| - react: ^18 | ||
| - react-dom: ^18 | ||
| - axios: ^1.7.7 | ||
| - date-fns: ^4.1.0 | ||
| - jotai: ^2.10.0 | ||
| - js-cookie: ^3.0.5 | ||
| - react-hook-form: ^7.53.0 | ||
| - react-router-dom: ^6.26.2 | ||
| - react-spinners: ^0.14.1 | ||
| - sharp: ^0.33.5 | ||
| - tailwind-merge: ^2.5.2 | ||
| #### Next.js (next.config.mjs) | ||
|
|
||
| ## 개발 의존성 | ||
| - 이미지 최적화 설정 | ||
| - SVG 파일 처리 | ||
| - Node.js 모듈 설정 | ||
|
|
||
| #### TypeScript (tsconfig.json) | ||
|
|
||
| - 엄격한 타입 검사 | ||
| - 절대 경로 설정 | ||
| - Next.js 타입 지원 | ||
|
|
||
| ### 미들웨어 | ||
|
|
||
| - 인증 보호 | ||
| - API 라우트 보호 | ||
| - 이미지 프록시 처리 | ||
|
|
||
| ## 폴더 구조 | ||
|
|
||
| ``` | ||
| src/ | ||
| ├── components/ | ||
| │ ├── Layout/ | ||
| │ ├── UI/ | ||
| │ │ ├── community/ | ||
| │ │ ├── item/ | ||
| │ │ └── comment/ | ||
| ├── hooks/ | ||
| ├── pages/ | ||
| ├── store/ | ||
| ├── types/ | ||
| └── utils/ | ||
| ``` | ||
|
|
||
| - typescript: ^5 | ||
| - eslint: ^8 | ||
| - eslint-config-next: 14.2.12 | ||
| - autoprefixer: ^10.4.20 | ||
| - postcss: ^8.4.47 | ||
| - tailwindcss: ^3.4.13 | ||
| ## 개발 가이드 | ||
|
|
||
| ## 스크립트 | ||
| ### 컴포넌트 작성 | ||
|
|
||
| - `npm run dev`: 개발 서버 실행 | ||
| - `npm run build`: 프로덕션 빌드 | ||
| - `npm run start`: 프로덕션 모드로 서버 실행 | ||
| - `npm run lint`: 린트 검사 실행 | ||
| - `npm run clean`: 빌드 폴더 삭제 | ||
| - 재사용 가능한 UI 컴포넌트는 `components/UI` 폴더에 위치 | ||
| - 레이아웃 관련 컴포넌트는 `components/Layout` 폴더에 위치 | ||
| - Props 타입은 명시적으로 정의 | ||
|
|
||
| ## Tailwind CSS 설정 | ||
| ### 상태 관리 | ||
|
|
||
| Tailwind CSS는 커스텀 테마를 지원하며, 설정은 `tailwind.config.ts` 파일에서 관리됩니다. | ||
| - 전역 상태는 Jotai 사용 | ||
| - 서버 상태는 React Query 사용 | ||
| - 폼 상태는 React Hook Form 사용 | ||
|
|
||
| ## Webpack 설정 | ||
| ### 스타일링 | ||
|
|
||
| SVG 파일 처리를 위해 `@svgr/webpack`을 사용하며, 특정 Node.js 모듈(`fs`, `path`, `os`)은 브라우저에서 비활성화되어 있습니다. | ||
| - TailwindCSS 클래스 사용 | ||
| - 반응형 디자인 적용 | ||
| - tailwind-merge로 클래스 충돌 방지 | ||
|
|
||
| ## 더 알아보기 | ||
| ### 참고 문서 | ||
|
|
||
| - [Next.js 문서](https://nextjs.org/docs) - 기능과 API에 대해 알아보세요. | ||
| - [Next.js 학습](https://nextjs.org/learn) - 대화형 튜토리얼 체험. | ||
| - [Next.js 문서](https://nextjs.org/docs) | ||
| - [React 문서](https://reactjs.org/) | ||
| - [TailwindCSS 문서](https://tailwindcss.com/) | ||
|
|
||
| ## 배포 | ||
|
|
||
| Next.js 앱을 배포하는 가장 쉬운 방법은 [Vercel 플랫폼](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme)을 사용하는 것입니다. | ||
| 이 프로젝트는 [Vercel Platform](https://vercel.com)을 통해 쉽게 배포할 수 있습니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
미들웨어로 인가를 처리하셨군요 👍