π« Next.js Boilerplate
sookyeongyeomμ 보μΌλ¬νλ μ΄νΈμ λλ€ :D
μ§μμ μΌλ‘ κ°μ νμ¬ μ
λ°μ΄νΈν©λλ€.
μ€ν λ³κ²½ κ³Όμ λ° μμΈν μ½λ 컨벀μ
μ μλ μν€μμ νμΈνμ€ μ μμ΅λλ€.
Index
π« Next.js Boilerplate- Index
- 1. μμνκΈ°
- 2. κΈ°μ μ€ν
- 3. μ 체 ꡬ쑰 νλμ 보기
- 4. κΈ°λ³Έ μ»΄ν¬λνΈ
- 5. κΈ°λ³Έ 컀μ€ν ν
- 6. κΈ°λ³Έ μμ
- 7. κΈ°λ³Έ μ€νμΌ μμ
- 8. κΈ°λ³Έ μ νΈ
- 9. μ»€λ° μ»¨λ²€μ
1. μμνκΈ°
1. Clone & Install
$ git clone https://github.com/sookyeongyeom/next-boilerplate
$ cd next-boilerplate
$ git remote remove origin
$ yarn install
2. Run
$ yarn dev
2. κΈ°μ μ€ν
3. μ 체 ꡬ쑰 νλμ 보기
βββ .github/workflows
β βββ dev.yml // Dev μλ² λ°°ν¬μλνλ₯Ό μν yml
β βββ prod.yml // Prod μλ² λ°°ν¬μλνλ₯Ό μν yml
βββ pages
βββ public
βββ src
β βββ @types
β β βββ api // API μμ², μλ΅ μ€ν€λ§ νμ
β β βββ client // API μ μΈ λͺ¨λ νμ
β β βββ dep // μΈλΆ λͺ¨λ νμ
μ€λ²λΌμ΄λ©
β βββ api
β β βββ core // Axios μΈμ€ν΄μ€
β β βββ hooks // React Query Hooks
β β βββ promises // API μμ² Promises
β βββ atoms // Jotai Atoms
β βββ components
β βββ constants
β βββ hooks // Custom Hooks
β βββ styles
β βββ utils // μ νΈ ν¨μ
βββ next-env.d.ts
βββ next.config.js
βββ package.json
βββ tsconfig.json
βββ yarn-error.log
βββ yarn.lock
βββ Dockerfile // λ°°ν¬μλνλ₯Ό μν λ컀νμΌ
βββ README.md
4. κΈ°λ³Έ μ»΄ν¬λνΈ
- components/layouts/DefaultLayout.tsx
- components/hocs/RouterGuard.tsx
- components/seo/CustomHead.tsx
5. κΈ°λ³Έ 컀μ€ν ν
- hooks/useChange.ts
- hooks/useCustomRouter.ts
- hooks/useInput.ts
- hooks/useMobile.ts
- hooks/usePreventScroll.ts
- hooks/useQueryString.ts
- hooks/useRouteToPath.ts
- hooks/useSwitch.ts
- hooks/useUniqueId.ts
6. κΈ°λ³Έ μμ
- constants/keys.tsx
- constants/paths.tsx
7. κΈ°λ³Έ μ€νμΌ μμ
- styles/alphaToHex.ts - 0~1μ Hexλ‘ λ³νν κ°λ€μ λͺ¨μ
- styles/colors.ts
- styles/devices.ts - λ·°ν¬νΈμ λ°λ₯Έ λλ°μ΄μ€ κ΅¬λΆ κΈ°μ€
- styles/fonts.ts - κΈ°λ³Έ μν λ―Ή νμ΄ν¬κ·ΈλνΌ
- styles/global.ts - κΈ°λ³Έ μ μ μ€νμΌ
- styles/reset.ts - κΈ°λ³Έ 리μ μ€νμΌ
- styles/sizes.ts
- styles/svgs.tsx
8. κΈ°λ³Έ μ νΈ
- utils/fetchAndSet.ts
- utils/setLayout.ts
- utils/withoutPropagation.ts
9. μ»€λ° μ»¨λ²€μ
1. λΈλμΉ μ΄λ¦ 컨벀μ
Feature/[κΈ°λ₯μμ½]
- 맨 첫κΈμ Fλ§ λλ¬Έμλ‘, κΈ°λ₯μμ½μ μλ¬Έμλ‘ μμ±νλ€.
- λμ΄μ°κΈ°λ νμ΄νμΌλ‘ ꡬλΆνλ€.
ex) Feature/modal-publishing
2. μ»€λ° λ©μΈμ§ 컨벀μ
<νκ·Έ>: <μ λͺ©>
- νκ·Έμ 첫κΈμλ λλ¬Έμλ‘ μμ±νλ€.
- νκ·Έλ μλμ μ ν κ²λ€λ§ μ¬μ©νλ€.
Feat: μλ‘μ΄ κΈ°λ₯ μΆκ°, κΈ°λ₯ λ‘μ§ λ³κ²½
Fix: λ²κ·Έ μμ
Refactor: μ½λ 리ν©ν λ§ (κΈ°λ₯ λ³ν X)
Style: μ½λ ν¬λ§·ν
, μ½λ λ³κ²½μ΄ μλ κ²½μ°
Chore: λΉλ μ
무 μμ , ν¨ν€μ§ 맀λμ μμ
Docs: λ¬Έμ μμ , μ£Όμ
3. λ¨Έμ§ μ λ΅
λͺ¨λ Feature λΈλμΉλ Squash Merge ν©λλ€.