@@ -21,13 +21,32 @@ GitAnimals is a monorepo that allows users to raise virtual pets through GitHub
2121- ` packages/util/* ` - Utility packages (common, typescript)
2222
2323** Key Technologies:**
24- - ** Styling:** PandaCSS with Shadow Panda preset for component styling
25- - ** State Management:** Tanstack Query v5 (server state), Jotai & Zustand (client state)
24+ - ** Styling:** Tailwind CSS (migrating from PandaCSS)
25+ - ** State Management:** Tanstack Query v5 (server state), Jotai (client state)
2626- ** Authentication:** NextAuth.js (web), token-based auth (webview)
27- - ** UI Components:** Radix UI primitives + custom PandaCSS components
27+ - ** UI Components:** Radix UI primitives + ` @gitanimals/ui-tailwind `
2828- ** Package Manager:** pnpm v9.0+ with workspace configuration
2929- ** Build System:** Turborepo for orchestration
3030
31+ ** Web App Architecture (FSD-inspired Hybrid):**
32+
33+ apps/web은 FSD(Feature-Sliced Design) 기반 하이브리드 아키텍처를 사용합니다.
34+ 상세 가이드: [ ` apps/web/ARCHITECTURE.md ` ] ( apps/web/ARCHITECTURE.md )
35+
36+ ```
37+ src/
38+ ├── app/ # Next.js App Router (라우팅 + 조합, FSD app+pages 역할)
39+ ├── widgets/ # 독립적 대규모 UI 블록 (GNB 등)
40+ ├── features/ # 사용자 액션 기능 (auction, auth, feedback 등)
41+ ├── entities/ # 비즈니스 엔티티 (persona, guild, user, product)
42+ ├── shared/ # 범용 기반 코드 (api, config, hooks, i18n, lib, store, utils)
43+ ├── components/ # [레거시] 점진적으로 shared/ui/ 또는 entities/*/ui/로 이전
44+ └── middleware.ts
45+ ```
46+
47+ 의존성 규칙: ` app/ → widgets/ → features/ → entities/ → shared/ `
48+ 상위 레이어는 하위 레이어만 import 가능. 같은 레이어 슬라이스 간 import 금지.
49+
3150## Development Commands
3251
3352** Root-level commands (run from project root):**
@@ -68,20 +87,23 @@ pnpm --filter @gitanimals/ui-panda storybook # Start Storybook
6887
6988## Code Patterns & Conventions
7089
71- ** Component Architecture:**
72- - UI components in ` packages/ui/panda/src/components/ `
73- - Each component has: ` Component.tsx ` , ` Component.stories.tsx ` , ` index.ts `
74- - PandaCSS styling with design tokens from ` packages/ui/token `
90+ ** Component Architecture (apps/web):**
91+ - FSD 레이어 구조: ` shared/ → entities/ → features/ → widgets/ → app/ `
92+ - 각 슬라이스는 ` ui/ ` , ` model/ ` , ` api/ ` 세그먼트와 barrel ` index.ts ` 로 구성
93+ - 라우트 전용 UI는 ` app/[locale]/*/_components/ ` 에 코로케이션
94+ - 도메인 무관 공유 UI는 ` shared/ui/ ` 또는 ` components/ ` (레거시)
7595
7696** Import Patterns:**
7797- Workspace dependencies use ` workspace:* ` protocol
78- - UI components imported from ` @gitanimals/ui-panda `
98+ - UI components imported from ` @gitanimals/ui-tailwind `
7999- Shared utilities from ` @gitanimals/util-common `
100+ - Web app 내부는 ` @/ ` alias 사용 (→ ` src/ ` )
101+ - FSD 의존성 규칙 준수: ` @/shared/ ` , ` @/entities/ ` , ` @/features/ ` , ` @/widgets/ `
80102
81103** State Management:**
82- - Server state: Tanstack Query v5 with ` queryOptions ` pattern in ` src/apis /`
83- - Client state: Jotai for atomic state, Zustand for stores
84- - Auth state managed through NextAuth.js
104+ - Server state: Tanstack Query v5 in ` entities/*/model/ ` 및 ` features/*/model /`
105+ - Client state: Jotai atoms in ` shared/store/ `
106+ - Auth state managed through NextAuth.js ( ` shared/api/auth.ts ` )
85107
86108** Tanstack Query v5 Best Practices:**
87109- Always use ` queryOptions ` factory pattern for reusable query definitions
@@ -120,7 +142,7 @@ pnpm --filter @gitanimals/ui-panda storybook # Start Storybook
120142
121143 // Usage in component
122144 import { useQuery } from ' @tanstack/react-query' ;
123- import { userQueryOptions } from ' @/apis /user/queries' ;
145+ import { userQueryOptions } from ' @/entities /user/model /queries' ;
124146
125147 function UserProfile({ userId }: { userId: string }) {
126148 const { data : user } = useQuery (userQueryOptions .getUser (userId ));
@@ -139,10 +161,10 @@ pnpm --filter @gitanimals/ui-panda storybook # Start Storybook
139161 - No need for custom hooks unless adding extra logic
140162
141163** Styling Approach:**
142- - PandaCSS with ` styled-system ` generation
143- - Shadow Panda preset for enhanced component styling
144- - Responsive design using PandaCSS conditions (mobile/desktop)
145- - Design tokens centralized in ` packages/ui/token `
164+ - Tailwind CSS (migrating from PandaCSS)
165+ - ` @gitanimals/ui-tailwind ` 디자인 시스템 컴포넌트
166+ - Responsive design using Tailwind breakpoints
167+ - ` cn() ` utility for conditional class merging
146168
147169## Testing & Quality
148170
@@ -155,7 +177,7 @@ pnpm --filter @gitanimals/ui-panda storybook # Start Storybook
155177
156178- ` turbo.json ` - Build pipeline configuration
157179- ` pnpm-workspace.yaml ` - Workspace definition
158- - ` apps/*/panda.config.ts ` - PandaCSS configuration per app
180+ - ` apps/web/ARCHITECTURE.md ` - ** FSD 아키텍처 상세 가이드 (필독) **
159181- ` packages/ui/panda/src/theme/ ` - Design system tokens and styles
160182
161183## Build Pipeline Dependencies
@@ -167,7 +189,9 @@ The build system has specific dependency chains:
167189
168190## Notes for Development
169191
170- - Always run ` panda codegen ` after theme changes
171192- UI component changes require Storybook restart
172193- Mobile app uses Expo SDK ~ 53.0.17 with React Native 0.79.5
173- - Web app uses Next.js App Router with internationalization (next-intl)
194+ - Web app uses Next.js App Router with internationalization (next-intl)
195+ - ** apps/web 작업 시 반드시 FSD 의존성 규칙을 따를 것** (상세: ` apps/web/ARCHITECTURE.md ` )
196+ - 새 코드는 반드시 ` shared/ ` , ` entities/ ` , ` features/ ` , ` widgets/ ` 중 적절한 레이어에 배치
197+ - ` components/ ` (레거시)에 새 파일 추가 금지 — 적절한 FSD 레이어 사용
0 commit comments