Skip to content

๐Ÿ›  ีชึ…ึ…ษพรญาึ…ีฒ ีาฝษพัตาฝษพ รญี ฯฒึ…สรญีฒึ ีึ…ึ…ีฒ ๐Ÿ› 

Notifications You must be signed in to change notification settings

TeamDooRiBon/DooRi-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

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

Repository files navigation

Dooribon Server

image

์ž‘์€ ์›€์ง์ž„์ด ๋งŒ๋“œ๋Š” ์šฐ๋ฆฌ๋‹ค์šด ์—ฌํ–‰ ๋‘๋ฆฌ๋ฒˆ

๋‘๋ฆฌ๋ฒˆ ์˜ ํ•ต์‹ฌ ๊ธฐ๋Šฅ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

๊ทธ๋ฃน์„ฑํ–ฅํŒŒ์•…, ์œ„์‹œ๋ฆฌ์ŠคํŠธ, ์—ฌํ–‰๋ณด๋“œ, ์ผ์ •๊ด€๋ฆฌ

๋‘๋ฆฌ๋ฒˆ์„ ํ†ตํ•ด ํ•จ๊ป˜ ์—ฌํ–‰ํ•˜๋Š” ์‚ฌ๋žŒ๋“ค์˜ ์„ฑํ–ฅ์„ ํŒŒ์•…ํ•˜๊ณ , ์ฆ๊ฑฐ์šด ์—ฌํ–‰์„ ๋งŒ๋“ค์–ด ๊ฐ€์„ธ์š”.

SOPT 28th APPJAM

ํ”„๋กœ์ ํŠธ ๊ธฐ๊ฐ„: 2021.06.26 ~ 2021.07.17

๐Ÿ“‹ IA

แ„‹แ…ขแ†ธแ„Œแ…ขแ†ทแ„‹แ…ญแ†ผ IA

๐Ÿ’ก API ๋ช…์„ธ์„œ

API ๋ช…์„ธ์„œ ์ตœ์ข…

๐Ÿ›  Development Environment

๐Ÿ›  Server Architecture

image

๐Ÿ“‹ Model Diagram

DooRibonDiagram

โš™๏ธ Dependencies Module

"devDependencies": {
    "@types/express": "^4.17.11",
    "@types/mongoose": "^5.10.5",
    "@types/node": "^15.6.0",
    "nodemon": "^2.0.7",
    "ts-node": "^9.1.1",
    "typescript": "^4.2.4"
  },
  "dependencies": {
    "axios": "^0.21.1",
    "bcryptjs": "^2.4.3",
    "dotenv": "^9.0.2",
    "express": "^4.17.1",
    "express-validator": "^6.12.0",
    "jsonwebtoken": "^8.5.1",
    "mongoose": "^5.13.2",
    "nanoid": "^3.1.23",
    "qs": "^6.10.1"
  }

๐Ÿ“Œ Branch Strategy

Git Workflow
 1. local - feature์—์„œ ๊ฐ์ž ๊ธฐ๋Šฅ ์ž‘์—…
 2. ์ž‘์—… ์™„๋ฃŒ ํ›„ local - develop (ex. xxeol) ์— PR ํ›„ Merge
 3. ์ดํ›„ remote - develop ์œผ๋กœ PR
 4. ์ฝ”๋“œ ๋ฆฌ๋ทฐ ํ›„ Confirm ๋ฐ›๊ณ  Merge
 5. remote - develop ์— Merge ๋  ๋•Œ ๋งˆ๋‹ค ๋ชจ๋“  ํŒ€์› remote - develop pull ๋ฐ›์•„ ์ตœ์‹  ์ƒํƒœ ์œ ์ง€
Branch Name ์„ค๋ช…
main ์ดˆ๊ธฐ ์„ธํŒ… ์กด์žฌ
develop ๋กœ์ปฌ develop merge ๋ธŒ๋žœ์น˜
jobchae ์ •์•„ ๋กœ์ปฌ develop ๋ธŒ๋žœ์น˜
xxeol ์„คํฌ ๋กœ์ปฌ develop ๋ธŒ๋žœ์น˜
judy ์ฃผํ˜„ ๋กœ์ปฌ develop ๋ธŒ๋žœ์น˜
localdevelop_feature/#issue ๊ฐ์ž ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ๋ธŒ๋žœ์น˜

๐Ÿ“Œ Commit Convention

ํƒœ๊ทธ: ์ œ๋ชฉ์˜ ํ˜•ํƒœ

ํƒœ๊ทธ ์ด๋ฆ„ ์„ค๋ช…
feat ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•  ๊ฒฝ์šฐ
fix ๋ฒ„๊ทธ๋ฅผ ๊ณ ์นœ ๊ฒฝ์šฐ
!BREAKING CHANGE ์ปค๋‹ค๋ž€ API ๋ณ€๊ฒฝ์˜ ๊ฒฝ์šฐ
!HOTFIX ๊ธ‰ํ•˜๊ฒŒ ์น˜๋ช…์ ์ธ ๋ฒ„๊ทธ๋ฅผ ๊ณ ์ณ์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ
style ์ฝ”๋“œ ํฌ๋งท ๋ณ€๊ฒฝ, ์„ธ๋ฏธ ์ฝœ๋ก  ๋ˆ„๋ฝ, ์ฝ”๋“œ ์ˆ˜์ •์ด ์—†๋Š” ๊ฒฝ์šฐ
comment ํ•„์š”ํ•œ ์ฃผ์„ ์ถ”๊ฐ€ ๋ฐ ๋ณ€๊ฒฝ
docs ๋ฌธ์„œ๋ฅผ ์ˆ˜์ •ํ•œ ๊ฒฝ์šฐ (ex. README ์ˆ˜์ •)
rename ํŒŒ์ผ ํ˜น์€ ํด๋”๋ช…์„ ์ˆ˜์ •ํ•˜๊ฑฐ๋‚˜ ์˜ฎ๊ธฐ๋Š” ์ž‘์—…์ธ ๊ฒฝ์šฐ
remove ํŒŒ์ผ์„ ์‚ญ์ œํ•˜๋Š” ์ž‘์—…๋งŒ ์ˆ˜ํ–‰ํ•œ ๊ฒฝ์šฐ
chore ๋นŒ๋“œ ํƒœ์Šคํฌ ์—…๋ฐ์ดํŠธ, ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €๋ฅผ ์„ค์ •ํ•˜๋Š” ๊ฒฝ์šฐ

๐Ÿ“Œ Coding Convention

๋ณ€์ˆ˜๋ช…
  1. Camel Case ์‚ฌ์šฉ
  • lower Camel Case
  1. ํ•จ์ˆ˜์˜ ๊ฒฝ์šฐ ๋™์‚ฌ+๋ช…์‚ฌ ์‚ฌ์šฉ
  • ex) getInformation()
  1. ๊ธธ์ด๋Š” 20์ž๋กœ ์ œํ•œํ•œ๋‹ค.
  • ๋ถ€๋“์ดํ•œ ๊ฒฝ์šฐ ํŒ€์›๊ณผ์˜ ์ƒ์˜๋ฅผ ๊ฑฐ์นœ๋‹ค.
  1. flag๋กœ ์‚ฌ์šฉ ๋˜๋Š” ๋ณ€์ˆ˜๋Š” ์กฐ๋™์‚ฌ + flag ์ข…๋ฅ˜๋กœ ๊ตฌ์„ฑ
  • ex) isNum
  1. ์•ฝ์–ด๋Š” ๋˜๋„๋ก ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค.
์ฃผ์„
  1. ํ•œ์ค„ ์ฃผ์„์€ // ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  2. ๊ทธ ์ด์ƒ์€ /** */ ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
  3. ํ•จ์ˆ˜ ์„ค๋ช… ์ฃผ์„์€ 2๋ฒˆ์„ ์‚ฌ์šฉํ•œ๋‹ค.
Bracket
// ํ•œ์ค„ if ๋ฌธ - ์—ฌ๋Ÿฌ ์ค„๋กœ ์ž‘์„ฑ
 if(trigger) {
   return;
 }
// ๊ด„ํ˜ธ ์‚ฌ์šฉ ํ•œ์นธ ๋„์šฐ๊ณ  ์‚ฌ์šฉํ•œ๋‹ค.
 if (left == true) {
    return;
 }
// ๋„์–ด์“ฐ๊ธฐ
 if (a == 5) { // ์–‘์ชฝ ์‚ฌ์ด๋กœ ๋„์–ด์“ฐ๊ธฐ
    return;  
 }
๋น„๋™๊ธฐ ํ•จ์ˆ˜์˜ ์‚ฌ์šฉ
  1. async, await ํ•จ์ˆ˜ ์‚ฌ์šฉ์„ ์ง€ํ–ฅํ•œ๋‹ค.
  2. Promise ์‚ฌ์šฉ์€ ์ง€์–‘ํ•œ๋‹ค.
DataBase
  1. Model ํŒŒ์ผ๋ช…์€ ๋Œ€๋ฌธ์ž
  2. ํ•„๋“œ๋ช…์€ CamelCase ์‚ฌ์šฉ

๐Ÿ™‹๐Ÿปโ€โ™€๏ธ ๋‹ด๋‹น

DB ์„ค๊ณ„
๊ธฐ๋Šฅ๋ช… ๋‹ด๋‹น์ž ์™„๋ฃŒ ์—ฌ๋ถ€
User Model ์„ค๊ณ„ ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
Group Model ์„ค๊ณ„ ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
Schedule Model ์„ค๊ณ„ ์ •์„คํฌ ์™„๋ฃŒ
Wish Model ์„ค๊ณ„ ์ฑ„์ •์•„ ์™„๋ฃŒ
Board Model ์„ค๊ณ„ ์ฑ„์ •์•„ ์™„๋ฃŒ
api ๊ตฌํ˜„
๊ธฐ๋Šฅ๋ช… ๋‹ด๋‹น์ž ์™„๋ฃŒ ์—ฌ๋ถ€
์นด์นด์˜ค ๋กœ๊ทธ์ธ ์ฑ„์ •์•„ ์™„๋ฃŒ
์—ฌํ–‰ ์ƒ์„ฑ ์ฑ„์ •์•„ ์™„๋ฃŒ
์—ฌํ–‰ ๊ทธ๋ฃน ๋ฉค๋ฒ„ ์ถ”๊ฐ€ ์ฑ„์ •์•„ ์™„๋ฃŒ
๊ทธ๋ฃน ์„ฑํ–ฅ ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ ์กฐํšŒ ์ฑ„์ •์•„ ์™„๋ฃŒ
์„ฑํ–ฅ ํ…Œ์ŠคํŠธ ์งˆ๋ฌธ ์กฐํšŒ ์ฑ„์ •์•„ ์™„๋ฃŒ
์—ฌํ–‰ ์ผ์ • ์‚ญ์ œ ์ฑ„์ •์•„ ์™„๋ฃŒ
์—ฌํ–‰ ๋ณ„ ์ด๋ฏธ์ง€ ์กฐํšŒ ์ฑ„์ •์•„ ์™„๋ฃŒ
์—ฌํ–‰ ์ •๋ณด ์กฐํšŒ ์ฑ„์ •์•„ ์™„๋ฃŒ
์„ฑํ–ฅ ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ ์ €์žฅ ์ฑ„์ •์•„ ์™„๋ฃŒ
์„ฑํ–ฅ ํ…Œ์ŠคํŠธ ์นด์šดํŒ… ์กฐํšŒ ์ฑ„์ •์•„ ์™„๋ฃŒ
ec2 ๋ฐฐํฌ, s3 ๊ด€๋ฆฌ ์ฑ„์ •์•„ ์™„๋ฃŒ
์ผ์ž ๋ณ„ ์—ฌํ–‰ ์ผ์ • ์กฐํšŒ ์ •์„คํฌ ์™„๋ฃŒ
ํŠน์ • ์—ฌํ–‰ ์ผ์ • ์กฐํšŒ ์ •์„คํฌ ์™„๋ฃŒ
์ผ์ž ๋ณ„ ์—ฌํ–‰ ์ผ์ • ์กฐํšŒ ์ •์„คํฌ ์™„๋ฃŒ
์—ฌํ–‰ ์ผ์ • ์ถ”๊ฐ€ ์ •์„คํฌ ์™„๋ฃŒ
์—ฌํ–‰ ์ผ์ • ์ˆ˜์ • ์ •์„คํฌ ์™„๋ฃŒ
์—ฌํ–‰ ๋ณด๋“œ ์ถ”๊ฐ€ ์ •์„คํฌ ์™„๋ฃŒ
์—ฌํ–‰ ์ด๋ฏธ์ง€ ์ „์ฒด ์กฐํšŒ ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
์ฐธ์—ฌ์ฝ”๋“œ๋กœ ์—ฌํ–‰ ์ฐธ์—ฌ, ์ •๋ณด ์กฐํšŒ ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
๋งˆ์ดํŽ˜์ด์ง€ ์กฐํšŒ ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
์—ฌํ–‰ ์ˆ˜์ • ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
์—ฌํ–‰ ๋ณด๋“œ ์กฐํšŒ ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
์—ฌํ–‰ ๋ณด๋“œ ์ˆ˜์ • ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
์—ฌํ–‰ ๋ณด๋“œ ์‚ญ์ œ ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ
์‚ฌ์šฉ์ž ๊ธฐ๊ฐ„ ๋ณ„ ์—ฌํ–‰ ์กฐํšŒ ๋ณ€์ฃผํ˜„ ์™„๋ฃŒ

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป Developers

์ฑ„์ •์•„ ์ •์„คํฌ ๋ณ€์ฃผํ˜„
jokj624 xxeol2 wngus4296

About

๐Ÿ›  ีชึ…ึ…ษพรญาึ…ีฒ ีาฝษพัตาฝษพ รญี ฯฒึ…สรญีฒึ ีึ…ึ…ีฒ ๐Ÿ› 

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published