Skip to content

Latest commit

ย 

History

History
186 lines (118 loc) ยท 6.66 KB

README.md

File metadata and controls

186 lines (118 loc) ยท 6.66 KB

๐Ÿƒ๐Ÿปโ€โ™‚๏ธ๐Ÿƒ๐Ÿปโ€โ™€๏ธ ๋Ÿฌ๋„ˆ์Šคํ•˜์ด Server Repository ๐Ÿƒ๐Ÿปโ€โ™‚๏ธ๐Ÿƒ๐Ÿปโ€โ™€๏ธ

๋Ÿฌ๋‹์„ ๊ฒŒ์ž„์ฒ˜๋Ÿผ, ๋Ÿฌ๋„ˆ์Šคํ•˜์ด

  • SOPT 26th APPJAM

  • ํ”„๋กœ์ ํŠธ ๊ธฐ๊ฐ„: 2020.06.27 ~ 2020.07.18

๐Ÿ“‘ About Project

โœจ ๊ธฐ์กด ๋Ÿฌ๋‹ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜๊ณผ์˜ ํ™•์‹คํ•œ ์ฐจ๋ณ„ํ™” ์š”์†Œ๋ฅผ ์ ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.

  • ์‚ฌ์šฉ์ž๋Š” '์‹ค์‹œ๊ฐ„ ๊ฒฝ์Ÿ'์ด๋ผ๋Š” ๊ฒŒ์ด๋ฏธํ”ผ์ผ€์ด์…˜ ์š”์†Œ๋ฅผ ํ†ตํ•ด ์ง€๋ฃจํ•œ ๋Ÿฌ๋‹์ด ์•„๋‹Œ, ๊ฒŒ์ž„์ฒ˜๋Ÿผ ์œ ์พŒํ•œ ๋Ÿฌ๋‹์„ ์ฆ๊ธธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

โœจ "๋”ฐ๋กœ, ๋˜ ๊ฐ™์ด" ํ•จ๊ป˜ ํ•˜๋Š” ๊ฐ€์น˜๋ฅผ ์ถ”๊ตฌํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค.

  • ์–ด๋–ค ๋‹จ์ฒด์— ์†Œ์†๋˜์ง€ ์•Š์•„๋„, ๊ตณ์ด ์นœ๊ตฌ์™€ ์•ฝ์†์„ ์žก๊ณ  ๋งŒ๋‚˜์ง€ ์•Š์•„๋„, ์‚ฌ์šฉ์ž๋Š” ์–ธ์ œ ์–ด๋””์„œ๋“  ๋‚˜์™€ ํ•จ๊ป˜ ๋›ธ ์ƒ๋Œ€๋ฅผ ์ฐพ์•„ ๊ฐ™์ด ๋Ÿฌ๋‹์„ ์ฆ๊ธธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

โœจ ํŠธ๋ Œ๋””ํ•œ ๋””์ž์ธ์  ์š”์†Œ๋ฅผ ํ†ตํ•ด ์‹œ๊ฐ์ ์ธ ์ฆ๊ฑฐ์›€์„ ์–ป์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • ํŠน์ • ๋ชฉํ‘œ๋ฅผ ๋‹ฌ์„ฑํ•˜๋ฉด ํš๋“ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐœ์„ฑ์žˆ๋Š” ์—ฌ๋Ÿฌ ๊ฐ€์ง€ ๋ฑƒ์ง€๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋‹ค์–‘ํ•œ ๋Ÿฌ๋„ˆ ๋žญํ‚น์„ ํ†ตํ•ด ์‚ฌ์šฉ์ž์˜ ์ฆ๊ฑฐ์›€์„ ๋„๋ชจํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค. ๋˜, ๋ˆ„๊ตฌ๋‚˜ ์‚ฌ์šฉํ•˜๊ธฐ ์‰ฌ์šด UX ์š”์†Œ๋Š” ์ฆ๊ฑฐ์›€์„ ๋ฐฐ๋กœ ํ–ฅ์ƒ์‹œ์ผœ ์ค„ ๊ฑฐ์˜ˆ์š”.

๐Ÿ“ข ํ•ต์‹ฌ ๊ธฐ๋Šฅ

1. ์‹ค์‹œ๊ฐ„ ๋งค์นญ

  • ๋Ÿฌ๋‹๋ชฉํ‘œ์‹œ๊ฐ„, ๋Ÿฌ๋„ˆ์˜ ์„ฑ๋ณ„์— ๋งž๋Š” ์‚ฌ๋žŒ์„ ์‹ค์‹œ๊ฐ„์œผ๋กœ ๋งค์นญํ•œ๋‹ค.
    • ๋งค์นญ์ด ๋œ๋‹ค๋ฉด, ์†Œ์ผ“ ํ†ต์‹ ์„ ํ†ตํ•ด ์ƒ๋Œ€๋ฐฉ ๋Ÿฌ๋„ˆ์™€ ๋Œ€๊ฒฐ์„ ์‹œ์ž‘ํ•œ๋‹ค.
    • ๋งค์นญ์ด ๋˜์ง€ ์•Š๋Š”๋‹ค๋ฉด, ๊ณผ๊ฑฐ์˜ ์ž์‹ ๊ณผ ๋Œ€๊ฒฐํ•˜๊ฒŒ ๋œ๋‹ค.

2. ๋Ÿฌ๋‹

  • ์‹ค์ œ ๋‹ฌ๋ฆฌ๊ณ  ์žˆ๋Š” ๊ฑฐ๋ฆฌ, ์‹œ๊ฐ„, ํŽ˜์ด์Šค ๋“ฑ์„ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์•Œ๋ ค์ค€๋‹ค.
  • ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ƒ๋Œ€๋ฐฉ์ด ์–ด๋Š ์ •๋„ ๋‹ฌ๋ ธ๋Š”์ง€ ๋ณด์—ฌ์ค€๋‹ค.
  • ์Œ์„ฑํ”ผ๋“œ๋ฐฑ์„ ํ†ตํ•ด, ํ˜„์žฌ ๋ช‡ ์‹œ๊ฐ„์ด ๋‚จ์•˜๋Š”์ง€ ์•Œ๋ ค์ค€๋‹ค.
  • ์ž์‹ ์ด ๋‹ฌ๋ ธ๋˜ ๊ธธ์„ ์ขŒํ‘œ, ์ง€๋„๋ฅผ ํ†ตํ•ด ๊ฒฝ๋กœ๋ฅผ ๊ทธ๋ ค์ค€๋‹ค.

3. ๋Ÿฌ๋‹ ๊ธฐ๋ก

  • ์ด์ „์— ๋‹ฌ๋ ธ๋˜ ๋‚˜์˜ ๋Ÿฌ๋‹ ๊ธฐ๋ก๋“ค์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.
  • ๊ธฐ๋ก์—๋Š” ๊ฑฐ๋ฆฌ, ์‹œ๊ฐ„, ํŽ˜์ด์Šค, ์ง€๋„๊ฒฝ๋กœ๋ฅผ ๋ณด์—ฌ์ค€๋‹ค.
  • ๊ณผ๊ฑฐ์— ๊ฐ™์ด ๋›ฐ์—ˆ๋˜ ์ƒ๋Œ€๋ฐฉ์˜ ์ •๋ณด๋„ ์•Œ๋ ค์ค€๋‹ค.

4. ๋Ÿฌ๋‹ ๋žญํ‚น

  • ํ•œ ๋‹ฌ์„ ๊ธฐ์ค€์œผ๋กœ ํ•˜๋Š” ๋Ÿฌ๋„ˆ ๋žญํ‚น ( ์ด๋‹ฌ์˜ ๋Ÿฌ๋„ˆ, ๋ช…์˜ˆ์˜ ์ „๋‹น, ์กŒ.์ž˜.์‹ธ)
  • ๋ฑƒ์ง€ ๊ธฐ๋Šฅ์„ ํ†ตํ•ด ๋Ÿฌ๋‹์„ ํ•˜๋Š” ๊ฒƒ์— ์žˆ์–ด ์ฆ๊ฑฐ์›€์„ ๋Š๋ผ๋„๋ก ์œ ๋„ํ•œ๋‹ค.

๐Ÿ“š API DOCS

Api Description Link

๐Ÿ“š ๋…ธ์…˜๋งํฌ

Notion_Link

๐Ÿ“‚ ERD

ERD

๐Ÿƒโ€โ™‚๏ธ user ๐Ÿƒโ€โ™€๏ธ

์„œ๋น„์Šค ์‚ฌ์šฉ์ž์˜ ์ •๋ณด๋ฅผ ๋‹ด๊ณ  ์žˆ๋Š” ํ…Œ์ด๋ธ”

Column type ์„ค๋ช… PK/FK
user_idx INT ์‚ฌ์šฉ์ž์˜ ์ธ๋ฑ์Šค๊ฐ’ PK
nickname VARCHAR ์‚ฌ์šฉ์ž์˜ ๋‹‰๋„ค์ž„
id VARCHAR ์‚ฌ์šฉ์ž์˜ ID
password VARCHAR ์‚ฌ์šฉ์ž์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ
salt VARCHAR ์‚ฌ์šฉ์ž์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ Salt
gender INT ์‚ฌ์šฉ์ž์˜ ์„ฑ๋ณ„
level INT ์‚ฌ์šฉ์ž์˜ ๋ ˆ๋ฒจ(์ดˆ๊ธ‰, ์ค‘๊ธ‰, ๊ณ ๊ธ‰)
log_visibility TINYINT ์‚ฌ์šฉ์ž์˜ ๋Ÿฌ๋‹ ๊ธฐ๋ก ์กฐํšŒ ๊ฐ€๋Šฅ ์—ฌ๋ถ€(False์ผ ์‹œ ๋žญํ‚น์— ํ•ด๋‹น ์œ ์ € ๋น„ํฌํ•จ)
image INT ์‚ฌ์šฉ์ž์˜ ํ”„๋กœํ•„ ์ด๋ฏธ์ง€
badge VARCHAR ์‚ฌ์šฉ์ž์˜ ๋ฐฐ์ง€ ์†Œ์œ ์—ฌ๋ถ€, 12์ž๋ฆฌ ์ด์ง„์ˆ˜๊ฐ’. ex) 101011000000: 1, 3, 5, 6๋ฒˆ ๋ฐฐ์ง€ ์†Œ์œ 

๐ŸŽฎ game ๐Ÿ•น๏ธ

๊ฒŒ์ž„ ์ง„ํ–‰ ์‹œ ํ•ด๋‹น ๊ฒŒ์ž„์˜ ์ •๋ณด๋ฅผ ๋‹ด๊ณ  ์žˆ๋Š” ํ…Œ์ด๋ธ”

Column type ์„ค๋ช… PK/FK
game_idx INT ๊ฒŒ์ž„์˜ ์ธ๋ฑ์Šค๊ฐ’ PK

๐Ÿ… run ๐Ÿ†

๊ฒŒ์ž„ ์ข…๋ฃŒ ํ›„ ๋Ÿฌ๋‹์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ๋‹ด๊ณ  ์žˆ๋Š” ํ…Œ์ด๋ธ”

Column type ์„ค๋ช… PK/FK
run_idx INT ๋Ÿฌ๋‹์˜ ์ธ๋ฑ์Šค๊ฐ’ PK
user_idx INT ๋Ÿฌ๋‹ ์‚ฌ์šฉ์ž์˜ ์ธ๋ฑ์Šค๊ฐ’ FK
game_idx INT ๊ฒŒ์ž„ ์ธ๋ฑ์Šค๊ฐ’ FK
distance INT ๋Ÿฌ๋‹ ๊ฑฐ๋ฆฌ(m)
time INT ๋Ÿฌ๋‹ ์‹œ๊ฐ„(์ดˆ)
result INT ๋Ÿฌ๋‹ ๊ฒฐ๊ณผ(1: Win, 2: Lose, 3: Escape, 4: nothing, 5: tie)
created_time DATETIME ๋Ÿฌ๋‹ ๋ฐ์ดํ„ฐ ์ƒ์„ฑ์‹œ๊ฐ„(๋งค์นญ ์™„๋ฃŒ ์‹œ๊ฐ„)
end_time DATETIME ๋Ÿฌ๋‹ ๋ฐ์ดํ„ฐ ์™„๋ฃŒ์‹œ๊ฐ„(๋Ÿฌ๋‹ ์™„๋ฃŒ ์‹œ๊ฐ„)

๐Ÿ“ˆ coordinate

running ์ค‘ ์ˆ˜์ง‘ํ•œ ์œ„์น˜ ์ขŒํ‘œ ์ •๋ณด๋ฅผ ๋‹ด๊ณ  ์žˆ๋Š” ํ…Œ์ด๋ธ”

Column type ์„ค๋ช… PK/FK
coordinate_idx INT coordinate์˜ ์ธ๋ฑ์Šค๊ฐ’(PK) PK
run_idx INT ๋Ÿฌ๋‹์˜ ์ธ๋ฑ์Šค๊ฐ’ FK
latitude DOUBLE ์œ„๋„
longitude DOUBLE ๊ฒฝ๋„

ARICHTECTURE

โš™๏ธ Dependencies


   "dependencies": {
    "base64url": "^3.0.1",
    "clean-css": "^4.2.3",
    "cookie-parser": "~1.4.4",
    "debug": "~2.6.9",
    "express": "^4.17.1",
    "express-validation": "^3.0.5",
    "helmet": "^3.23.3",
    "http-errors": "~1.6.3",
    "iconv-lite": "^0.6.2",
    "jsonwebtoken": "^8.5.1",
    "moment": "^2.27.0",
    "moment-timezone": "^0.5.31",
    "morgan": "~1.9.1",
    "mysql": "^2.18.1",
    "nodemailer": "^6.4.10",
    "pool": "^0.4.1",
    "promise-mysql": "^4.1.3",
    "pug": "2.0.0-beta11",
    "socket.io": "^2.3.0"
  }

๐Ÿ’ป ์—ญํ• ๋ถ„๋‹ด


๐Ÿ‘ฆ์˜คํƒœ์ง„

  • DB ์„ค๊ณ„ ๋ฐ ๊ตฌ์ถ•
  • ์†Œ์ผ“ ํ†ต์‹ 

๐Ÿ‘ฉ ์œ ๊ฐ€ํฌ

  • DB ์„ค๊ณ„ ๋ฐ ๊ตฌ์ถ•
  • ๋žญํ‚น, ๊ธฐ๋ก ๊ด€๋ จ API

๐Ÿ‘ฆ์ฃผ์„ธํ™˜

  • DB ์„ค๊ณ„ ๋ฐ ๊ตฌ์ถ•
  • ์œ ์ € ๊ด€๋ จ API