Skip to content

32nd GoSopt WebJam ๐ŸŒณLesson ๐Ÿ””Notification ๐ŸŽService

Notifications You must be signed in to change notification settings

Gwasuwon-shot/Tutice_Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Tutice_Server

32nd GoSopt WebJam ๐ŸŒณLesson ๐Ÿ””Notification ๐ŸŽService



๐Ÿ”” ์‰ฌ์šด ์ˆ˜์—… ๊ด€๋ฆฌ๋กœ ์—ด๋ฆฌ๋Š” ์ •ํ™•ํ•œ ๋‚˜์˜ ๊ฒฐ์‹ค ๐ŸŒณ
๊ณผ์™ธ์˜ ์ถœ๊ฒฐ ์ฒดํฌ๋ถ€ํ„ฐ ์ˆ˜์—…๋น„ ๊ด€๋ฆฌ๊นŒ์ง€ ํ•œ๋ฒˆ์˜ ํด๋ฆญ์œผ๋กœ ์‰ฝ๊ฒŒ ๊ด€๋ฆฌํ•˜๋Š” ์„œ๋น„์Šค



๐ŸŠ๐Ÿ‹ Team Gwasuwon BE

image image
๐ŸŠ์œ ์ˆ˜ํ™”๐ŸŠ ๐Ÿ‹๋ฐ•์†Œ์ •๐Ÿ‹
๐ŸŽ FCM ์•Œ๋ฆผ ๊ตฌํ˜„ ๐Ÿ ๋„์ปค&์  ํ‚จ์Šค CI/CD
๐ŸŽ Lesson ๊ด€๋ จ api ๐Ÿ ๋กœ์ปฌ ๋กœ๊ทธ์ธ&ํšŒ์›๊ฐ€์ž…
๐ŸŽ Payment ๊ด€๋ จ api ๐Ÿ Schedule ๊ด€๋ จ api


๐Ÿง‘โ€๐Ÿ”ง Tech Stack

Backend

JWT

DB

CI/CD

Deploy

Develop Tool

Communicate Tool





๐Ÿ  server architecture

image



๐Ÿ“ Folder ๊ตฌ์กฐ

โ”œโ”€โ”€ ๐Ÿ“‚ย main
	โ”œโ”€โ”€ ๐Ÿ—‚๏ธย resources
		โ”œโ”€โ”€ ๐Ÿ“•ย application.yaml

	โ”œโ”€โ”€ ๐Ÿ“‚ย domain
		โ”œโ”€โ”€ ๐Ÿ“‚ย entity(์—”ํ‹ฐํ‹ฐ)
		โ”œโ”€โ”€ ๐Ÿ“‚ย controller(์ปจํŠธ๋กค๋Ÿฌ ํŒŒ์ผ)
		โ”œโ”€โ”€ ๐Ÿ“‚ repository(๋ ˆํฌ์ง€ํ† ๋ฆฌ ํด๋”)
		โ”œโ”€โ”€ ๐Ÿ“‚ย service(์„œ๋น„์Šค ํŒŒ์ผ)
		โ”œโ”€โ”€ ๐Ÿ“‚ย exception(Exception class ํŒŒ์ผ)
			โ”œโ”€โ”€โ”€ ๐Ÿ—‚๏ธย advice

		โ”œโ”€โ”€ ๐Ÿ“‚ย dto(dto ํŒŒ์ผ)
			โ”œโ”€โ”€ ๐Ÿ—‚๏ธย request
			โ”œโ”€โ”€ ๐Ÿ—‚๏ธย response
			โ”œโ”€โ”€ ๐Ÿ—‚๏ธ assembler

	โ”œโ”€โ”€ ๐Ÿ“‚ย common(๊ณต์šฉ ํด๋ž˜์Šค ๊ด€๋ฆฌ)
		โ”œโ”€โ”€ ๐Ÿ—‚๏ธย entity(๊ณตํ†ต ์—”ํ‹ฐํ‹ฐ)
		โ”œโ”€โ”€ ๐Ÿ—‚๏ธย dto (๊ณตํ†ต DTO)
		โ”œโ”€โ”€ ๐Ÿ—‚๏ธย exception (๊ณตํ†ต exception enum, BasicException)
		โ”œโ”€โ”€ ๐Ÿ—‚๏ธย advice
		โ”œโ”€โ”€ ๐Ÿ—‚๏ธย resolver

	โ”œโ”€โ”€ ๐Ÿ“‚ย external(์™ธ๋ถ€ ๊ด€๋ฆฌ)
	โ”œโ”€โ”€ ๐Ÿ“‚ย config(์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ)

โ”œโ”€โ”€ ๐Ÿ“‚ย test


๐Ÿ’ฝย DB ERD

image



๐Ÿ“„ API Docs

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-04-05 แ„‹แ…ฉแ„’แ…ฎ 6 25 31 แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-04-05 แ„‹แ…ฉแ„’แ…ฎ 6 26 23 แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-04-05 แ„‹แ…ฉแ„’แ…ฎ 6 26 55 แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2024-04-05 แ„‹แ…ฉแ„’แ…ฎ 6 27 40

๐Ÿƒโ€ ์—ญํ• ๋ถ„๋‹ด & ๊ตฌํ˜„ ์ง„์ฒ™๋„



๐Ÿ—ฃ๏ธ๏ธ ์ปจ๋ฒค์…˜

๐Ÿ’ก ๋™๋ฃŒ๋“ค๊ณผ ๋งํˆฌ๋ฅผ ํ†ต์ผํ•˜๊ธฐ ์œ„ํ•ด ์ปจ๋ฒค์…˜์„ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค. ์˜คํ•ฉ์ง€์กธ์˜ ์ฝ”๋“œ๊ฐ€ ์•„๋‹Œ, ํ•œ ์‚ฌ๋žŒ์ด ์ง  ๊ฒƒ๊ฐ™์€ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์ด ์ถ”ํ›„ ์œ ์ง€๋ณด์ˆ˜๋‚˜ ํ˜‘์—…์—์„œ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค. ๋‚ด๊ฐ€ ์ฝ”๋“œ๋ฅผ ์ƒ๊ฐํ•˜๋ฉด์„œ ์งค ์ˆ˜ ์žˆ๋„๋ก ํ•ด์ฃผ๋Š” ๋ฃฐ์ด๋ผ๊ณ  ์ƒ๊ฐํ•ด๋„ ์ข‹์Šต๋‹ˆ๋‹ค!

๐Ÿ‘ฉโ€๐Ÿ’ปย Coding Conventions

๋ช…๋ช…๊ทœ์น™(Naming Conventions)
  1. ์ด๋ฆ„์œผ๋กœ๋ถ€ํ„ฐ ์˜๋„๊ฐ€ ์ฝํ˜€์งˆ ์ˆ˜ ์žˆ๊ฒŒ ์“ด๋‹ค.

  2. ๋‹จ์ˆ˜๋ฅผ ๊ธฐ๋ณธํ˜•์œผ๋กœ ํ•œ๋‹ค.

    • ๊ธฐ๋Šฅ ์ž์ฒด์—์„œ ๋‹จ์ˆ˜, ๋ณต์ˆ˜๋ฅผ ๊ตฌ๋ถ„ํ•˜๋Š” ๊ฒฝ์šฐ์—๋งŒ ๋ณต์ˆ˜ ์‚ฌ์šฉ ex. ๋‹ค์ค‘์‚ญ์ œ, ๋‹จ์ผ์‚ญ์ œ
  3. DB์˜ ํ…Œ์ด๋ธ”, ํด๋ž˜์Šค์—๋Š” PascalCase๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

  4. ๋ณ€์ˆ˜, ๋ฉ”์†Œ๋“œ์—๋Š” camelCase๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

  5. DB์˜ ํ…Œ์ด๋ธ”์˜ ์นผ๋Ÿผ์—๋Š” snake_case๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

  6. ์ƒ์ˆ˜, enum์—๋Š” UPPER_SNAKE_CASE๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

  7. ๋ฉ”์†Œ๋“œ๋Š” crud + http method(๋™์‚ฌ) + ๋ช…์‚ฌ ํ˜•ํƒœ๋กœ ์ž‘์„ฑํ•œ๋‹ค.

    • c : ex. createUser
    • r : ex. getUser
    • u : ex. updateUser
    • d : ex. deleteUser
  8. ์•ฝ์–ด ์‚ฌ์šฉ์€ ์ตœ๋Œ€ํ•œ ์ง€์–‘ํ•œ๋‹ค.

  9. ์ด๋ฆ„์— ๋„ค ๋‹จ์–ด ์ด์ƒ์ด ๋“ค์–ด๊ฐ€๋ฉด ํŒ€์›๊ณผ ์ƒ์˜๋ฅผ ๊ฑฐ์นœ ํ›„ ์‚ฌ์šฉํ•œ๋‹ค.

์ฃผ์„(Comment)
  1. ํ•ด๋‹น ๋ฉ”์†Œ๋“œ๊ฐ€ ์–ด๋””์— ์“ฐ์ด๋Š”์ง€ ์„ค๋ช…ํ•œ๋‹ค.

  2. ํ•ด๋‹น ๋ถ„๊ธฐ๋ฌธ์ด ์–ด๋–ค ๋ถ„๊ธฐ์ธ์ง€ ์„ค๋ช…ํ•œ๋‹ค.

  3. ๋ฐ˜๋ณต๋ฌธ์—์„œ ์–ด๋–ค ์กฐ๊ฑด์—์„œ ๋ฐ˜๋ณต๋˜๋Š”์ง€ ์„ค๋ช…ํ•œ๋‹ค.

  4. ์ •๋ ฌํ•˜๊ณ  ํ•„ํ„ฐ๋งํ• ๋•Œ ์–ด๋–ค ์กฐ๊ฑด์˜ ์ •๋ ฌ๊ณผ ํ•„ํ„ฐ๋ง์ธ์ง€ ์„ค๋ช…ํ•œ๋‹ค.



๐ŸŒณ Branch

๐ŸŒฑ git branch ์ „๋žต

main branch : ๋ฐฐํฌ ๋‹จ์œ„ branch

dev branch : ์ฃผ์š” ๊ฐœ๋ฐœ branch, main merge ์ „ ๊ฑฐ์น˜๋Š” branch

feat branch: ๊ฐ์ž ๊ฐœ๋ฐœ branch

  • ํ•  ์ผ issue ๋“ฑ๋ก ํ›„ issue ๋ฒˆํ˜ธ์™€ isuue ์ด๋ฆ„์œผ๋กœ branch ์ƒ์„ฑ ํ›„ ์ž‘์—…
    • ex) feat/#issue num-isuue name(๊ธฐ๋Šฅ์š”์•ฝ)
  • ํ•ด๋‹น branch ์ž‘์—… ์™„๋ฃŒ ํ›„ PR ๋ณด๋‚ด๊ธฐ
    • ํ•ญ์ƒ local์—์„œ ์ถฉ๋Œ ํ•ด๊ฒฐ ํ›„ โ†’ remote์— ์˜ฌ๋ฆฌ๊ธฐ
    • reviewer์— ์„œ๋กœ tagํ›„ code-review
    • comment ์ „ merge ๋ถˆ๊ฐ€!
    • review๋ฐ˜์˜ ํ›„, ๋ณธ์ธ์ด merge.

branch ๊ตฌ์กฐ

- main
- dev
- feat
   โ”œโ”€โ”€ #1-isuue name1
   โ””โ”€โ”€ #2-isuue name2


๐Ÿงต Commit Convention

๐Ÿ“ git commit message convention
  • ์ปค๋ฐ‹์€ ํ•œ๊ธ€๋กœ ์ž‘์„ฑํ•œ๋‹ค.

ex) (#13)๐ŸŠfeat : ๋ณ€๊ฒฝ ๋‚ด์šฉ

- ๐ŸŠ feat:      (์ˆ˜ํ™”๊ฐ€) ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ๊ตฌํ˜„
- ๐Ÿ‹ feat:      (์†Œ์ •์ด๊ฐ€) ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ ๊ตฌํ˜„
- ๐Ÿ› fix:       ๋ฒ„๊ทธ, ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
- ๐Ÿงน chore:     src ๋˜๋Š” test ํŒŒ์ผ์„ ์ˆ˜์ •ํ•˜์ง€ ์•Š๋Š” ๊ธฐํƒ€ ๋ณ€๊ฒฝ ์‚ฌํ•ญ ( ์ƒˆ๋กœ์šด ํŒŒ์ผ ์ƒ์„ฑ, ํŒŒ์ผ ์ด๋™, ์ด๋ฆ„ ๋ณ€๊ฒฝ ๋“ฑ )
- โ™ป๏ธ refactor:  ๋ฒ„๊ทธ ์ˆ˜์ •์ด๋‚˜ ๊ธฐ๋Šฅ ์ถ”๊ฐ€๊ฐ€ ์—†๋Š” ์ฝ”๋“œ ๋ณ€๊ฒฝ ( ์ฝ”๋“œ ๊ตฌ์กฐ ๋ณ€๊ฒฝ ๋“ฑ์˜ ๋ฆฌํŒฉํ† ๋ง )
- ๐Ÿ—๏ธ build:    ๋นŒ๋“œ ์‹œ์Šคํ…œ ๋˜๋Š” ์™ธ๋ถ€์— ์˜ํ–ฅ์„ ๋ฏธ์น˜๋Š” ๋ณ€๊ฒฝ ์‚ฌํ•ญ ์ข…์†์„ฑ ( ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€ ๋“ฑ )
- ๐Ÿ“ˆ perf:      ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ ์‹œํ‚ค๊ธฐ ์œ„ํ•œ ์ฝ”๋“œ ๋ณ€๊ฒฝ
- ๐Ÿงช test:      ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€ ๋˜๋Š” ์ด์ „ ํ…Œ์ŠคํŠธ ์ˆ˜์ •
- ๐Ÿ“ docs:      README๋‚˜ WIKI ๋“ฑ์˜ ๋ฌธ์„œ ๊ฐœ์ •
- โช๏ธ revert:    ์ด์ „ ์ปค๋ฐ‹์„ ๋˜๋Œ๋ฆฌ๋Š” ๊ฒฝ์šฐ
- ๐Ÿ“ฆ ci:      CI ๊ตฌ์„ฑ ํŒŒ์ผ ๋ฐ ์Šคํฌ๋ฆฝํŠธ ๋ณ€๊ฒฝ
- ๐Ÿ–‡๏ธย merge: ๋‹ค๋ฅธ๋ธŒ๋ Œ์น˜๋ฅผ mergeํ•˜๋Š” ๊ฒฝ์šฐ
- ๐Ÿ“Œย init : Initial commit์„ ํ•˜๋Š” ๊ฒฝ์šฐ

About

32nd GoSopt WebJam ๐ŸŒณLesson ๐Ÿ””Notification ๐ŸŽService

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published