Skip to content

๐ŸŽต ํ”Œ๋ ˆ์ด๋ฆฌ์ŠคํŠธ ์ทจํ–ฅ์„ ๊ณต์œ ํ•˜๊ณ  ์นœ๊ตฌ๋ฅผ ๋งŒ๋“ค์ž ๐ŸŽต

Notifications You must be signed in to change notification settings

DY-WhatSong/BE-What_Song

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

BE-What-s_Song

What's Song(์™“์†ก) ์„œ๋น„์Šค ๋ฐฑ์—”๋“œ ๋ ˆํฌ์ง€ํ† ๋ฆฌ

ํ”„๋กœ์ ํŠธ ์•„ํ‚คํ…์ณ

image

ERD

image

0. ๊ฐœ๋ฐœ ํ™˜๊ฒฝ, ์–ธ์–ด, ๋„๊ตฌ

  • Intellij
  • SpringBoot
  • Java (11 JDK) or Kotlin
  • MariaDB (DB)
  • Redis (Cache DB)
  • ๋ฐฐํฌ ๋ฐ ํŒŒ์ดํ”„๋ผ์ธ ๊ตฌ์ถ• ๋ฏธ์ •
  • PostMan (API Test)

1. ์ฝ”๋”ฉ ์ปจ๋ฒค์…˜

Entity Class

  • ํ•„๋“œ๋ช…์€ ์ „๋ถ€ camelCase ๋กœ ์ž‘์„ฑ
  • Class Name์€ PascalCase ๋กœ ์ž‘์„ฑ

Package Naming

  • Domain ๋ณ„๋กœ ํŒจํ‚ค์ง€๋ฅผ ๋ถ„๋ฆฌํ•œ๋‹ค.
    • ex.) ํšŒ์›, ์ฑ„ํŒ…๋ฐฉ์ด ์กด์žฌํ•œ๋‹ค๋ฉด member,chat๋“ฑ์˜ ํฐ ๋‹จ์œ„์˜ Domain์œผ๋กœ ๋ถ„๋ฆฌํ•œ๋‹ค.
  • Controller๋Š” api,Service๋Š” application,Repository๋Š” repo๋กœ Namingํ•˜์—ฌ ๊ธฐ๋Šฅ๋ณ„๋กœ ๋ถ„๋ฆฌ
    • Service์˜ ๊ฒฝ์šฐ impl๊ณผ service๋กœ ๋‚˜๋ˆ„์–ด DIP ์ค€์ˆ˜
  • DTO์™€ Entity๋Š” ๋ณ„๋„์˜ ํŒจํ‚ค์ง€์—์„œ ๊ด€๋ฆฌํ•˜๋ฉฐ, DTO๋‚ด๋ถ€๋Š” Request์™€ Response ์šฉ๋„์— ๋”ฐ๋ผ ํŒจํ‚ค์ง€๋ฅผ ๋”ฐ๋กœ ๋‘์–ด ๋ถ„๋ฆฌํ•œ๋‹ค.
    • DTO๋Š” Inner Class ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•œ๋‹ค.
    • Naming์˜ ๊ฒฝ์šฐ MemberDTO์˜ ๊ฒฝ์šฐ, ํšŒ์›๊ฐ€์ž…๊ณผ ์ •๋ณด์กฐํšŒ DTO๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด SignUp,CheckInfo๋กœ ์ •์ •ํ•œ๋‹ค.
  • ex)
root
 |
 |---member
 |     |--- api
 |     |--- application
 |     |     |
 |     |     |--- service
 |     |     |--- impl
 |     |--- repo
 |     |--- dto
 |     |     |--- request
 |     |     |--- response
 |     |--- entity
 |     |--- config
 |________________

File Naming

  • YMLํŒŒ์ผ์€ Kebab Case ๋กœ Namingํ•œ๋‹ค.
  • DB ์„ค์ • ๋ฐ ํ”„๋กœ์ ํŠธ์— ํ•„์š”ํ•œ ์„ค์ •๋“ค์€ application.yml ์— ์ €์žฅํ•˜์—ฌ์ค€๋‹ค.
  • jwt,aws,mail๋“ฑ์„ ๋ณ„๋„์˜ ymlํŒŒ์ผ์„ ๋งŒ๋“ค์–ด ๊ด€๋ฆฌํ•œ๋‹ค.

API ์š”์ฒญ URl

  • ๋™์‚ฌ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค.
  • /api/๋ฒ„์ „๋ช…/Entity Name ์„ ์‚ฌ์šฉํ•œ๋‹ค.
  • ex.) api/v1/member

DB & CI/CD

  • ๋ฐฐํฌํ™˜๊ฒฝ ๋ฐ DB ์—ฐ๊ฒฐ ๋ฐฉ๋ฒ• ๋ฏธ์ •

2. ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ ๊ด€๋ฆฌ ๊ธฐ๋ฒ•

Organization์—์„œ BackEnd ๋ณ„๋„์˜ ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ์—์„œ ๊ด€๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

โš™๏ธ ๋ธŒ๋žœ์น˜ ๊ด€๋ฆฌ ์ „๋žต

โš™๏ธ Git-flow

trunked_base_development

โš™๏ธ ๋ธŒ๋žœ์น˜ ๊ตฌ์„ฑ

  • feat ๋ธŒ๋žœ์น˜๋Š” ํ•˜๋‚˜์˜ ๊ธฐ๋Šฅ์„ ๊ฐœ๋ฐœํ•˜๊ธฐ ์œ„ํ•œ ๋ธŒ๋žœ์น˜์ž…๋‹ˆ๋‹ค. ๋ถ€๋ชจ๋Š”develop์ด๋ฉฐ, ๊ฐœ๋ฐœ์ด ์™„๋ฃŒ๋˜๋ฉดdevelop์— mergeํ•ฉ๋‹ˆ๋‹ค. ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์€ ๋ณดํ†ตfeature/*์ด ๋ฉ๋‹ˆ๋‹ค.
  • deve ๋ธŒ๋žœ์น˜๋Š” ๊ฐœ๋ฐœ์„ ์œ„ํ•œ ๋ธŒ๋žœ์น˜์ž…๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌfeature๋“ค์ด merge๋˜๋Š” ์žฅ์†Œ์ด๋ฉฐ, ์•„์ง release๋˜์ง€ ์•Š์€ ๊ธฐ๋Šฅ๋“ค์ด ๋ชจ์—ฌ ์žˆ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
  • main๋ธŒ๋žœ์น˜๋Š” ์‹ค์ œ ์šด์˜ ์ค‘์ธ ์„œ๋น„์Šค์˜ ๋ธŒ๋žœ์น˜์ž…๋‹ˆ๋‹ค.
  • hotfix๋ธŒ๋žœ์น˜๋Š” ์„œ๋น„์Šค์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ๋•Œ ํ•ซํ”ฝ์Šค์— ํ•ด๋‹นํ•˜๋Š” ๋ธŒ๋žœ์น˜์ž…๋‹ˆ๋‹ค. ๊ธฐ๋Šฅ ๊ฐœ๋ฐœ(feature) ๋“ฑ๊ณผ ๋‹ฌ๋ฆฌ ๋น ๋ฅด๊ฒŒ ๋Œ€์ฒ˜ํ•ด์•ผ ํ•  ํ•„์š”๊ฐ€ ์žˆ๊ธฐ ๋•Œ๋ฌธ์—,master๋ธŒ๋žœ์น˜์— ์ง์ ‘ mergeํ•˜๋Š” ์ „๋žต์„ ์ทจํ•ฉ๋‹ˆ๋‹ค.dev๊ณผ์˜ ์ฐจ์ด๊ฐ€ ๋ฐœ์ƒํ•˜๊ธฐ ๋•Œ๋ฌธ์—, ๋‚˜์ค‘์— ์ฐจ์ด๋ฅผ mergeํ•  ํ•„์š”๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ›  Git Branch workflow

image

  • Squash and Merge ๋ฐฉ๋ฒ•์„ ์ฐจ์šฉํ•˜์—ฌ Issue,Feature ๋‹จ์œ„ ์ปค๋ฐ‹์„ ํ†ตํ•ด Merge์‹œ ์ง„ํ–‰ ์‚ฌํ•ญ ๊ตฌ์กฐ ์†์‰ฝ๊ฒŒ ํŒŒ์•…ํ•˜๋Š” ๊ฒƒ์„ ๋ชฉ์ ์œผ๋กœํ•œ๋‹ค.
  • ๊ฐ branch PR์‹œ ์ด์Šˆํ™”ํ•˜์—ฌ ์ฝ”๋“œ์— ๋Œ€ํ•œ ํ”ผ๋“œ๋ฐฑ ๋ฐ ํ† ๋ก  ํ›„ ์ƒ๋Œ€๋ฐฉ์ด Merge

๋ธŒ๋žœ์น˜ ๋„ค์ด๋ฐ

โš™๏ธย ๋„ค์ด๋ฐ ํŒจํ„ด

๋ธŒ๋žœ์น˜ ์ข…๋ฅ˜/์ด์Šˆ๋ฒˆํ˜ธ-๊ฐ„๋‹จํ•œ ์„ค๋ช…

Ex) ์ด์Šˆ๋ฒˆํ˜ธ๊ฐ€ 67์ธ '๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ' ์ด์Šˆ๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๊ฒฝ์šฐ, ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์„feature/67-login๋กœ ์ž‘์„ฑํ•œ๋‹ค.

์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€

โš™ ๋ฉ”์‹œ์ง€ ๊ตฌ์กฐ

Type : ์ œ๋ชฉ #์ด์Šˆ๋ฒˆํ˜ธ

๋ณธ๋ฌธ

**Ex)**์ด์Šˆ๋ฒˆํ˜ธ๊ฐ€ 67์ธ ์ด์Šˆ์˜ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•œ ๋’ค ์ปค๋ฐ‹์„ ํ•˜๋Š” ์ƒํ™ฉ์ด๋ผ๋ฉด ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€์˜ ์ œ๋ชฉ์„feat : A๊ธฐ๋Šฅ ๊ตฌํ˜„ #67์œผ๋กœ ์ž‘์„ฑํ•œ๋‹ค.

โš™ Type

  • feat : ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์— ๋Œ€ํ•œ ์ปค๋ฐ‹
  • fix : ๋ฒ„๊ทธ ์ˆ˜์ •์— ๋Œ€ํ•œ ์ปค๋ฐ‹
  • ci/cd : ๋ฐฐํฌ ์ปค๋ฐ‹
  • docs : ๋ฌธ์„œ ์ˆ˜์ •์— ๋Œ€ํ•œ ์ปค๋ฐ‹
  • style : ์ฝ”๋“œ ์Šคํƒ€์ผ ํ˜น์€ ํฌ๋งท ๋“ฑ์— ๊ด€ํ•œ ์ปค๋ฐ‹
  • refactor : ์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง์— ๋Œ€ํ•œ ์ปค๋ฐ‹
  • test : ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ์ˆ˜์ •์— ๋Œ€ํ•œ ์ปค๋ฐ‹
  • chore : ํŒจํ‚ค์ง€ ๊ด€๋ จ ๋ฐ ๋นŒ๋“œ์ฝ”๋“œ ์ˆ˜์ •

3. ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

  • lombok
  • JPA
  • Spring Security
  • JDBC
  • Log4j2
  • SockJS , STOMP
  • JSON ObjectMapper
  • JWT
  • Aws Secret Manager
  • Querydsl
  • Swagger
  • Oauth2.0
  • Spring Rest docs
  • RestAPI
  • Redis
  • Youtube API

๊ฐœ๋ฐœ๊ธฐ๊ฐ„

2023 05 02 ~ ing

About

๐ŸŽต ํ”Œ๋ ˆ์ด๋ฆฌ์ŠคํŠธ ์ทจํ–ฅ์„ ๊ณต์œ ํ•˜๊ณ  ์นœ๊ตฌ๋ฅผ ๋งŒ๋“ค์ž ๐ŸŽต

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published