Skip to content

R3gardless/r3gardless.dev

Repository files navigation

πŸš€ R3gardless.dev

Coverage Status

Next.js 기반의 λΈ”λ‘œκ·Έ ν”Œλž«νΌμœΌλ‘œ, Notion을 CMS둜 ν™œμš©ν•˜μ—¬ μ½˜ν…μΈ λ₯Ό κ΄€λ¦¬ν•©λ‹ˆλ‹€.

✨ μ£Όμš” κΈ°λŠ₯

  • πŸ“ Notion CMS 연동: Notion λ°μ΄ν„°λ² μ΄μŠ€λ₯Ό ν†΅ν•œ μ½˜ν…μΈ  관리
  • 🎨 Tailwind CSS v4: λͺ¨λ˜ν•œ μŠ€νƒ€μΌλ§
  • πŸ”§ TypeScript: νƒ€μž… μ•ˆμ „μ„±
  • πŸ“± λ°˜μ‘ν˜• λ””μžμΈ: λͺ¨λ°”일-퍼슀트 μ ‘κ·Ό
  • πŸŒ™ 닀크λͺ¨λ“œ: 라이트/닀크 ν…Œλ§ˆ 지원
  • 🧩 μ»΄ν¬λ„ŒνŠΈ μ•„ν‚€ν…μ²˜: Atomic Design νŒ¨ν„΄
  • πŸ“Š Storybook: UI μ»΄ν¬λ„ŒνŠΈ λ¬Έμ„œν™”
  • πŸ§ͺ Vitest: λ‹¨μœ„ ν…ŒμŠ€νŠΈ

πŸš€ μ‹œμž‘ν•˜κΈ°

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

# μ˜μ‘΄μ„± μ„€μΉ˜
bun install

# 개발 μ„œλ²„ μ‹œμž‘
bun run dev

λΈŒλΌμš°μ €μ—μ„œ http://localhost:3000을 μ—΄μ–΄ κ²°κ³Όλ₯Ό ν™•μΈν•˜μ„Έμš”.

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

.env.local νŒŒμΌμ„ μƒμ„±ν•˜κ³  λ‹€μŒ ν™˜κ²½λ³€μˆ˜λ₯Ό μ„€μ •ν•˜μ„Έμš”:

# Notion API μ„€μ •
NOTION_API_KEY=your_notion_api_key
NOTION_DATABASE_ID=your_notion_database_id

# Giscus λŒ“κΈ€ μ‹œμŠ€ν…œ (선택사항) - ν΄λΌμ΄μ–ΈνŠΈμ—μ„œ μ‚¬μš©ν•˜λ―€λ‘œ NEXT_PUBLIC_ 접두사 ν•„μš”
NEXT_PUBLIC_GISCUS_REPO=your_giscus_repo
NEXT_PUBLIC_GISCUS_REPO_ID=your_giscus_repo_id
NEXT_PUBLIC_GISCUS_CATEGORY_ID=your_giscus_category_id

# Google Analytics (GA4) μ„€μ • (선택사항)
NEXT_PUBLIC_GA_ID=your_google_analytics_id

πŸ›  개발 도ꡬ

슀크립트

# 개발 μ„œλ²„ (Turbopack)
bun run dev

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

# 정적 μ‚¬μ΄νŠΈ λΉŒλ“œ (GitHub Pages용)
bun run export

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

# λ¦°νŒ…
bun run lint

# ν¬λ§·νŒ…
bun run format

# μŠ€ν† λ¦¬λΆ
bun run storybook

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

  • ESLint: μ½”λ“œ μŠ€νƒ€μΌ 검사
  • Prettier: μ½”λ“œ ν¬λ§·νŒ…
  • Husky: Git hooks
  • lint-staged: μŠ€ν…Œμ΄μ§•λœ 파일 λ¦°νŒ…

πŸ“š μ•„ν‚€ν…μ²˜

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

src/
β”œβ”€β”€ app/                    # Next.js App Router
β”œβ”€β”€ components/             # React μ»΄ν¬λ„ŒνŠΈ
β”‚   β”œβ”€β”€ ui/                 # μž¬μ‚¬μš© κ°€λŠ₯ν•œ UI μ»΄ν¬λ„ŒνŠΈ
β”‚   β”œβ”€β”€ layout/             # λ ˆμ΄μ•„μ›ƒ μ»΄ν¬λ„ŒνŠΈ
β”‚   β”œβ”€β”€ sections/           # νŽ˜μ΄μ§€ μ„Ήμ…˜
β”‚   └── templates/          # νŽ˜μ΄μ§€ ν…œν”Œλ¦Ώ
β”œβ”€β”€ libs/                   # μ™ΈλΆ€ 라이브러리 μ„€μ •
β”œβ”€β”€ store/                  # Zustand μƒνƒœ 관리
β”œβ”€β”€ types/                  # TypeScript νƒ€μž… μ •μ˜
└── utils/                  # μœ ν‹Έλ¦¬ν‹° ν•¨μˆ˜

μ»΄ν¬λ„ŒνŠΈ λΆ„λ₯˜

  • UI: 단일 κΈ°λŠ₯ μž¬μ‚¬μš© μ»΄ν¬λ„ŒνŠΈ (Button, Typography)
  • Sections: νŠΉμ • νŽ˜μ΄μ§€μ˜ λ ˆμ΄μ•„μ›ƒ λ‹¨μœ„ (BlogPosts, RelatedPosts)
  • Templates: νŽ˜μ΄μ§€ 레벨 λ ˆμ΄μ•„μ›ƒ μ»΄ν¬λ„ŒνŠΈ
  • Layout: 곡톡 μ‚¬μ΄νŠΈ λ ˆμ΄μ•„μ›ƒ (Header, Footer)

πŸš€ 배포

GitHub Pages μžλ™ 배포

이 ν”„λ‘œμ νŠΈλŠ” GitHub Actionsλ₯Ό 톡해 μžλ™μœΌλ‘œ GitHub Pages에 λ°°ν¬λ©λ‹ˆλ‹€.

  1. Repository Settings β†’ Pages β†’ Sourceλ₯Ό GitHub Actions둜 μ„€μ •
  2. Repository Secrets에 ν™˜κ²½λ³€μˆ˜ μΆ”κ°€:
    • NOTION_API_KEY: Notion API ν‚€
    • NOTION_DATABASE_ID: Notion λ°μ΄ν„°λ² μ΄μŠ€ ID
    • NEXT_PUBLIC_GISCUS_REPO: Giscus λŒ“κΈ€ λ ˆν¬μ§€ν† λ¦¬ (선택사항)
    • NEXT_PUBLIC_GISCUS_REPO_ID: Giscus λ ˆν¬μ§€ν† λ¦¬ ID (선택사항)
    • NEXT_PUBLIC_GISCUS_CATEGORY_ID: Giscus μΉ΄ν…Œκ³ λ¦¬ ID (선택사항)
    • NEXT_PUBLIC_GA_ID: Google Analytics (GA4) 좔적 ID (선택사항)
  3. main λΈŒλžœμΉ˜μ— pushν•˜λ©΄ μžλ™ 배포

μžμ„Έν•œ 배포 κ°€μ΄λ“œλŠ” DEPLOYMENT.mdλ₯Ό μ°Έκ³ ν•˜μ„Έμš”.

μˆ˜λ™ 배포

# 정적 μ‚¬μ΄νŠΈ λΉŒλ“œ
bun run export

# λΉŒλ“œ κ²°κ³Ό 확인
ls -la out/

πŸ§ͺ ν…ŒμŠ€νŠΈ

# λ‹¨μœ„ ν…ŒμŠ€νŠΈ μ‹€ν–‰
bun run test:unit:run

# ν…ŒμŠ€νŠΈ 컀버리지 확인
open coverage/index.html

πŸ“– λ¬Έμ„œ

🀝 κΈ°μ—¬ν•˜κΈ°

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ λΌμ΄μ„ μŠ€

이 ν”„λ‘œμ νŠΈλŠ” MIT λΌμ΄μ„ μŠ€ ν•˜μ— μžˆμŠ΅λ‹ˆλ‹€.

πŸ”— 링크

Releases

No releases published

Packages

No packages published

Contributors 7