# ⚙️ Tech Stack
| Type | Tech | Version | Comment |
|:------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------:|
| IDE / EDITOR | ![IntelliJ IDEA](https://img.shields.io/badge/IntelliJIDEA-000000.svg?style=for-the-badge&logo=intellij-idea&logoColor=white) | - | - |
| Framework | ![Spring](https://img.shields.io/badge/springBoot-%236DB33F.svg?style=for-the-badge&logo=spring&logoColor=white) | 3.3.2 | - |
| Language | ![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white) | JDK 21 | - |
| IaaS | ![AWS EC2](https://img.shields.io/badge/AWS_EC2-RDS?style=for-the-badge&logo=amazonec2&logoColor=white&logoSize=amg&labelColor=FF9900&color=FF9900)
![Prometheus](https://img.shields.io/badge/Prometheus-E6522C?style=for-the-badge&logo=Prometheus&logoColor=white)
![Grafana](https://img.shields.io/badge/grafana-%23F46800.svg?style=for-the-badge&logo=grafana&logoColor=white) | EC2 : Amazon Linux 2023 AMI
Prometheus: 2.54
Grafana: 11.1.4 | ECS Container Monitoring |
| Database | ![AWS RDS](https://img.shields.io/badge/AWS_RDS-RDS?style=for-the-badge&logo=amazonrds&logoColor=white&logoSize=amg&labelColor=527FFF&color=527FFF)
![MariaDB](https://img.shields.io/badge/MariaDB-003545?style=for-the-badge&logo=mariadb&logoColor=white) | MariaDB: 10.11 | Store relational data such as User, Space, Channel, etc |
| Database | ![MongoDB](https://img.shields.io/badge/mongodb-47A248.svg?style=for-the-badge&logo=mongodb&logoColor=white) | MongoDB Atlas: 7.0.12 | Store unstructured data such as Text, DM, Notification, etc |
| Database | ![AWS Elasticache](https://img.shields.io/badge/AWS%20elasticache-C925D1?style=for-the-badge&logo=amazonelasticache&logoColor=white)
![Redis](https://img.shields.io/badge/redis-%23DD0031.svg?style=for-the-badge&logo=redis&logoColor=white) | Redis: 7.1 | Auth Data Save, Pub/Sub |
| Record | ![Notion](https://img.shields.io/badge/Notion-%23000000.svg?style=for-the-badge&logo=notion&logoColor=white) | - | [Link](https://teamsparta.notion.site/Echo-191b7395737d4a608c2e07bd98c42f2a) |
[(Back to top)](#table)
# 🧱 Project Architecture
[(Back to top)](#table)
# 📦 Package Structure
```angular2html
src
├─common
│ ├─aop
│ ├─exception
│ │ ├─codes
│ │ └─handler
│ ├─redis
│ ├─s3
│ │ ├─dto
│ │ ├─error
│ │ ├─service
│ │ └─util
│ └─util
├─config
├─domain
│ ├─auth
│ │ ├─dto
│ │ └─error
│ ├─channel
│ │ ├─dto
│ │ ├─entity
│ │ ├─error
│ │ └─repository
│ ├─dm
│ │ ├─dto
│ │ ├─entity
│ │ └─repository
│ ├─friend
│ │ ├─dto
│ │ ├─entity
│ │ ├─error
│ │ └─repository
│ ├─mail
│ ├─notification
│ │ ├─dto
│ │ ├─entity
│ │ └─repository
│ ├─space
│ │ ├─dto
│ │ ├─entity
│ │ ├─error
│ │ └─repository
│ ├─text
│ │ ├─controller
│ │ ├─dto
│ │ ├─entity
│ │ ├─error
│ │ └─repository
│ ├─thread
│ │ ├─dto
│ │ ├─entity
│ │ ├─error
│ │ ├─repository
│ │ └─service
│ ├─user
│ │ ├─dto
│ │ ├─entity
│ │ ├─error
│ │ └─repository
│ └─video
└─security
├─config
├─jwt
└─principal
```
[(Back to top)](#table)
# 🔑 Environment Variable
```angular2html
MARIADB_ROOT_PASSWORD=root
MARIADB_USER=user
MARIADB_PASSWORD=password
MARIADB_DATABASE=echo
MARIADB_URL=r2dbc:mariadb://localhost:13306/echo
MONGODB_ATLAS_URL=mongodb+srv://{user}:{password}@{db_url}/{db_name}?retryWrites=true&w=majority
MONGODB_URL=mongodb://root:1234@localhost:27017/echo?authSource=admin
JWT_SECRET=24eb4ca6488cef9acf3956342dd0e7f6bbbfd83aff107caecb5179991cc97ace4195ff5f893897c2b6f48ae3415d1f890f6fbb5df02e6cfac962e41efc09cb65
JWT_ACCESS_TIME=18000000
JWT_REFRESH_TIME=18000000
MAIL_USER={sender_email}
MAIL_PASSWORD={sender_email_password}
REDIS_URI=redis://localhost:6379
REDIS_HOST=localhost
REDIS_PORT=6379
AWS_CREDENTIALS_ACCESSKEY={aws_access_key}
AWS_CREDENTIALS_SECRETKEY={aws_secret_key}
AWS_S3_BUCKET_NAME=echo-image
KAKAO_CLIENT_ID={kakao_client_id}
KAKAO_REDIRECT_URI=http://localhost:8080/api/user/kakao/callback
KAKAO_TOKEN_URL=https://kauth.kakao.com/oauth/token
```
[(Back to top)](#table)
# 📑 ERD DIAGRAM
[(Back to top)](#table)
# 🗂️ API Document
[(Back to top)](#table)
# 🔫 Trouble Shooting
* ### [Webflux Exception 처리 이슈](https://github.com/echo1241/echo/issues/44)
* ### [WebRTC N:M 연결 시도 시 메시지를 제대로 수신하지 못하는 이슈](https://github.com/echo1241/echo/issues/51)
* ### [ECS 배포 시 RDS 연결 이슈](https://github.com/echo1241/echo/issues/65)
* ### [로드 밸런서 설정 이슈](https://github.com/echo1241/echo/issues/66)
* ### [Webflux AOP @AfterReturning 사용 이슈](https://github.com/echo1241/echo/issues/71)
* ### [CI/CD 파이프라인 구축 하면서 발생한 문제점 및 해결 방안](https://github.com/echo1241/echo/issues/75)
* ### [JWT 만료 시 500 에러가 리턴되는 이슈](https://github.com/echo1241/echo/issues/78)
* ### [채팅 핸들러 내 기능 통합으로 인한 Side Effect](https://github.com/echo1241/echo/issues/104)
* ### [WebSocket 연결 지속이 안되는 이슈](https://github.com/echo1241/echo/issues/103)
[(Back to top)](#table)