Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Blind-Cafe/BlindCafe-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

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

Repository files navigation

Blind Cafe Server

๐Ÿ“„ ํ”„๋กœ์ ํŠธ ๊ฐœ์š”

๊ตฌ๋ถ„ ๋‚ด์šฉ
๊ธฐ๊ฐ„ 2021.09. ~ 2021.12.
๊ตฌ์„ฑ Planner 1๋ช…, Designer 1๋ช…, Backend 1๋ช…, Frontend(AOS, iOS) 2๋ช…
ไธญ Backend ์ฐธ์—ฌ
์†Œ๊ฐœ ์ƒ๋Œ€๋ฐฉ์˜ ์ •๋ณด๋ฅผ ์•Œ์ง€ ๋ชปํ•œ ์ฑ„ ๊ด€์‹ฌ์‚ฌ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ
๋งค์นญ๋œ ์ƒ๋Œ€๋ฐฉ๊ณผ 3์ผ๊ฐ„ ์ฑ„ํŒ…์„ ์ง„ํ–‰ํ•˜๋Š” ๋ฐ์ดํŠธ ๋งค์นญ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜

๐Ÿ’ผ ํ”„๋กœ์ ํŠธ ์†Œ๊ฐœ

  • ๊ด€์‹ฌ์‚ฌ๊ฐ€ ๋น„์Šทํ•œ ์‚ฌ๋žŒ๊ณผ 3์ผ๊ฐ„ ๋Œ€ํ™”ํ•  ์ˆ˜ ์žˆ๋Š” ์†Œ์…œ ์–ดํ”Œ์ž…๋‹ˆ๋‹ค.
  • ๋Œ€ํ™” ์‹œ๊ฐ„์ด ์ง€๋‚ ์ˆ˜๋ก ๊ธฐ๋Šฅ ์ œํ•œ์ด ํ’€๋ฆฌ๊ณ  3์ผ ํ›„ ํ”„๋กœํ•„ ๊ตํ™˜์— ์„ฑ๊ณตํ•  ์‹œ ์ƒ๋Œ€๋ฐฉ๊ณผ ์ถ”๊ฐ€์ ์œผ๋กœ ๋Œ€ํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์–ด๋‘ ์†์˜ ์นดํŽ˜ ๊ฐ€๋ณด์…จ๋‚˜์š”? ๋งž์€ ํŽธ ์ƒ๋Œ€์˜ ์–ผ๊ตด๋„ ๋‚˜์ด๋„ ์•Œ ์ˆœ ์—†์ง€๋งŒ ๊ทธ์ € ๋Œ€ํ™”ํ•ฉ๋‹ˆ๋‹ค. ๋ธ”๋ผ์ธ๋“œ ์นดํŽ˜์—์„œ 3์ผ๊ฐ„์˜ ๋Œ€ํ™”๋งŒ์œผ๋กœ ์„ค๋ ˜์„ ๋Š๋ผ๊ณ  ๋งˆ์Œ์— ๋“œ๋Š” ์ƒ๋Œ€์—๊ฒŒ๋งŒ ํ”„๋กœํ•„์„ ๊ณต๊ฐœํ•˜์„ธ์š”.

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

๐Ÿ›  ์‚ฌ์šฉ ๊ธฐ์ˆ 

Application

  • Java 11
  • SpringBoot, Spring MVC, Spring Data JPA, Spring Security, Spring REST Docs
  • WebSocket, STOMP, SockJS
  • Thymeleaf

Infrastructure

  • MySQL
  • Redis (Cache, Message Broker)
  • Mongo DB
  • AWS EC2, RDS, S3, CloudFront, ElastiCache
  • Mongo DB Atlas
  • Firebase Cloud Messaging
  • Nginx

๐Ÿ” ๊ตฌ์„ฑ๋„

blindcafe-architecture


๐Ÿ–ฅ ๊ธฐ๋Šฅ ์„ค๋ช…

์ธ์ฆ

Deatil
  • ํšŒ์›๊ฐ€์ž…/๋กœ๊ทธ์ธ

    • ์†Œ์…œ ๊ณ„์ • ์ธ์ฆ
    • FCM ํ† ํฐ ๊ด€๋ฆฌ
    • ์ธ์ฆ ํ† ํฐ ๋ฐœ๊ธ‰
  • ํ† ํฐ ๊ฐฑ์‹ 


์œ ์ €

Deatil
  • ์œ ์ € ์ •๋ณด ์ˆ˜์ •
    • ๋‚˜์ด, ์„ฑ๋ณ„ (์ดˆ๊ธฐ ์ž…๋ ฅ ํ›„ ์ˆ˜์ • ๋ถˆ๊ฐ€)
    • ํ”„๋กœํ•„ ์ด๋ฏธ์ง€
    • ๊ด€์‹ฌ์‚ฌ
    • ์ƒ๋Œ€๋ฐฉ ์„ฑ๋ณ„
    • ๋ชฉ์†Œ๋ฆฌ
    • ์ง€์—ญ
  • ์œ ์ € ์ •๋ณด ์กฐํšŒ
    • ํ”„๋กœํ•„ ์ƒ์„ธ ์ •๋ณด ์กฐํšŒ
    • ํ”„๋กœํ•„ ์ด๋ฏธ์ง€ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ
  • ํƒˆํ‡ด
  • ๊ฑด์˜์‚ฌํ•ญ ์ž‘์„ฑ
    • Email ์—ฐ๋™
  • ์‹ ๊ณ 
  • ์‹ ๊ณ  ๋‚ด์—ญ ์กฐํšŒ

๋งค์นญ

Deatil
  • ๋งค์นญ ์š”์ฒญ
  • ๋งค์นญ ์š”์ฒญ ์ทจ์†Œ
  • ๋งค์นญ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ
  • ๋งค์นญ ์ƒ์„ธ ์ •๋ณด ์กฐํšŒ
  • ์Œ๋ฃŒ์ˆ˜ ์„ ํƒ
  • ํ† ํ”ฝ(์ถ”์ฒœ ๋Œ€ํ™” ์ฃผ์ œ) ์กฐํšŒ
  • ํ”„๋กœํ•„ ๊ตํ™˜
  • ๋งค์นญ ๋‚˜๊ฐ€๊ธฐ

์ฑ„ํŒ…

Deatil
  • ๋ฉ”์‹œ์ง€ ์ˆ˜์‹ /๋ฐœ์‹ 
    • ํ…์ŠคํŠธ
    • ์‚ฌ์ง„
    • ์Œ์„ฑ
    • ๋™์˜์ƒ
  • ๋ฉ”์‹œ์ง€ ๋‚ด์—ญ ์กฐํšŒ

์•Œ๋ฆผ

Deatil
  • ํ‘ธ์‹œ ์•Œ๋ฆผ ์ „์†ก
    • ์ ‘์† ์ƒํƒœ๋ฅผ ๊ณ ๋ คํ•ด์„œ ๋ฏธ์ ‘์† ์œ ์ €์—๊ฒŒ ์•Œ๋ฆผ ์ „์†ก
  • ์•Œ๋ฆผ ์„ค์ • ๋ณ€๊ฒฝ
    • ์ „์ฒด ์„ค์ •/ํ•ด์ œ
    • ์ฑ„ํŒ…๋ฐฉ ๋ณ„ ์„ค์ •/ํ•ด์ œ

๊ณต์ง€

Deatil
  • ๊ณต์ง€ ์กฐํšŒ
    • ๋งˆ์ง€๋ง‰ ๊ณต์ง€ ์กฐํšŒ API ์š”์ฒญ ์‹œ๊ฐ„์„ ๋ฐ”ํƒ•์œผ๋กœ ๊ณต์ง€ ์ˆ˜์‹  ์—ฌ๋ถ€ ์ œ๊ณต

๊ด€๋ฆฌ์ž

Deatil
  • ์‹ค์‹œ๊ฐ„/์ „์ฒด ์‚ฌ์šฉ์ž ์ˆ˜ ์กฐํšŒ
  • ์ฃผ๊ฐ„ ์ ‘์†์ž ์ˆ˜ ๋ฐ ์ ‘์†์ž ๋น„์œจ ์กฐํšŒ
  • ์ „์ฒด ์‚ฌ์šฉ์ž ๋ชฉ๋ก ์กฐํšŒ
  • ์‹ ๊ณ  ๋‚ด์—ญ ์กฐํšŒ
  • ๊ฑด์˜์‚ฌํ•ญ ์กฐํšŒ
  • ํƒˆํ‡ด / ๋ฐฉ ๋‚˜๊ฐ€๊ธฐ ์‚ฌ์œ  ์กฐํšŒ
  • ๊ณต์ง€ ์ž‘์„ฑ

๋ฐฐ์น˜ ์ž‘์—…

Deatil
  • 3์ผ ์ฑ„ํŒ… ํ™•์ธ

    • ๋งค์นญ ์ง€์† ์‹œ๊ฐ„ ๋ณ„ ์ฑ„ํŒ…๋ฐฉ ๋‚ด ๊ธฐ๋Šฅ ํ•ด์ œ ๋ฉ”์‹œ์ง€/์•Œ๋ฆผ ์ „์†ก
    • ๋งค์นญ ์œ ํšจ ์‹œ๊ฐ„ ์ž„๋ฐ• ์‹œ ๋ฉ”์‹œ์ง€/์•Œ๋ฆผ ์ „์†ก
    • ๋งค์นญ ์œ ํšจ ์‹œ๊ฐ„ ์ดˆ๊ณผ ์‹œ ํ”„๋กœํ•„ ๊ตํ™˜ ํ…œํ”Œ๋ฆฟ ๋ฉ”์‹œ์ง€/์•Œ๋ฆผ ์ „์†ก
  • 7์ผ ์ฑ„ํŒ… ํ™•์ธ

    • ๋งค์นญ ์œ ํšจ ์‹œ๊ฐ„ ์ž„๋ฐ• ์‹œ ๋ฉ”์‹œ์ง€/์•Œ๋ฆผ ์ „์†ก
    • ๋งค์นญ ์œ ํšจ ์‹œ๊ฐ„ ์ดˆ๊ณผ ์‹œ ์ฑ„ํŒ…๋ฐฉ ๋น„ํ™œ์„ฑํ™”
  • ๋งค์นญ ์š”์ฒญ ์ž๋™ ์ทจ์†Œ

    • ์˜ค๋ž˜๋œ ์š”์ฒญ์— ๋Œ€ํ•ด์„œ ๋งค์นญ ์ทจ์†Œ ๋ฐ ์†Œ๋ชจ๋œ ๋งค์นญ๊ถŒ ๋ณต๊ตฌ
  • ๋งค์ผ ๋ฐค 12์‹œ ๋งค์นญ๊ถŒ ์ˆ˜ ๋ฆฌ์…‹

  • ๋งค์ผ ์ƒˆ๋ฒฝ ์ „์ผ ํ•˜๋ฃจ๋™์•ˆ ์ ‘์†ํ•œ ์‚ฌ์šฉ์ž ์ˆ˜ ๋ฐ ์ ‘์† ๋น„์œจ ์ €์žฅ


โš™ ๋ฐฐํฌ

CICD

ํ™˜๊ฒฝ

  • Gradle 7.x
  • JDK 11

์ถ”๊ฐ€ ์„ค์ •

  • /src/main/resources์— ์•„๋ž˜ ์–‘์‹์„ ์ด์šฉํ•˜์—ฌ application.ymlํŒŒ์ผ์„ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

    Sample
    spring:
      profiles:
        active: {์ ์šฉ ํ™˜๊ฒฝ}
    
    ---
    
    spring:
      profiles:
        group:
          "local": "local, common"
          "dev": "dev, common"
          "prod": "prod, common"
    
    ---
    
    spring:
      config:
        activate:
          on-profile: local
      datasource:
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: {Local RDBMS(MySQL) URL}
        username: {Local RDBMS(MySQL) Username}
        password: {Local RDBMS(MySQL) ๋น„๋ฐ€๋ฒˆํ˜ธ}
      redis:
        host: {Local Redis URL}
        port: {Local Redis PORT}
      data:
        mongodb:
          uri: {Local Mongo DB URL}
    
    ---
    
    spring:
      config:
        activate:
          on-profile: dev
      datasource:
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: {Dev RDBMS(MySQL) URL}
        username: {Dev RDBMS(MySQL) Username}
        password: {Dev RDBMS(MySQL) ๋น„๋ฐ€๋ฒˆํ˜ธ}
      redis:
        host: {Dev Redis URL}
        port: {Dev Redis PORT}
      data:
        mongodb:
          uri: {Dev Mongo DB URL}
    
    ---
    
    spring:
      config:
        activate:
          on-profile: prod
      datasource:
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: {Prod RDBMS(MySQL) URL}
        username: {Prod RDBMS(MySQL) Username}
        password: {Prod RDBMS(MySQL) ๋น„๋ฐ€๋ฒˆํ˜ธ}
      redis:
        host: {Prod Redis URL}
        port: {Prod Redis PORT}
      data:
        mongodb:
          uri: {Prod Mongo DB URL}
    
    ---
    
    server:
      port: 8080
      tomcat:
        uri-encoding: UTF-8
    
    spring:
      config:
        activate:
          on-profile: common
      mvc:
        static-path-pattern: /static/**
      jpa:
        database: mysql
        database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
        generate-ddl: true
      servlet:
        multipart:
          max-file-size: 10MB
      mail:
        host: smtp.gmail.com
        port: 587
        username: {Gmail SMTP ์ด์šฉํ•  ๊ณ„์ •์˜ ์ด๋ฉ”์ผ ์ฃผ์†Œ}
        password: {Gmail SMTP ์ด์šฉํ•  ๊ณ„์ •์˜ ์ด๋ฉ”์ผ์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ}
        properties:
          mail:
            smtp:
              starttls:
                enable: true
                required: true
              auth: true
      thymeleaf:
        cache: false
    
    cloud:
      aws:
        credentials:
          accessKey: {AWS Credential Access Key}
          secretKey: {AWS Credential Secret Key}
        s3:
          bucket: {AWS S3 Bucket ์ด๋ฆ„}
        region:
          static: ap-northeast-2
        cloudfront:
          url: {AWS CloudFront URL}
        stack:
          auto: false
    
    email:
      from: {๊ฑด์˜์‚ฌํ•ญ ๋ฐœ์‹  ์ด๋ฉ”์ผ ์ฃผ์†Œ}
      to: {๊ฑด์˜์‚ฌํ•ญ ์ˆ˜์‹  ์ด๋ฉ”์ผ ์ฃผ์†Œ}
    
    fcm:
      key: {Firebase Key(json) ํŒŒ์ผ ๊ฒฝ๋กœ}
      auth: https://www.googleapis.com/auth/cloud-platform
      api: {FCM Send API URL}
      firebase-create-scoped: https://www.googleapis.com/auth/firebase.messaging
      firebase-multicast-message-size: 450
    
    secret:
      key1: {JWT ์‹œ๊ทธ๋‹ˆ์ฒ˜ 1}
      key2: {JWT ์‹œ๊ทธ๋‹ˆ์ฒ˜ 2}
      key3: {JWT ์‹œ๊ทธ๋‹ˆ์ฒ˜ 3}
      sample-token: {Security ํ•„ํ„ฐ ์ ์šฉ ํ›„ ํ…Œ์ŠคํŠธํ•  ๊ฒฝ์šฐ Access token}
    
    admin:
      id: {๊ด€๋ฆฌ์ž ๊ณ„์ • ID}
      pw: {๊ด€๋ฆฌ์ž ๊ณ„์ • ๋น„๋ฐ€๋ฒˆํ˜ธ}
  • /src/main/resources/firebase์— Firebase Key ํŒŒ์ผ blind-cafe-firebase-key.json์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

๐Ÿ’พ ๊ฒฐ๊ณผ๋ฌผ

API

ERD

ERD


๊ด€๋ฆฌ์ž ํ™”๋ฉด

admin-page


๐Ÿ”— ๊ด€๋ จ

Team

Position Name Repository
Planner ์ดํ˜œ์ง€
Designer ๊น€๋‹ค์€
Server ๊น€ํฌ๋™ https://github.com/Blind-Cafe/BlindCafe-Server
AOS ๋…ธ์†Œ๋ž˜ https://github.com/Blind-Cafe/BlindCafe-AOS
iOS ๊ถŒํ•˜์€ https://github.com/Blind-Cafe/BlindCafe-iOS

About

BlindCafe backend repository (Central MakeUs 8th)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages