Skip to content

๐Ÿ’š๐Ÿ› แ—ฉแ‘Ž แ—ดแ—ฉแ–‡แ’ชฦณ แ”•แ‘Œแ‘Žแ—ทแ—ฉแ—ด แ‘•แ—ฉไธ…แ‘•แ•ผ ไธ…แ•ผแ—ด แ—ชแ—แ—แ—ทแ‘Œแ—ฐ ๐Ÿ›๐Ÿ’š

Notifications You must be signed in to change notification settings

TeamNado-Sunbae/NadoSunbae-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๋‚˜๋„์„ ๋ฐฐ NadoSunbae - Server

nadosunbae

์ œ2์ „๊ณต์ƒ์„ ์œ„ํ•œ ํ•™๊ณผ ํ›„๊ธฐ, ์ „๊ณต ์ •๋ณด ๊ณต์œ  ํ”Œ๋žซํผ "๋‚˜๋„์„ ๋ฐฐ"

์•„๋Š” ์„ ๋ฐฐ ์—†์–ด๋„ ๊ดœ์ฐฎ์•„. ์šฐ๋ฆฌ ๊ฐ™์ด ์„œ๋กœ์˜ ์„ ๋ฐฐ๊ฐ€ ๋˜์–ด์ฃผ์ž!
๋‚˜๋„์„ ๋ฐฐ๋Š” ํ›„๊ธฐ์™€ ๊ณผ๋ฐฉ ํƒญ์„ ํ†ตํ•ด ์ธ์  ๋„คํŠธ์›Œํฌ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

SOPT 29th APPJAM
ํ”„๋กœ์ ํŠธ ๊ธฐ๊ฐ„: 2021.12.18 ~
๋ฆด๋ฆฌ์ฆˆ: 2022.03


๐ŸŒฒ Menu Tree

menuTree

๐Ÿ“‹ IA

nadosunbaeIAแ„‰แ…ฎแ„Œแ…ฅแ†ผแ„‡แ…ฉแ†ซ

๐Ÿ“š API ๋ช…์„ธ์„œ

๋ช…์„ธ์„œ ๋ณด๊ธฐ

๐Ÿ“Œ Branch Strategy

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

๐Ÿ“Œ Conventions

Commit Convention
  • [ํƒœ๊ทธ] ๋‚ด์šฉ ์˜ ํ˜•ํƒœ๋กœ ์ž‘์„ฑ
    ex) [FEAT] implement postGET
ํƒœ๊ทธ ์ด๋ฆ„ ์„ค๋ช…
CHORE ๋นŒ๋“œ ํƒœ์ŠคํŠธ ์—…๋ฐ์ดํŠธ, ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €๋ฅผ ์„ค์ •ํ•˜๋Š” ๊ฒฝ์šฐ(ํ”„๋กœ๋•์…˜ ์ฝ”๋“œ ๋ณ€๊ฒฝ X)
FEAT ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์„ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒฝ์šฐ
!HOTFIX ๊ธ‰ํ•˜๊ฒŒ ์น˜๋ช…์ ์ธ ๋ฒ„๊ทธ๋ฅผ ๊ณ ์ณ์•ผํ•˜๋Š” ๊ฒฝ์šฐ
FIX ๋ฒ„๊ทธ, ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
STYLE ์ฝ”๋“œ ํฌ๋งท ๋ณ€๊ฒฝ, ์„ธ๋ฏธ ์ฝœ๋ก  ๋ˆ„๋ฝ, ์ฝ”๋“œ ์ˆ˜์ •์ด ์—†๋Š” ๊ฒฝ์šฐ
DELETE ์“ธ๋ชจ์—†๋Š” ์ฝ”๋“œ ์‚ญ์ œ
DOCS README๋‚˜ WIKI ๋“ฑ์˜ ๋ฌธ์„œ ๊ฐœ์ •
MOVE ํ”„๋กœ์ ํŠธ ๋‚ด ํŒŒ์ผ์ด๋‚˜ ์ฝ”๋“œ์˜ ์ด๋™
RENAME ํŒŒ์ผ ์ด๋ฆ„ ๋ณ€๊ฒฝ
REFACTOR ํ”„๋กœ๋•์…˜ ์ฝ”๋“œ ๋ฆฌํŒฉํ† ๋ง
COMMENT ํ•„์š”ํ•œ ์ฃผ์„ ์ถ”๊ฐ€ ๋ฐ ๋ณ€๊ฒฝ
TEST ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€, ํ…Œ์ŠคํŠธ ๋ฆฌํŒฉํ† ๋ง(ํ”„๋กœ๋•์…˜ ์ฝ”๋“œ ๋ณ€๊ฒฝ X)
Issue, PR Convention
  • ๋ณ€์ˆ˜๋‚˜ ํด๋”๋ช…์€ ์˜์–ด๋กœ ์“ฐ๋˜, ์„ค๋ช…์€ ํ•œ๊ธ€๋กœ ์ž‘์„ฑ
  • Issue
    • [์˜์–ด ๋Œ€๋ฌธ์ž] ๋‚ด์šฉ
  • PR
    • [์˜์–ด ๋Œ€๋ฌธ์ž] #์ด์Šˆ ๋ฒˆํ˜ธ - ํ•ด๋‹น ์ด์Šˆ ๋‚ด์šฉ
      • ์ด์Šˆ์™€ ๋‚ด์šฉ์ด ๋™์ผํ•  ํ•„์š”๋Š” ์—†์Œ
      • ์ด์Šˆ ๋ฒˆํ˜ธ๋Š” ๋™์ผ ํ•ด์•ผ ํ•จ
Coding Convention
  • ๋ณ€์ˆ˜๋ช…
    • Camel Case ์‚ฌ์šฉ
    • ํ•จ์ˆ˜์˜ ๊ฒฝ์šฐ ๋™์‚ฌ+๋ช…์‚ฌ ์‚ฌ์šฉ ex) getInformation()
    • ๊ธธ์ด๋Š” 20์ž๋กœ ์ œํ•œ
    • flag๋กœ ์‚ฌ์šฉ ๋˜๋Š” ๋ณ€์ˆ˜๋Š” ์กฐ๋™์‚ฌ + flag ์ข…๋ฅ˜๋กœ ๊ตฌ์„ฑ
    • ์•ฝ์–ด๋Š” ๋˜๋„๋ก ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค.

  • ์ฃผ์„
    • ํ•œ์ค„ ์ฃผ์„์€ // ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
    • ๊ทธ ์ด์ƒ์€ /** */ ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.
    • ํ•จ์ˆ˜ ์„ค๋ช… ์ฃผ์„์€ 2๋ฒˆ์„ ์‚ฌ์šฉํ•œ๋‹ค.

  • Bracket
// ํ•œ์ค„ if ๋ฌธ - ์—ฌ๋Ÿฌ ์ค„๋กœ ์ž‘์„ฑ
 if(trigger) {
   return;
 }
// ๊ด„ํ˜ธ ์‚ฌ์šฉ ํ•œ์นธ ๋„์šฐ๊ณ  ์‚ฌ์šฉํ•œ๋‹ค.
 if (left == true) {
    return;
 }
// ๋„์–ด์“ฐ๊ธฐ
 if (a == 5) { // ์–‘์ชฝ ์‚ฌ์ด๋กœ ๋„์–ด์“ฐ๊ธฐ
    return;  
 }

  • ๋น„๋™๊ธฐ ํ•จ์ˆ˜์˜ ์‚ฌ์šฉ
    • async, await ํ•จ์ˆ˜ ์‚ฌ์šฉ์„ ์ง€ํ–ฅํ•œ๋‹ค.
    • Promise ์‚ฌ์šฉ์€ ์ง€์–‘ํ•œ๋‹ค.

๐Ÿ—‚ Foldering

ํŽผ์ณ๋ณด๊ธฐ
|-๐Ÿ“‹ firebaserc
|-๐Ÿ“‹ firebase.json
|-๐Ÿ“‹ .gitignore
|-๐Ÿ“ functions_
               |- ๐Ÿ“‹ index.js
               |- ๐Ÿ“‹ package.json
               |- ๐Ÿ“‹ .gitignore
               |- ๐Ÿ“‹ .env
               |- ๐Ÿ“ api_ 
               |         |- ๐Ÿ“‹ index.js
               |         |- ๐Ÿ“ routes_
               |                      |- ๐Ÿ“‹ index.js
               |
               |- ๐Ÿ“ config_ 
               |            |- ๐Ÿ“‹ dbConfig.js
               |            |- ๐Ÿ“‹ firebaseClient.js
               |
               |- ๐Ÿ“ constants_
               |               |- ๐Ÿ“‹ appVersion.js
               |               |- ๐Ÿ“‹ jwt.js
               |               |- ๐Ÿ“‹ notificationType.js
               |               |- ๐Ÿ“‹ postType.js
               |               |- ๐Ÿ“‹ reportPeriodType.js
               |               |- ๐Ÿ“‹ reportType.js
               |               |- ๐Ÿ“‹ responseMessage.js
               |               |- ๐Ÿ“‹ reviewPostContent.js
               |               |- ๐Ÿ“‹ statusCode.js
               |
               |- ๐Ÿ“ db_ 
               |        |- ๐Ÿ“‹ db.js
               |        |- ๐Ÿ“‹ index.js
               |        |- ๐Ÿ“‹ block.js
               |        |- ๐Ÿ“‹ classroomPost.js
               |        |- ๐Ÿ“‹ comment.js
               |        |- ๐Ÿ“‹ image.js
               |        |- ๐Ÿ“‹ like.js
               |        |- ๐Ÿ“‹ major.js
               |        |- ๐Ÿ“‹ notification.js
               |        |- ๐Ÿ“‹ relationReviewPostTag.js
               |        |- ๐Ÿ“‹ report.js
               |        |- ๐Ÿ“‹ reviewPost.js
               |        |- ๐Ÿ“‹ tag.js
               |        |- ๐Ÿ“‹ university.js
               |        |- ๐Ÿ“‹ user.js
               |
               |- ๐Ÿ“ lib_
               |         |- ๐Ÿ“‹ convertSnakeToCamel.js
               |         |- ๐Ÿ“‹ dateHandlers.js
               |         |- ๐Ÿ“‹ jwtHandlers.js
               |         |- ๐Ÿ“‹ pushAlarmHandlers.js
               |         |- ๐Ÿ“‹ util.js
               |
               |- ๐Ÿ“ middlewares_
                                 |- ๐Ÿ“‹ auth.js
                                 |- ๐Ÿ“‹ slackAPI.js
               

โš™๏ธ Dependencies Module

ํŽผ์ณ๋ณด๊ธฐ
{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "lint": "eslint .",
    "serve": "cross-env NODE_ENV=development firebase emulators:start --only functions",
    "shell": "firebase functions:shell",
    "start": "npm run shell",
    "deploy": "cross-env NODE_ENV=production firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "engines": {
    "node": "16"
  },
  "main": "index.js",
  "dependencies": {
    "axios": "^0.25.0",
    "cookie-parser": "^1.4.6",
    "cors": "^2.8.5",
    "dayjs": "^1.10.7",
    "dotenv": "^10.0.0",
    "eslint-config-prettier": "^8.3.0",
    "express": "^4.17.2",
    "firebase": "^9.6.2",
    "firebase-admin": "^9.8.0",
    "firebase-functions": "^3.18.1",
    "floor": "^0.0.0",
    "helmet": "^5.0.1",
    "hpp": "^0.2.3",
    "jsonwebtoken": "^8.5.1",
    "lodash": "^4.17.21",
    "math-random": "^2.0.1",
    "pg": "^8.7.1"
  },
  "devDependencies": {
    "eslint": "^7.6.0",
    "eslint-config-google": "^0.14.0",
    "firebase-functions-test": "^0.2.0"
  },
  "private": true
}

๐Ÿงฉ Role

Name Role
juhyeon DB ์„ค๊ณ„, API ๋ช…์„ธ์„œ ์ž‘์„ฑ, API ๊ตฌํ˜„, README ์ž‘์„ฑ
eunji DB ์„ค๊ณ„, API ๋ช…์„ธ์„œ ์ž‘์„ฑ, API ๊ตฌํ˜„, ์ž๋™ ํ…Œ์ŠคํŠธ ํ™˜๊ฒฝ ๊ตฌ์ถ•
seol DB ์„ค๊ณ„, API ๋ช…์„ธ์„œ ์ž‘์„ฑ, ์ดˆ๊ธฐ ์„ธํŒ…, API ๊ตฌํ˜„

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

๋ณ€์ฃผํ˜„ ๊น€์€์ง€ ์„ค์ง€์›
wngus4296 eunji8784 seoljiwon

About

๐Ÿ’š๐Ÿ› แ—ฉแ‘Ž แ—ดแ—ฉแ–‡แ’ชฦณ แ”•แ‘Œแ‘Žแ—ทแ—ฉแ—ด แ‘•แ—ฉไธ…แ‘•แ•ผ ไธ…แ•ผแ—ด แ—ชแ—แ—แ—ทแ‘Œแ—ฐ ๐Ÿ›๐Ÿ’š

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •