Skip to content

AnnyangService/FrontEnd

Repository files navigation

Frontend

Next.js 기반 ν”„λ‘ νŠΈμ—”λ“œ μ›Ή μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ 둜컬 개발 ν™˜κ²½ μ„€μ • κ°€μ΄λ“œμž…λ‹ˆλ‹€.

개발 ν™˜κ²½ μ„€μ •

πŸ› οΈ ν•„μˆ˜ μš”κ΅¬μ‚¬ν•­

  • Node.js 18.17 이상
  • pnpm (ꢌμž₯) λ˜λŠ” npm
  • Git

πŸ”§ ꢌμž₯ 도ꡬ

  • VS Code λ˜λŠ” WebStorm
  • Chrome DevTools
  • React Developer Tools

둜컬 μ‹€ν–‰ 방법

1️⃣ Git μ΅œμ‹ ν™”

git fetch origin
git checkout main
git pull origin main

2️⃣ μ˜μ‘΄μ„± μ„€μΉ˜

# pnpm μ‚¬μš© (ꢌμž₯)
pnpm install

# npm μ‚¬μš©
npm install

3️⃣ 개발 μ„œλ²„ μ‹€ν–‰

# 개발 λͺ¨λ“œ μ‹€ν–‰
pnpm dev

# λ˜λŠ”
npm run dev

4️⃣ ν”„λ‘œλ•μ…˜ λΉŒλ“œ 및 μ‹€ν–‰

# λΉŒλ“œ
pnpm build

# ν”„λ‘œλ•μ…˜ μ„œλ²„ μ‹€ν–‰
pnpm start

접속 정보

기술 μŠ€νƒ

🎯 Core

  • Framework: Next.js 15.1.0
  • React: 19.x
  • TypeScript: 5.x
  • Styling: Tailwind CSS 3.4.17

🧩 UI Components

  • Design System: Radix UI
  • Icons: Lucide React
  • Theming: next-themes
  • Toast Notifications: Sonner

πŸ“‹ Form & Validation

  • Forms: React Hook Form 7.54.1
  • Validation: Zod 3.24.1
  • Resolvers: @hookform/resolvers

πŸ“Š Data & Charts

  • Charts: Recharts 2.15.0
  • HTTP Client: Axios 1.9.0
  • Date Handling: date-fns 4.1.0

🎨 UI Enhancements

  • Carousel: Embla Carousel
  • Animations: tailwindcss-animate
  • Responsive Panels: react-resizable-panels
  • Mobile Drawer: Vaul

ν”„λ‘œμ νŠΈ ꡬ쑰

πŸ“ FrontEnd/
β”œβ”€β”€ πŸ“„ next.config.mjs          # Next.js μ„€μ •
β”œβ”€β”€ πŸ“„ tailwind.config.ts       # Tailwind CSS μ„€μ •
β”œβ”€β”€ πŸ“„ tsconfig.json            # TypeScript μ„€μ •
β”œβ”€β”€ πŸ“ app/                     # App Router (Next.js 13+)
β”‚   β”œβ”€β”€ πŸ“„ layout.tsx           # 루트 λ ˆμ΄μ•„μ›ƒ
β”‚   β”œβ”€β”€ πŸ“„ page.tsx             # ν™ˆνŽ˜μ΄μ§€
β”‚   β”œβ”€β”€ πŸ“ cat/                 # 고양이 κ΄€λ ¨ νŽ˜μ΄μ§€
β”‚   β”œβ”€β”€ πŸ“ chat/                # μ±„νŒ… νŽ˜μ΄μ§€
β”‚   β”œβ”€β”€ πŸ“ diagnosis/           # 진단 νŽ˜μ΄μ§€
β”‚   β”œβ”€β”€ πŸ“ login/               # 둜그인 νŽ˜μ΄μ§€
β”‚   └── πŸ“ ...                  # 기타 νŽ˜μ΄μ§€λ“€
β”œβ”€β”€ πŸ“ components/              # μž¬μ‚¬μš© μ»΄ν¬λ„ŒνŠΈ
β”‚   β”œβ”€β”€ πŸ“ ui/                  # UI μ»΄ν¬λ„ŒνŠΈ (shadcn/ui)
β”‚   └── πŸ“„ ...                  # μ»€μŠ€ν…€ μ»΄ν¬λ„ŒνŠΈλ“€
β”œβ”€β”€ πŸ“ hooks/                   # μ»€μŠ€ν…€ React ν›…
β”œβ”€β”€ πŸ“ lib/                     # μœ ν‹Έλ¦¬ν‹° 및 μ„€μ •
β”‚   β”œβ”€β”€ πŸ“ types/               # TypeScript νƒ€μž… μ •μ˜
β”‚   └── πŸ“ utils/               # μœ ν‹Έλ¦¬ν‹° ν•¨μˆ˜λ“€
β”œβ”€β”€ πŸ“ api/                     # API κ΄€λ ¨ 둜직
└── πŸ“ public/                  # 정적 νŒŒμΌλ“€

개발 도ꡬ μ„€μ •

VS Code μ„€μ •

ꢌμž₯ ν™•μž₯ ν”„λ‘œκ·Έλž¨:

  • ES7+ React/Redux/React-Native snippets
  • Tailwind CSS IntelliSense
  • TypeScript Importer
  • Prettier - Code formatter
  • ESLint
  • Auto Rename Tag

μ½”λ“œ ν’ˆμ§ˆ 도ꡬ

# λ¦°νŒ… μ‹€ν–‰
pnpm lint

# μ½”λ“œ ν¬λ§·νŒ… (Prettier μ„€μ • μ‹œ)
pnpm format

문제 ν•΄κ²°

자주 λ°œμƒν•˜λŠ” λ¬Έμ œλ“€

🚫 포트 좩돌 (3000 포트 μ‚¬μš© 쀑)

# 포트 μ‚¬μš© ν”„λ‘œμ„ΈμŠ€ 확인 및 μ’…λ£Œ
lsof -ti:3000 | xargs kill -9

# λ‹€λ₯Έ 포트둜 μ‹€ν–‰
pnpm dev -p 3001

🚫 μ˜μ‘΄μ„± μ„€μΉ˜ μ‹€νŒ¨

# node_modules μ‚­μ œ ν›„ μž¬μ„€μΉ˜
rm -rf node_modules pnpm-lock.yaml
pnpm install

# μΊμ‹œ 정리
pnpm store prune

🚫 λΉŒλ“œ μ‹€νŒ¨

# Next.js μΊμ‹œ 정리
rm -rf .next

# 전체 정리 ν›„ μž¬λΉŒλ“œ
pnpm clean && pnpm build

🚫 TypeScript 였λ₯˜

# TypeScript μΊμ‹œ 정리
npx tsc --build --clean

# νƒ€μž… 체크 μ‹€ν–‰
pnpm type-check

🚫 Tailwind CSS μŠ€νƒ€μΌ 적용 μ•ˆλ¨

# Tailwind μ„€μ • 확인
npx tailwindcss --init

# PostCSS μ„€μ • 확인
cat postcss.config.mjs

디버깅 λͺ…λ Ήμ–΄

# 개발 μ„œλ²„ 상세 둜그
pnpm dev --debug

# λΉŒλ“œ 뢄석
pnpm build --analyze

# μ˜μ‘΄μ„± 트리 확인
pnpm list --depth=0

# λ²ˆλ“€ 크기 뢄석
npx @next/bundle-analyzer

ν™˜κ²½ λ³€μˆ˜ μ„€μ •

둜컬 κ°œλ°œμ„ μœ„ν•œ ν™˜κ²½ λ³€μˆ˜ νŒŒμΌμ„ μƒμ„±ν•˜μ„Έμš”:

# API μ„œλ²„ URL
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080

κ΄€λ ¨ λ¬Έμ„œ

개발 κ°€μ΄λ“œ

ν”„λ‘œμ νŠΈ λ¬Έμ„œ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors