Skip to content

WeGo-Together/WeGo_FrontEnd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ WeGo πŸ”₯

관리 λ¬Έμ„œ κ΄€λ ¨ 링크


πŸš€ ν”„λ‘œμ νŠΈ μ„€μΉ˜ κ°€μ΄λ“œ

1. Corepack ν™œμ„±ν™” (졜초 1회)

이 ν”„λ‘œμ νŠΈλŠ” global pnpm μ„€μΉ˜ λŒ€μ‹  Node.js λ‚΄μž₯ Corepack을 μ‚¬μš©ν•©λ‹ˆλ‹€.

# Windows: κ΄€λ¦¬μž κΆŒν•œμœΌλ‘œ PowerShell/CMD μ‹€ν–‰ ν›„
corepack enable

# macOS/Linux: sudo κΆŒν•œμœΌλ‘œ μ‹€ν–‰
sudo corepack enable

2. ν”„λ‘œμ νŠΈ λ‹€μš΄λ‘œλ“œ

git clone https://github.com/WeGo-Together/WeGo_FrontEnd.git
cd wego

3. μ˜μ‘΄μ„± μ„€μΉ˜

pnpm install

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

κΈ°λ³Έ λ™μž‘ 싀행을 μœ„ν•œ ν™˜κ²½λ³€μˆ˜ μ„€μ •

// .env.local
# API μš”μ²­ μ£Όμ†Œ
NEXT_PUBLIC_API_BASE_URL=https://api.wego.monster/api/v1
# MSW μ„€μ •
NEXT_PUBLIC_MSW_ENABLED=true // Or false

playwright ν…ŒμŠ€νŠΈλ₯Ό μœ„ν•œ ν™˜κ²½λ³€μˆ˜ μ„€μ •

// .env.test
NEXT_PUBLIC_MSW_ENABLED=true

슀크립트

# 개발 μ„œλ²„ μ‹€ν–‰
pnpm dev

# ν”„λ‘œλ•μ…˜ λΉŒλ“œ
pnpm build

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

# 린트 검사
pnpm lint

# ν…ŒμŠ€νŠΈ μ‹€ν–‰
pnpm test

# ν…ŒμŠ€νŠΈ 컀버리지
pnpm test:coverage

# Playwright Test
pnpm test:playwright

# Storybook μ‹€ν–‰
pnpm storybook

# Storybook λΉŒλ“œ
pnpm build-storybook

πŸ—οΈ HTTPS 둜컬 개발 ν™˜κ²½ μ„€μ • κ°€μ΄λ“œ

1. mkcert λ‹€μš΄λ‘œλ“œ 및 μ„€μΉ˜

Windows:

(1) https://github.com/FiloSottile/mkcert/releases 접속

(2) mkcert-v1.4.4-windows-amd64.exe λ‹€μš΄λ‘œλ“œ

(3) ν”„λ‘œμ νŠΈ λ£¨νŠΈμ— mkcert.exe둜 μ €μž₯

πŸ“ WEGO_FRONTEND
└─ πŸ’Ώ mkcert.exe

macOS:

# homeBrew둜 μ„€μΉ˜
brew install mkcert

# Firefox μ‚¬μš© μ‹œ
brew install nss

2. 둜컬 CA μ„€μΉ˜

Windows:

.\mkcert.exe -install

macOS:

mkcert -install

좜λ ₯:

The local CA is now installed in the system trust store! ⚑️

3. .cert 폴더 생성(ν”„λ‘œμ νŠΈ 루트)

# .cert 폴더 생성
mkdir .cert

3-1. μΈμ¦μ„œ λ°œκΈ‰

Windows:

# μΈμ¦μ„œ λ°œκΈ‰
.\mkcert.exe -key-file .cert\localhost-key.pem -cert-file .cert\localhost.pem localhost local.wego.monster 127.0.0.1 ::1

macOS:

mkcert -key-file .cert/localhost-key.pem -cert-file .cert/localhost.pem localhost local.wego.monster 127.0.0.1 ::1

좜λ ₯:

Created a new certificate valid for the following names πŸ“œ
 - "localhost"
 - "local.wego.monster"
 - "127.0.0.1"
 - "::1"

The certificate is at ".cert\localhost.pem" and the key at ".cert\localhost-key.pem" βœ…

It will expire on 12 March 2028 πŸ—“
πŸ“ WEGO_FRONTEND
└─ πŸ’Ώ mkcert.exe
└─ πŸ“ .cert
   β”œβ”€ πŸ”‘ localhost-key.pem
   └─ πŸ”‘ localhost.pem

4. hosts 파일 μˆ˜μ •

Windows: C:\Windows\System32\drivers\etc\hosts

(1) λ©”λͺ¨μž₯을 κ΄€λ¦¬μž κΆŒν•œμœΌλ‘œ μ‹€ν–‰

(2) hosts 파일 μ—΄κΈ°

(3) λ‹€μŒ 쀄 μΆ”κ°€:

127.0.0.1 local.wego.monster

5. μ‹€ν–‰

# https ν™˜κ²½μœΌλ‘œ μ‹€ν–‰
pnpm dev

# 좜λ ₯ λ©”μ‹œμ§€
> [email protected] dev C:\git\wego\WeGo_FrontEnd
> node scripts/local/dev-server.js

> Ready on https://local.wego.monster:3000
 β—‹ Compiling / ...
 GET / 200 in 5.7s (compile: 5.3s, render: 321ms)

기타

# http ν™˜κ²½μœΌλ‘œ μ‹€ν–‰
pnpm dev:http

# κΈ°μ‘΄ localhost:3000 으둜 μ‹€ν–‰
pnpm dev:ci

πŸ“ 폴더 ꡬ쑰

my-app
β”œβ”€ πŸ“ public                            # 정적 파일
β”‚  └─ πŸ“ images                         # 이미지 파일 λͺ¨μŒ
β”‚
β”œβ”€ πŸ“ src
β”‚  β”œβ”€ πŸ“ api                            # API κ΄€λ ¨
β”‚  β”‚  β”œβ”€ πŸ”· httpClient.ts               # HTTP ν΄λΌμ΄μ–ΈνŠΈ (fetch 래퍼)
β”‚  β”‚  └─ πŸ“ service
β”‚  β”‚     └─ πŸ“ product                     # Product μ—”λ“œν¬μΈνŠΈ
β”‚  β”‚        β”œβ”€ πŸ“ product-get-item
β”‚  β”‚        β”‚  └─ πŸ”· index.ts              # getProductItem API
β”‚  β”‚        └─ πŸ“ product-get-list
β”‚  β”‚           └─ πŸ”· index.ts              # getProductList API
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ app                            # Next.js App Router
β”‚  β”‚  β”œβ”€ 🧩 layout.tsx                  # 루트 λ ˆμ΄μ•„μ›ƒ
β”‚  β”‚  β”œβ”€ 🧩 page.tsx                    # ν™ˆ νŽ˜μ΄μ§€
β”‚  β”‚  β”œβ”€ πŸ“ login
β”‚  β”‚  β”‚  └─ 🧩 page.tsx
β”‚  β”‚  └─ πŸ“ details
β”‚  β”‚     └─ πŸ“ [id]
β”‚  β”‚        └─ 🧩 page.tsx
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ assets                         # 정적 λ¦¬μ†ŒμŠ€
β”‚  β”‚  β”œβ”€ πŸ“ fonts                       # 둜컬 폰트
β”‚  β”‚  β”‚  └─ PretendardVariable.woff2
β”‚  β”‚  └─ πŸ“ icons                       # SVG μ•„μ΄μ½˜
β”‚  β”‚     └─ πŸ–ΌοΈ icon-check-blue.svg
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ components                     # μ»΄ν¬λ„ŒνŠΈ
β”‚  β”‚  β”œβ”€ πŸ“ ui                          # μ•„ν†° μ»΄ν¬λ„ŒνŠΈ
β”‚  β”‚  β”‚  └─ πŸ“ button                   # λ²„νŠΌ μ»΄ν¬λ„ŒνŠΈ
β”‚  β”‚  β”‚     β”œβ”€ 🧩 index.tsx
β”‚  β”‚  β”‚     β”œβ”€ πŸ§ͺ index.test.tsx
β”‚  β”‚  β”‚     └─ πŸ“– index.stories.tsx
β”‚  β”‚  β”‚
β”‚  β”‚  β”œβ”€ πŸ“ shared                      # 곡유 μ»΄ν¬λ„ŒνŠΈ
β”‚  β”‚  β”‚  └─ πŸ“ card                     # μΉ΄λ“œ μ»΄ν¬λ„ŒνŠΈ
β”‚  β”‚  β”‚     β”œβ”€ 🧩 index.tsx
β”‚  β”‚  β”‚     β”œβ”€ πŸ§ͺ index.test.tsx
β”‚  β”‚  β”‚     └─ πŸ“– index.stories.tsx
β”‚  β”‚  β”‚
β”‚  β”‚  └─ πŸ“ pages                       # νŽ˜μ΄μ§€λ³„ μ»΄ν¬λ„ŒνŠΈ
β”‚  β”‚     └─ πŸ“ login                    # 둜그인 νŽ˜μ΄μ§€μš© μ»΄ν¬λ„ŒνŠΈ
β”‚  β”‚        β”œβ”€ 🧩 index.tsx             # μ—¬κΈ°μ„œ ν•œλ²ˆμ— export
β”‚  β”‚        β”œβ”€ πŸ“ login-form            # μƒμœ„ ν΄λ”μ˜ 이름을 ν¬ν•¨ν•˜λ„λ‘ 이름 μ§“κΈ°
β”‚  β”‚        β”‚  └─ 🧩 index.tsx
β”‚  β”‚        └─ πŸ“ login-social-button
β”‚  β”‚           └─ 🧩 index.tsx
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ hooks                          # Custom Hooks
β”‚  β”‚  └─ πŸ“ use-product
β”‚  β”‚     β”œβ”€ πŸ“ use-product-get-item
β”‚  β”‚     β”‚  └─ πŸ”· index.ts              # useGetProductItemQuery
β”‚  β”‚     └─ πŸ“ use-product-get-list
β”‚  β”‚        └─ πŸ”· index.ts              # useGetProductListQuery
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ stores                         # μ „μ—­ μƒνƒœ (Zustand)
β”‚  β”‚  β”œβ”€ πŸ“ use-auth-store
β”‚  β”‚  β”‚  └─ πŸ”· index.ts                 # useAuthStore
β”‚  β”‚  β”œβ”€ πŸ“ use-modal-store
β”‚  β”‚  β”‚  └─ πŸ”· index.ts                 # useModalStore
β”‚  β”‚  └─ πŸ“ use-user-store
β”‚  β”‚     └─ πŸ”· index.ts                 # useUserStore
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ lib                            # μœ ν‹Έλ¦¬ν‹° & μ„€μ •
β”‚  β”‚  β”œβ”€ πŸ”· utils.ts                    # 곡톡 μœ ν‹Έλ¦¬ν‹°
β”‚  β”‚  β”œβ”€ πŸ”· query-client.ts             # React Query μ„€μ •
β”‚  β”‚  └─ πŸ“ query-key                   # Query Key μ„€μ •
β”‚  β”‚     β”œβ”€ πŸ“ query-key-product        # product μ—”λ“œν¬μΈνŠΈ 용 Query Key
β”‚  β”‚     β”‚  └─ πŸ”· index.ts
β”‚  β”‚     └─ πŸ“ query-key-user           # user μ—”λ“œν¬μΈνŠΈ 용 Query Key
β”‚  β”‚        └─ πŸ”· index.ts
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ mocks                          # MSW λͺ¨ν‚Ή
β”‚  β”‚  β”œβ”€ πŸ”· index.ts                    # MSW μ΄ˆκΈ°ν™”
β”‚  β”‚  β”œβ”€ 🎭 handlers.ts                 # λͺ¨λ“  ν•Έλ“€λŸ¬ 톡합 export
β”‚  β”‚  β”œβ”€ 🎭 browser.ts                  # λΈŒλΌμš°μ €μš© worker
β”‚  β”‚  β”œβ”€ 🎭 server.ts                   # μ„œλ²„μš© server
β”‚  β”‚  └─ πŸ“ endpoints
β”‚  β”‚     └─ πŸ“ product
β”‚  β”‚        β”œβ”€ πŸ”· product-handler.ts    # product μ—”λ“œν¬μΈνŠΈ μ „μš© λͺ¨ν‚Ή ν•¨μˆ˜
β”‚  β”‚        └─ πŸ”· product-mock.ts       # product μ—”λ“œν¬μΈνŠΈ μ „μš© λͺ© 데이터
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ types                          # TypeScript νƒ€μž…
β”‚  β”‚  β”œβ”€ πŸ”΅ global.d.ts                 # μ „μ—­ μ„ μ–Έ νƒ€μž…
β”‚  β”‚  └─ πŸ“ service
β”‚  β”‚     β”œβ”€ πŸ”· product.ts
β”‚  β”‚     └─ πŸ”· user.ts
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ providers                      # Provider μ»΄ν¬λ„ŒνŠΈ
β”‚  β”‚  β”œβ”€ πŸ”· index.ts                    # provider ν•œλ²ˆμ— export
β”‚  β”‚  β”œβ”€ πŸ“ provider-query.tsx          # React Query Provider
β”‚  β”‚  β”‚  └─ 🧩 index.tsx
β”‚  β”‚  β”œβ”€ πŸ“ provider-msw.tsx            # MSW Provider
β”‚  β”‚  β”‚  └─ 🧩 index.tsx
β”‚  β”‚  └─ πŸ“ provider-lazy-motion.tsx    # Framer Motion Provider
β”‚  β”‚     └─ 🧩 index.tsx
β”‚  β”‚
β”‚  β”œβ”€ πŸ“ styles                         # μŠ€νƒ€μΌ
β”‚  β”‚  β”œβ”€ 🎨 base.css                    # κΈ°λ³Έ μŠ€νƒ€μΌ
β”‚  β”‚  β”œβ”€ 🎨 colors.css                  # 색상 λ³€μˆ˜
β”‚  β”‚  β”œβ”€ 🎨 typography.css              # νƒ€μ΄ν¬κ·Έλž˜ν”Ό
β”‚  β”‚  β”œβ”€ 🎨 layout.css                  # λ ˆμ΄μ•„μ›ƒ
β”‚  β”‚  └─ 🎨 animations.css              # μ• λ‹ˆλ©”μ΄μ…˜
β”‚  β”‚

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6