Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
158b2ef
refac: component index - forwardRef제거, 타입 적용
Yuyeol Aug 11, 2025
e4deedd
refac: 기본 상태 타입 정의
Yuyeol Aug 11, 2025
2d10c7d
refac: api response 타입 정의
Yuyeol Aug 11, 2025
37ce496
refac: 기타 타입 관련 수정 + ts setting
Yuyeol Aug 11, 2025
2d3d646
refac: shared - ui 분리
Yuyeol Aug 11, 2025
0c6a16f
refac: shared - api 분리
Yuyeol Aug 11, 2025
b86ff5f
refac: shared - lib 분리
Yuyeol Aug 11, 2025
d97abc3
refac: shared - types 분리
Yuyeol Aug 11, 2025
3ff6ccf
refac: shared - ui 세부 분리
Yuyeol Aug 11, 2025
7e8f4be
refac: entity - shared의 api 로직 이동
Yuyeol Aug 11, 2025
edc614e
refac: entity - shared의 types 이동
Yuyeol Aug 11, 2025
b607ee6
refac: widget - shared의 header, footer 이동
Yuyeol Aug 11, 2025
95fc7e7
refac: widget - PostTable 분리
Yuyeol Aug 11, 2025
ffa4f5a
refac: widget - PostFilter 분리
Yuyeol Aug 11, 2025
2fb0b61
refac: widget - PostDetailDialog 분리
Yuyeol Aug 11, 2025
92c477b
refac: widget - Pagination 분리
Yuyeol Aug 11, 2025
30095ca
refac: widget - UserModal 분리
Yuyeol Aug 11, 2025
80a5f9c
refac: widget - dialog 분리
Yuyeol Aug 11, 2025
3e8a1d0
chore: 절대경로(+별칭) 설정
Yuyeol Aug 11, 2025
a9f7fdd
refac: 사용하지 않는 파일, import 제거
Yuyeol Aug 12, 2025
d5f6dc6
refac: 분리된 util - 컴포넌트에 사용
Yuyeol Aug 12, 2025
057dd81
docs: claude.md 추가
Yuyeol Aug 12, 2025
9de802a
feat: react-query 세팅
Yuyeol Aug 12, 2025
a28e43c
feat: react-query - post entity useQuery wrapping hook 추가
Yuyeol Aug 12, 2025
20aed7f
feat: react-query - post entity useGetTags 적용
Yuyeol Aug 12, 2025
6753681
feat: react-query - post entity 전체, post에 관련된 user entity useQuery 적용
Yuyeol Aug 12, 2025
aa65861
feat: react-query - post entity useMutation wrapping hook 추가
Yuyeol Aug 12, 2025
bfa15ac
feat: react-query - post entity useMutation 컴포넌트에 적용
Yuyeol Aug 12, 2025
d74ad0c
feat: react-query - post entity useMutation optimistic 적용
Yuyeol Aug 12, 2025
a4bdbbb
feat: react-query - user entity useGetUser 연결
Yuyeol Aug 12, 2025
69b6c8a
feat: react-query - comment entity 전체 훅 생성 및 연결
Yuyeol Aug 12, 2025
ae1e530
feat: react-query - comment entity useMutation optimistic 적용
Yuyeol Aug 12, 2025
304ac61
fix: 태그 적용 시 페이지네이션이 정상적으로 동작하지 않는 이슈 수정
Yuyeol Aug 12, 2025
787e7cb
fix: asc/desc 동작하지 않는 버그 수정
Yuyeol Aug 12, 2025
548b64c
fix: params 관련 기본값 처리 변경
Yuyeol Aug 12, 2025
889a7c3
refac: 불필요한 param 가공 로직 컴포넌트와 통합
Yuyeol Aug 12, 2025
40af0a3
refac: react-query - 필요한 컴포넌트이 직접 react-query 훅사용, 드릴링 제거
Yuyeol Aug 12, 2025
78babe0
refac: searchParam 단일소스화(useState 초기화 제거)
Yuyeol Aug 12, 2025
6e487c5
fix: 새 게시물 id 결정로직 수정
Yuyeol Aug 12, 2025
1471eea
refac: feature - add/edit post 분리
Yuyeol Aug 12, 2025
1af4336
docs: feature 분리 고민 메모
Yuyeol Aug 13, 2025
7a1dadc
refac: widget 파일명 일관화
Yuyeol Aug 13, 2025
34d3e1c
refac: feature - add/edit comment 분리
Yuyeol Aug 13, 2025
59b3fe1
docs: feature 분리 기준표 업데이트
Yuyeol Aug 13, 2025
f16d026
refac: widget - postTable, pagination 병합, 서치파람 훅 분리
Yuyeol Aug 13, 2025
7b5de1c
refac: feature - remove post 분리
Yuyeol Aug 13, 2025
7ddf76a
refac: feature - like, remove comment 추가
Yuyeol Aug 13, 2025
d8cef5b
refac: feature - 기준관련 정리 갱신
Yuyeol Aug 13, 2025
779bc80
refac: widgets - postDetailDailog 사용 변수명 변경
Yuyeol Aug 13, 2025
43e6e0a
refac: 마이너한 로직 수정
Yuyeol Aug 13, 2025
9b79508
refac: feature type file 통합
Yuyeol Aug 13, 2025
34cfeb3
refac: 파일경로 재설정
Yuyeol Aug 14, 2025
98c231b
refac: widget - fsd에 맞게 구조 재설정
Yuyeol Aug 14, 2025
5bdf81e
refac: widget - zustand post-form-dialog 제어
Yuyeol Aug 14, 2025
683401b
refac: widget - zustand comment-form-dialog 제어, store slice 분리
Yuyeol Aug 14, 2025
8ef191e
refac: widget - zustand user-dialog 제어
Yuyeol Aug 14, 2025
1023b6b
refac: widget - zustand post-detail-dialog 제어
Yuyeol Aug 14, 2025
ba9dd2f
refac: pages - 불필요한 드릴링 제거
Yuyeol Aug 14, 2025
2a6f9a6
refac: widgets - post-manager-hearder 분리
Yuyeol Aug 14, 2025
c9b9334
chore: setting deploy workflows
Yuyeol Aug 14, 2025
8edf753
fix: selectedPost가 없을 경우 api 호출 처리 수정
Yuyeol Aug 14, 2025
f8c0cbd
refac: feature - app에서 스토어 로직 이동
Yuyeol Aug 14, 2025
53a395f
feat: tanstack devtools 추가
Yuyeol Aug 14, 2025
9a8f66e
refac: widget - feature에서 userDialog 위치 이동
Yuyeol Aug 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Deploy to GitHub Pages

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# GitHub Pages 권한 설정
permissions:
contents: read
pages: write
id-token: write

# 동시 배포 방지
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# 빌드 잡
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm lint

- name: Build
run: pnpm build
env:
# GitHub Pages 하위 경로를 위한 base 설정
VITE_BASE_URL: /${{ github.event.repository.name }}/

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist

# 배포 잡 (main 브랜치에서만)
deploy:
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
99 changes: 99 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

- 당신은 10년차 웹개발자로, 프론트엔드, 백엔드, 인프라 등 웹개발 전반에대한 경험과 자식을 갖추고있습니다.
- 주저하지말고, 최선을 다해서 코딩 선생님의 역할을 수행하세요.
- 모든 질문에 대해 한국어로 답변하세요.
- 다른 곳에서 정보를 찾아보라고 제안하지 마세요.
- 복잡한 문제나 작업을 작은 단위로 나누어 각각의 단계를 논리적으로 설명하세요.
- 질문이 불명확하거나 모호한 경우, 답변하기 전에 정확한 이해를 위해 추가 설명을 요청하세요.
- 답변 생성 과정 중 더 나은 답변이 떠올랐을 때에는, 답변이 기존 답변의 부족함을 인정하고 개선된 답변을 제시해주세요.
- 주석을 달아달라고 요청할 때에만 간결하게 주석을 추가하세요.
- pnpm dev, pnpm build는 정말 필요할때만 허락을 구하고 사용하도록 하세요.
- 불필요한 토큰 소모를 방지하고 간결한 연산과 답변을 제공하세요.
- [important]작업을 수행하기 전에 먼저 문제의 단계를 나눠서 제시하고, 단계별 수정요청을 받았을때 코드수정을 진행하세요.

## Project Overview

This is a React TypeScript project implementing a post management admin interface using Feature-Sliced Design (FSD) architecture. The project demonstrates modern frontend development practices with focus on clean architecture, TypeScript safety, and component separation.

## Development Commands

- `pnpm dev` - Start development server
- `pnpm build` - Build for production (runs TypeScript check + Vite build)
- `pnpm lint` - Run ESLint
- `pnpm test` - Run Vitest tests in watch mode
- `pnpm coverage` - Run tests with coverage report
- `pnpm preview` - Preview production build

## Architecture

### FSD (Feature-Sliced Design) Structure

The codebase follows FSD methodology with clear layer separation:

```
src/
├── app/ # Application layer (App.tsx, main.tsx)
├── pages/ # Pages layer (route components)
├── widgets/ # Widget layer (complex UI blocks)
├── features/ # Features layer (user interactions)
├── entities/ # Entities layer (business entities)
└── shared/ # Shared layer (reusable code)
```

### Layer Responsibilities

- **entities/**: Business logic entities (post, user, comment) with their models, APIs, and types
- **widgets/**: Composite UI components that combine multiple features (PostTable, PostFilters, etc.)
- **shared/**: Reusable UI components, utilities, and types
- **pages/**: Route-level components that compose widgets

### Import Rules

Use path aliases defined in vite.config.ts:

- `@/` - src root
- `@pages/` - pages layer
- `@features/` - features layer (when added)
- `@widgets/` - widgets layer
- `@entities/` - entities layer
- `@shared/` - shared layer

### Key Technologies

- **React 19** with TypeScript
- **Vite** for build tooling
- **Vitest** for testing
- **React Router** for navigation
- **Radix UI** for accessible components
- **Axios** for HTTP requests
- **MSW** for API mocking
- **Lucide React** for icons

### API Integration

- Development proxy configured for `/api` routes to `https://dummyjson.com`
- Entity APIs are centralized in respective `entities/*/api/` folders
- Uses mock service worker (MSW) for testing

### Testing Setup

- Vitest with jsdom environment
- React Testing Library
- Global test configuration in vitest.config.ts

### Code Organization Principles

1. **Single Responsibility**: Each component/module has one clear purpose
2. **Layer Dependencies**: Higher layers can import from lower layers only
3. **Entity-Centric**: Business logic organized around entities (post, user, comment)
4. **Barrel Exports**: Each layer/entity uses index.ts files for clean imports

### Development Notes

- The project emphasizes TypeScript safety and proper type definitions
- Components are broken down following FSD principles
- All shared utilities are centralized in the shared layer
- UI components use consistent patterns with proper prop interfaces
Loading