๐ŸŽฎ DD Math

welcome

#Math Education Game #For Kids #Drag&Drop

DD์ˆ˜ํ•™์€ ์˜ยท์œ ์•„๋ฅผ ์œ„ํ•œ ์ˆ˜ํ•™ ๊ต์œก ๊ฒŒ์ž„์ž…๋‹ˆ๋‹ค.
์•„์ด๋“ค์ด ์‰ฝ๊ฒŒ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก, ๋“œ๋ž˜๊ทธ ์•ค ๋“œ๋ž์„ ์ด์šฉํ•ด ๊ฒŒ์ž„์„ ๊ตฌํ˜„ํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค.

  • ํ”„๋กœ์ ํŠธ ๊ธฐ๊ฐ„ 2021.09.27 - 2021. 10. 18 (๊ธฐํš 1์ฃผ, ๊ฐœ๋ฐœ 2์ฃผ)

๐Ÿ‘‰ Deploy Address: https://www.ddmath.fun
๐Ÿ‘‰ Frontend: https://github.com/DDMath/ddmath-frontend
๐Ÿ‘‰ Backend: https://github.com/DDMath/ddmath-backend


๐Ÿ–ผ Preview

์ฒซ ๋ฒˆ์งธ ๊ฒŒ์ž„ (Shooting game)

  • 1๋ถ€ํ„ฐ 10๊นŒ์ง€ ์ฐจ๋ก€๋กœ ํ’์„ ์„ ํ„ฐ๋œจ๋ฆฌ๋Š” ๊ฒŒ์ž„์ž…๋‹ˆ๋‹ค.
  • ๋Œ€ํฌ์™€ ๋งˆ์šฐ์Šค ํฌ์ธํ„ฐ ์‚ฌ์ด์˜ ๋ฒกํ„ฐ(Vector) ๊ฐ’์„ ์ด์šฉํ•˜์—ฌ ๋Œ€ํฌ์˜ ๋ฐฉํ–ฅ์„ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.
stage1.mp4

๋‘ ๋ฒˆ์งธ ๊ฒŒ์ž„ (Puzzle game)

  • ๊ณผ์ผ๊ณผ ์ˆซ์ž์— ๋งž์ถฐ ์นด๋“œ๋ฅผ ๋งž์ถ”์–ด ๋„ฃ๋Š” ๊ฒŒ์ž„์ž…๋‹ˆ๋‹ค.
stage2.mp4

์„ธ ๋ฒˆ์งธ ๊ฒŒ์ž„ (Matching game)

  • ๊ฐ™์€ ๋ชจ์–‘์„ ๊ฐ€์ง„ ์นด๋“œ๋ผ๋ฆฌ ์—ฐ๊ฒฐํ•˜๋Š” ๊ฒŒ์ž„์ž…๋‹ˆ๋‹ค.
stage3.mp4

๐ŸŒˆ Motivation

๊ฐœ๋ฐœ๋„์ƒ๊ตญ์˜ ์—ด์•…ํ•œ ๊ต์œก ํ™˜๊ฒฝ์„ ์ง์ ‘ ๋ชฉ๊ฒฉํ•œ ๊ฒฝํ—˜์ด ์žˆ์Šต๋‹ˆ๋‹ค. ํŠนํžˆ, ์ด์ง‘ํŠธ ์นด์ด๋กœ ๋Œ€ํ•™๊ต์—์„œ ํ•™์ƒ๋“ค์˜ ๊ณต๋ถ€ ํ™˜๊ฒฝ์— ๋Œ€ํ•ด ์ธํ„ฐ๋ทฐ๋ฅผ ์ง„ํ–‰ํ•œ ์ ์ด ์žˆ๋Š”๋ฐ์š”. ์–ธ๋‹ˆ, ์˜ค๋น  ์ด์™ธ์—๋Š” ๋ฐฐ์›€์˜ ์ˆ˜๋‹จ์ด ๋ถ€์กฑํ•˜๋‹ค๋Š” ์ด์•ผ๊ธฐ๋ฅผ ๋“ค์„ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

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


โญ๏ธ Features

  • ๋””๋””์ˆ˜ํ•™์€ ์ŠˆํŒ…๊ฒŒ์ž„, ํผ์ฆ๊ฒŒ์ž„, ์—ฐ๊ฒฐ์ง“๊ธฐ ๊ฒŒ์ž„์œผ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์œผ๋ฉฐ, ๊ฒŒ์ž„ ๊ตฌํ˜„ ์‹œ ์ผ๋ฐ˜์ ์œผ๋กœ ์‚ฌ์šฉ๋˜๋Š” ์†๋„, ์ค‘๋ ฅ, ์ถฉ๋Œ, ๋งˆ์šฐ์Šค ์ด๋ฒคํŠธ, ์—๋‹ˆ๋ฉ”์ด์…˜ ๋“ฑ์„ ๋ชจ๋‘ ์‚ฌ์šฉํ•˜๊ณ ์ž ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
  • ๊ฐ ๊ฒŒ์ž„์€ ๋ชจ๋‘ ๋“œ๋ž˜๊ทธ ์•ค ๋“œ๋ž์„ ํ†ตํ•ด ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.
  • ๊ฐ ๊ฒŒ์ž„์„ ํ”Œ๋ ˆ์ด ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ํ†ตํ•ด ์•ˆ๋‚ดํ•ฉ๋‹ˆ๋‹ค.
  • ๊ฐ ๊ฒŒ์ž„์—์„œ ๋ณ„์„ ๋‹ค ๋ชจ์„ ๊ฒฝ์šฐ, ๋‹ค์Œ ์Šคํ…Œ์ด์ง€๋กœ ๋„˜์–ด๊ฐˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • Progressive Web App์„ ์ง€์›ํ•˜์—ฌ, ๊ธฐ๊ธฐ์— ํ”„๋กœ๊ทธ๋žจ์„ ๋‹ค์šด๋กœ๋“œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
  • ์˜คํ”„๋ผ์ธ ๋ชจ๋“œ๋ฅผ ์ง€์›ํ•˜์—ฌ, ์•„์ด๊ฐ€ ์–ด๋””์„œ๋“  ์ ‘์†ํ•˜์—ฌ ๋””๋””์ˆ˜ํ•™์„ ์ฆ๊ธธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐ŸŽฌ Getting Started

Local ํ™˜๊ฒฝ์—์„œ ์‹คํ–‰์‹œ ์•„๋ž˜์™€ ๊ฐ™์ด ์ค€๋น„๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

Client
REACT_APP_SERVER_URL=<default: http://localhost:8080>

REACT_APP_API_KEY=<Firebase API Key>
REACT_APP_AUTH_DOMAIN=<Firebase Auth Domain>
REACT_APP_PROJECT_ID=<Firebase Project ID>
REACT_APP_APP_ID=<Firebase App ID>
Server
ORIGIN_URI_PROD=<default: http://localhost:3000>

JWT_SECRET=<jwt secret key>
MONGODB_URL=<mongodb url>
MONGODB_NAME=<db name>

๐Ÿ–ฅ Tech Stacks

Client

  • Typescript
  • React
  • Styled-Component
  • Phaser3
  • PWA
  • Workbox

Server

  • Node JS
  • MongoDB
  • Express

Deployment

  • Netlify
  • AWS Elastic Beanstalk

๐Ÿค ์ด๋ ‡๊ฒŒ ๊ฐœ๋ฐœํ–ˆ์Šต๋‹ˆ๋‹ค

๐Ÿ—‚ ๊ฐ์ฒด์ง€ํ–ฅ ๊ตฌ์กฐ์˜ ์„ค๊ณ„

๊ฒŒ์ž„ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ–ˆ๊ธฐ ๋•Œ๋ฌธ์—, ์—ฌ๋Ÿฌ ๊ฐ์ฒด๊ฐ„ ์ƒํ˜ธ์ž‘์šฉ์„ ์ง๊ด€์ ์ด๊ณ  ๊ฐ„๊ฒฐํ•˜๊ฒŒ ๋‚˜ํƒ€๋‚ด๊ธฐ ์œ„ํ•ด ๋งŽ์€ ๊ณ ๋ฏผ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ก ์ ์œผ๋กœ๋Š” ๊ณต๋ถ€ํ•ด ๋ณด์•˜์ง€๋งŒ, ์ฃผ๋„์ ์œผ๋กœ ๊ฐ์ฒด์ง€ํ–ฅ ๊ตฌ์กฐ๋ฅผ ์„ค๊ณ„ํ•ด๋ณธ ๊ฒƒ์€ ์ฒ˜์Œ์ด์—ˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.

  • ์ฒซ ๋ฒˆ์งธ ์ŠˆํŒ… ๊ฒŒ์ž„์—์„œ "๋Œ€ํฌ", "๋Œ€ํฌ์˜ ๋ฏธ์‚ฌ์ผ", "๋ฏธ์‚ฌ์ผ Preview" ๋“ฑ์„ ๋‹ค๋ฅธ ๊ฐ์ฒด๋กœ ๋ถ„๋ฆฌํ•˜์—ฌ ๊ฐ์ฒด์˜ ์ฑ…์ž„์„ ๋ถ„์‚ฐํ•˜๋„๋ก ํ•˜์—ฌ ๋‹จ์ผ ์ฑ…์ž„ ์›์น™์„ ์ง€์ผœ๋ณด๋ ค๊ณ  ํ–ˆ์Šต๋‹ˆ๋‹ค.

  • ์นด๋“œ์˜ ๊ธฐ๋ณธ ์†์„ฑ์„ ์ •์˜ํ•ด๋‘๊ณ , ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋‹คํ˜•์„ฑ์„ ๊ฐ–๋„๋ก ๊ตฌํ˜„ํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค.

    1. ๋“œ๋ž˜๊ทธ๊ฐ€ ๊ฐ€๋Šฅํ•œ ์นด๋“œ
    2. ํฌ์ธํŠธ ๊ฐ์ฒด๋ฅผ ์ž์‹์œผ๋กœ ๊ฐ–๊ณ  ์žˆ๋Š” ์นด๋“œ
  • ๋‹ค๋งŒ, ํ˜„์žฌ๋Š” ๊ฐ ์ธ์Šคํ„ด์Šค๊ฐ€ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ๊ธฐ๋Šฅ๊นŒ์ง€๋„ ์ „๋ถ€ ์ƒ์†๋ฐ›๊ณ  ์žˆ๋Š” ๋น„ํšจ์œจ์ ์ธ ๊ตฌ์กฐ๋ฅผ ๊ฐ–๊ณ  ์žˆ๋‹ค๊ณ  ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. Interface๋‚˜ Abstract Class๋ฅผ ํ†ตํ•ด ๊ฐ ์นด๋“œ์˜ ์ƒ์„ธ ์‚ฌํ•ญ์„ ๊ตฌํ˜„ํ–ˆ๋‹ค๋ฉด ๋”์šฑ ํšจ์œจ์ ์ธ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์—ˆ์„ ๊ฒƒ์ด๋ผ๋Š” ์•„์‰ฌ์›€์ด ๋‚จ์Šต๋‹ˆ๋‹ค.

๐Ÿ“ˆ Service Worker

์˜คํ”„๋ผ์ธ์—์„œ๋„ ๊ฒŒ์ž„์„ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก Service Worker๋ฅผ ๋„์ž…ํ–ˆ์Šต๋‹ˆ๋‹ค. ํŠนํžˆ, Workbox๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€, ์Œ์•… ๋“ฑ ๊ฒŒ์ž„์— ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค์„ Precache ํ–ˆ์œผ๋ฉฐ, StaleWhileRevalidate ๋“ฑ์˜ Workbox Strategy๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ์— ๋ณ€๊ฒฝ์ด ์ƒ๊ธธ ๊ฒฝ์šฐ ์—…๋ฐ์ดํŠธ ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ง„ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

performance

๋˜ํ•œ Progressive Web App์„ ๊ตฌํ˜„ํ•˜์—ฌ ํŒจ๋“œ ๋ฅ˜์—์„œ๋„ ํ•™์Šต์ด ๊ฐ€๋Šฅํ•˜๋„๋ก ํ–ˆ์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ๊ณผ์ •์—์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ตœ์ ํ™” ๊ณผ์ •์„ ๋„์ž…ํ•˜์—ฌ Lighthouse ํผํฌ๋จผ์Šค ์ˆ˜์น˜๋ฅผ ํฌ๊ฒŒ ํ–ฅ์ƒ์‹œ์ผฐ์Šต๋‹ˆ๋‹ค.

  • Webp ์ ์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€ ์šฉ๋Ÿ‰ 80% ๊ฐ์†Œ
  • Component Lazy Loading
  • CDN ์„ค์ • (Amazon Cloud Front)
  • Resource Size 50% ๊ฐ์†Œ. ex) ๋ถˆํ•„์š”ํ•œ Phaser ์š”์†Œ ์ œ์™ธ
  • ์ด๋ฏธ์ง€ ํŒŒ์ผ ํ”„๋ฆฌ์บ์‹ฑ & ํฐํŠธ ๋น„๋™๊ธฐ์ ์œผ๋กœ ํ•„์š”ํ•œ ๋ฌธ์ž๋งŒ ๋กœ๋“œ

Phaser ๊ฒŒ์ž„ ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์— Lazy Loding์„ ์ ์šฉํ•˜์ง€ ๋ชปํ•˜์—ฌ, ํผํฌ๋จผ์Šค ์ ์ˆ˜๋ฅผ ๋” ๋งŽ์ด ๋Œ์–ด์˜ฌ๋ฆฌ์ง€ ๋ชปํ•œ ์ ์ด ์•„์‰ฝ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ, ๊ทธ๋™์•ˆ ๊ณ ๋ คํ•˜์ง€ ์•Š์•˜๋˜ ๊ฐ์ข… ์ตœ์ ํ™” ๋ฐ Critical Rendering Path์— ๋Œ€ํ•ด ์ƒ๊ฐ ํ•ด๋ณด๊ฒŒ๋˜์–ด ๋ฟŒ๋“ฏํ•˜๊ฒŒ ์ƒ๊ฐํ•ฉ๋‹ˆ๋‹ค. ํŠนํžˆ, ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉฐ ์ดˆ ๋‹จ์œ„์˜ ์ฐจ์ด๊ฐ€ ์œ ์ €์˜ ์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ์ขŒ์šฐํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์ ์„ ๋ฐฐ์šฐ๊ฒŒ ๋˜๋ฉด์„œ, ํ”„๋ก ํŠธ์•ค๋“œ ๊ฐœ๋ฐœ์— ๋” ํฐ ํฅ๋ฏธ๋ฅผ ๋Š๋ผ๊ฒŒ ๋˜๋Š” ๊ณ„๊ธฐ๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.