Skip to content

Commit 83d0065

Browse files
committed
Merge branch 'develop' of https://github.com/Fintechtefin/moding into refactor/#35
2 parents 6ee8140 + ebb41c4 commit 83d0065

98 files changed

Lines changed: 1254 additions & 412 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
url = https://lab.ssafy.com/a50070863/mooding_back_submodule.git
44
[submodule "moding_front_submodule"]
55
path = moding_front_submodule
6+
[submodule "mooding_back_submodule"]
7+
path = mooding_back_submodule
8+
url = https://github.com/Fintechtefin/mooding_back_submodule.git

README.MD

Lines changed: 122 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,124 @@
1-
# 🎟 재상영 영화 크라우드 펀딩, 무딩
2-
## 목차
3-
[1. 서비스 개요](#1장-서비스-개요)
1+
# 🎟 Moding(무딩)
2+
재상영 영화 크라우드 펀딩 서비스
3+
4+
<div>
5+
<img src="https://img.shields.io/badge/java-007396?style=for-the-badge&logo=java&logoColor=white">
6+
<img src="https://img.shields.io/badge/springboot-6DB33F?style=for-the-badge&logo=springboot&logoColor=white">
7+
<img src="https://img.shields.io/badge/mysql-4479A1?style=for-the-badge&logo=mysql&logoColor=white">
8+
<img src="https://img.shields.io/badge/redis-DC382D?style=for-the-badge&logo=redis&logoColor=white">
9+
<img src="https://img.shields.io/badge/elasticsearch-005571?style=for-the-badge&logo=elasticsearch&logoColor=white">
10+
<img src="https://img.shields.io/badge/logstash-005571?style=for-the-badge&logo=logstash&logoColor=white">
11+
<img src="https://img.shields.io/badge/kibana-005571?style=for-the-badge&logo=kibana&logoColor=white">
12+
</div>
13+
<div>
14+
<img src="https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=Docker&logoColor=white">
15+
<img src="https://img.shields.io/badge/nginx-009639?style=for-the-badge&logo=nginx&logoColor=white">
16+
<img src="https://img.shields.io/badge/amazonec2-FF9900?style=for-the-badge&logo=amazonec2&logoColor=white">
17+
<img src="https://img.shields.io/badge/prometheus-E6522C?style=for-the-badge&logo=prometheus&logoColor=white">
18+
<img src="https://img.shields.io/badge/grafana-F46800?style=for-the-badge&logo=grafana&logoColor=white">
19+
<img src="https://img.shields.io/badge/linux-FCC624?style=for-the-badge&logo=linux&logoColor=black">
20+
</div>
21+
<div>
22+
<img src="https://img.shields.io/badge/react-61DAFB?style=for-the-badge&logo=react&logoColor=black">
23+
<img src="https://img.shields.io/badge/node.js-339933?style=for-the-badge&logo=Node.js&logoColor=white">
24+
<img src="https://img.shields.io/badge/javascript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black">
25+
</div>
26+
27+
<br>
28+
29+
## 📕 목차
30+
1. [서비스 개요](#1장-서비스-개요)
31+
32+
2. [아키텍처 소개](#2장-아키텍처-소개)
33+
34+
3. [주요 기능](#3장-주요-기능)
35+
36+
4. [주요 기술](#4장-주요-기술)
37+
38+
5. [회고](#5장-회고)
39+
40+
</br>
41+
42+
## 1장. 서비스 개요
43+
- “다시 보고 싶은 영화를, 영화관에서”
44+
영화를 한 번 이상 보는 N차 관람에서 출발하여 펀딩의 요청부터 대관, 영화 재상영까지 어어질 수 있는 서비스를 제공합니다.
45+
46+
<br>
47+
48+
## 2장. 아키텍처 소개
49+
<p align="center">
50+
<img src="https://github.com/Fintechtefin/moding/assets/46569105/cb057ca2-9bc8-4fbf-8ec8-069aaf0743c8"/>
51+
</p>
52+
53+
## 기술 스택 선정 이유
54+
|기술|선정 이유|
55+
|---|----|
56+
|***Spring Boot***|***Spring***과 비교했을 때 환경 설정을 쉽게 할 수 있어서 개발 생산성 증가|
57+
|***MySQL***|구조화 된 데이터 관리 및 오픈 소스 라이센스를 따르기 때문에 무료 사용 가능|
58+
|***Docker***|컨테이너 기반으로 여러 서버들을 쉽게 관리|
59+
|***Redis***|캐싱 및 분산락 구현을 위한 사용|
60+
|***ELK***|실시간 인기 순위 구현 시 검색 성능 최적화를 위해 사용|
61+
|***Prometheus***|매트릭 수집|
62+
|***Grafana***|***Prometheus***로 수집한 매트릭 데이터를 시각화|
63+
64+
<br>
65+
66+
## 3장. 주요 기능
67+
### 1. 지금 인기 있는 펀딩은?
68+
- ***ElasticSearch***를 이용한 실시간 영화 검색 순위
69+
<p align="center">
70+
<img src="https://github.com/Fintechtefin/moding/assets/46569105/c8bb8675-e33a-4ea3-9578-ad64199beeb6" width="500" height="1000"/>
71+
</p>
72+
73+
<br>
74+
75+
### 2. 터치 한 번에 결제 끝!
76+
- 토스페이먼츠 `API`를 이용한 쉽고 빠른 결제
77+
<p align="center">
78+
<img src="https://github.com/Fintechtefin/moding/assets/46569105/3f7efeab-946c-4662-b502-7c967577fb3c" width="500" height="1000"/>
79+
</p>
80+
81+
<br>
82+
83+
### 3. N명이 보고 있어요
84+
- 동시 접속자 수를 볼 수 있는 좌석 예매
85+
<p align="center">
86+
<img src="https://github.com/Fintechtefin/moding/assets/46569105/b2442613-55b5-4007-b10f-9b54d62bff1e" width="500" height="1000"/>
87+
</p>
88+
89+
<br>
490

5-
[2. 서비스 소개](#2장-서비스-소개)
6-
7-
[3. 아키텍처 소개](#3장-아키텍처-소개)
8-
9-
[4. 주요 기술](#4장-주요-기술)
10-
11-
12-
13-
---
14-
## 1장. 서비스 개요
15-
- **프로젝트 진행 기간 : 2024.02.26 ~ 2024.04.03**
16-
17-
**“다시 보고 싶은 영화를, 영화관에서”**
18-
19-
재상영 영화 크라우드 펀딩, 무딩은 영화를 한 번 이상 보는 N차 관람에서 출발하여 펀딩의 요청부터 대관, 영화 재상영까지 어어질 수 있는 서비스를 제공합니다.
20-
21-
22-
---
23-
## 2장. 서비스 소개
24-
### 🏆 지금 인기 있는 펀딩은?
25-
26-
![실검_gif](/uploads/4c6a4959ccc51a87a96bf3936d536caa/실검_gif.gif)
27-
28-
->**ElasticSearch**를 이용한 **실시간 영화 검색 순위**
29-
30-
31-
### 💳 터치 한 번에 결제 끝!
32-
![결제_gif](/uploads/531d14a161e120ef5e40360ba38439af/결제_gif.gif)
33-
34-
->**토스페이먼츠**API를 이용한 쉽고**빠른 결제**
35-
36-
37-
### 👀 N명이 보고 있어요
38-
![예매_gif](/uploads/8eae973b8b4572c97cd5f480a5da181c/예매_gif.gif)
39-
-> 긴장감 UP.**동시 접속자 수**를 볼 수 있는**좌석 예매**
40-
41-
42-
---
43-
## 3장. 아키텍처 소개
44-
![mooding_architecture](https://github.com/Fintechtefin/moding/assets/46569105/cb057ca2-9bc8-4fbf-8ec8-069aaf0743c8)
45-
46-
### 주요 기술 스택
47-
**FE**: React.js, Vite, TypeScript, Recoil, SCSS, FCM
48-
49-
**BE**: Spring Boot, Spring Cloud, Spring Batch, JWT, Kafka, MySQL, ElasticSearch, Logstash, Kibana, Redis, gRPC
50-
51-
**INFRA** : AWS EC2, Jenkins, Nginx, Docker
52-
53-
---
5491
## 4장. 주요 기술
55-
1. `MSA` 기반의 `Modern` 아키텍처 및 `DDD` 중심 개발
56-
2. MSA에 `HA(고가용성)` 도입 및 `고가용성`**확장 가능****시스템**을 설계
57-
3. `ElasticSearch``Redis`를 활용해 1시간 단위로 **실시간 랭킹 업데이트**
58-
4. `Redisson 분산락 AOP`를 이용한 **결제 및 좌석 예매** **동시성 제어**
59-
5. `서비스 DB`**결제 DB**분리를 통한**보안 향상**
60-
6. `transaction`처리 및 `publisher/subscriber` 관련 구현
61-
7. `Proxy`에서 `WAS`단에 전달할 수 있는 `Max Connection`제한
62-
8. 멀티 모듈 구조로 **공통 모듈 분리**
63-
64-
----
92+
1. ***MSA*** 기반의 Modern 아키텍처 및 ***DDD*** 중심 개발
93+
2. ***MSA***`HA` 도입 및 확장 가능한 시스템을 설계
94+
3. ***ElasticSearch******Redis***를 활용해 1시간 단위로 실시간 랭킹 업데이트
95+
4. ***Redisson 분산락 AOP***를 이용한 결제 및 좌석 예매 동시성 제어
96+
5. 서비스 `DB`와 결제 `DB` 분리를 통한 보안 향상
97+
6. ***transaction*** 처리 및 `publisher`/`subscriber` 관련 구현
98+
7. `Proxy`에서 `WAS`단에 전달할 수 있는 Max Connection 제한
99+
8. `멀티 모듈` 구조로 공통 모듈 분리
100+
101+
<br>
102+
103+
## 5장. 회고
104+
**Keep**
105+
- 민정: ***MSA*** 설계, ***Redis*** `HA`, 모니터링 구축, 운영 환경별로 스프링 프로필을 다르게 분리
106+
- 승연: ***Git*** 컨벤션, 기술적으로 새로운 도전, `디버깅` 사용
107+
- 태윤: 공통(`컴포넌트`, `API`, `Type`)을 파일로 분리하여 재사용, 상태 관리 라이브러리 ***Recoil***을 활용하여 필요한 `컴포넌트`에 변수 사용
108+
- 자영: ***Jira***, ***Git*** 컨벤션, 모듈화 사용
109+
- 승경: ***Jira*** 컨벤션을 미리 정하여 번업 차트로 가지 않은 것, ***Git*** 컨벤션, ***MSA*** 설계, `디버깅` 사용
110+
111+
**Problem**
112+
- 민정: `mock data`를 대충 넣어서 문제 발생, 일부 코드(공통 에러 코드, 모듈 간 통신 시 요청 `DTO` 및 응답 `DTO`) 중복
113+
- 승연: 미흡한 예외 처리, 동적 쿼리 작성 시 `디버깅` 어려움, 반복되는 쿼리 수정
114+
- 태윤: 사용하지 않는 `import`나 변수 등을 지우지 않아 빌드 시 오류 발생
115+
- 자영: ***hook***에 대한 이해 부족, `Type` 종류와 `interface` 활용에 대한 공부 필요
116+
- 승경: 중간에 `DB` 설계 변경, `API` 문서화를 하지 않음, 중복 있는 로직 구현
117+
118+
**Try**
119+
- 민정: 중요한 비즈니스 로직은 테스트 코드 작성하기
120+
- 승연: ***Java*** `stream`, `filter`, `map` 적극 사용하기
121+
- 태윤: 사용하지 않는 것은 주석 처리 또는 바로 지우기
122+
- 자영: ***react-query*** 깊게 사용하기
123+
- 승경: `Cache` 적용 후 ***JMeter***로 성능 테스트하기
124+

back/batch/build.gradle

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id 'java'
3+
id 'jacoco'
34
id 'org.springframework.boot' version '2.7.18'
45
id 'io.spring.dependency-management' version '1.1.4'
56
}
@@ -44,3 +45,45 @@ dependencyManagement {
4445
tasks.named('test') {
4546
useJUnitPlatform()
4647
}
48+
49+
jacoco {
50+
toolVersion = "0.8.10"
51+
}
52+
53+
jacocoTestReport {
54+
reports {
55+
html.enabled true
56+
xml.enabled true
57+
csv.enabled false
58+
59+
html.destination file("${buildDir}/jacoco/index.html")
60+
xml.destination file("${buildDir}/jacoco/index.xml")
61+
// csv.destination file("${buildDir}/jacoco/index.csv")
62+
}
63+
def Qdomains = []
64+
65+
for (qPattern in '**/QA'..'**/QZ') { // qPattern = '**/QA', '**/QB', ... '*.QZ'
66+
Qdomains.add(qPattern + '*')
67+
}
68+
69+
afterEvaluate {
70+
classDirectories.setFrom(
71+
files(classDirectories.files.collect {
72+
fileTree(dir: it, excludes: [
73+
"**/*Application*",
74+
"**/*Config*",
75+
"**/*Dto*",
76+
"**/*Request*",
77+
"**/*Response*",
78+
"**/*Interceptor*",
79+
"**/*Exception*"
80+
] + Qdomains)
81+
})
82+
)
83+
}
84+
}
85+
86+
test {
87+
useJUnitPlatform()
88+
finalizedBy jacocoTestReport
89+
}

back/common/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
HELP.md
2+
.gradle
3+
build/
4+
!gradle/wrapper/gradle-wrapper.jar
5+
!**/src/main/**/build/
6+
!**/src/test/**/build/
7+
8+
### STS ###
9+
.apt_generated
10+
.classpath
11+
.factorypath
12+
.project
13+
.settings
14+
.springBeans
15+
.sts4-cache
16+
bin/
17+
!**/src/main/**/bin/
18+
!**/src/test/**/bin/
19+
20+
### IntelliJ IDEA ###
21+
.idea
22+
*.iws
23+
*.iml
24+
*.ipr
25+
out/
26+
!**/src/main/**/out/
27+
!**/src/test/**/out/
28+
29+
### NetBeans ###
30+
/nbproject/private/
31+
/nbbuild/
32+
/dist/
33+
/nbdist/
34+
/.nb-gradle/
35+
36+
### VS Code ###
37+
.vscode/

back/common/build.gradle

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
plugins {
2+
id 'java'
3+
id 'org.springframework.boot' version '2.7.18'
4+
id 'io.spring.dependency-management' version '1.1.4'
5+
id 'com.diffplug.spotless' version '6.16.0'
6+
}
7+
8+
group = 'com.ssafy'
9+
version = '0.0.1-SNAPSHOT'
10+
11+
java {
12+
sourceCompatibility = '11'
13+
}
14+
15+
configurations {
16+
compileOnly {
17+
extendsFrom annotationProcessor
18+
}
19+
}
20+
21+
repositories {
22+
mavenCentral()
23+
}
24+
25+
dependencies {
26+
implementation 'org.springframework.boot:spring-boot-starter'
27+
compileOnly 'org.projectlombok:lombok'
28+
annotationProcessor 'org.projectlombok:lombok'
29+
30+
// swagger
31+
implementation 'io.springfox:springfox-swagger-ui:3.0.0'
32+
implementation 'io.springfox:springfox-swagger2:3.0.0'
33+
implementation 'io.springfox:springfox-boot-starter:3.0.0'
34+
35+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
36+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
37+
}
38+
39+
tasks.named('test') {
40+
useJUnitPlatform()
41+
}
42.4 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)