All answers and explanations must be written in Korean. Answers should be concise and direct.
- Dev Server:
pnpm dev(Port 3100) - Build:
pnpm build - Start:
pnpm start - Lint:
pnpm lint - Fix Lint:
pnpm lint:fix - Format:
pnpm format - Test: No test runner currently configured.
- Framework: Next.js 16 (App Router), React 19, TypeScript 5
- State: Zustand (global), TanStack Query (server), nuqs (URL)
- Styling: Tailwind CSS 4, Radix UI, Shadcn UI, Lucide React
- Structure:
src/features/**: Domain-specific components, hooks, stores.src/components/ui: Generic UI components (Shadcn).src/components/common: Shared app components.src/app: Routes only. Delegate logic to features.src/lib: Utilities (auth, utils).
- Imports: Use aliases (
@/components,@/features,@/lib, etc.) - Naming:
- Components:
PascalCase.tsx - Functions/Vars:
camelCase - Constants:
UPPER_SNAKE_CASE - Types:
PascalCase
- Components:
- Components:
- Server Components by default. Use
'use client'only when necessary. - Named Exports:
export const MyComponent = ... - Props: Explicit interface
MyComponentProps. Destructure props.
- Server Components by default. Use
- Styling:
- Use Tailwind CSS. Avoid inline styles.
- Use
cn()for class merging:className={cn("base-class", className)}.
- Types:
- No
any. Strict mode is on. - Return types explicit for public functions/hooks.
- No
- Branch Strategy:
dev->feat/feature-name(Work here) -> PR todev(Squash & Merge).- Production release:
dev->main(Merge Commit).
- Commit Convention:
Tag: Summary- Importants: The summary must be written in Korean.
- Tags:
Feat,Fix,Docs,Chore,Design,Refactor,CI/CD - Example:
Feat: 로그인 페이지 구현
- PRs: Description must summarize changes and link issues.
- Readability:
- No magic numbers ->
const ANIMATION_DURATION = 300. - Colocate logic -> Keep related styles/logic near usage.
- Simplify conditionals -> Early returns over nested ternaries.
- No magic numbers ->
- Predictability:
- SRP -> Functions do one thing.
fetchBalanceshould not log side effects. - Consistent Returns ->
useUserreturnsUseQueryResult.
- SRP -> Functions do one thing.
- Cohesion & Coupling:
- Feature Folders: Keep everything related to a feature (ui, logic, state) in
src/features/xxx. - Composition: Prefer composing components over prop drilling.
- Feature Folders: Keep everything related to a feature (ui, logic, state) in
- Performance:
- Use
next/imageandnext/font. - Optimize Re-renders: Use
useMemo/useCallbackreasonably, but don't over-optimize prematurely.
- Use
- Ensure linting passes (
pnpm lint) before confirming tasks. - Verify UI changes visually if possible or describe expected behavior.