Skip to content

Commit

Permalink
Merge pull request #464 from team-yello/staging
Browse files Browse the repository at this point in the history
deploy [main]
  • Loading branch information
euije authored Feb 28, 2024
2 parents d0ddf7b + 5ff1315 commit 2ccb3ed
Show file tree
Hide file tree
Showing 320 changed files with 21,156 additions and 12,690 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,15 @@ out/
application.yml
application-dev.yml
application-apple.yml
application-local.yml
firebase*.json
*client_secret*.json

### monitoring ###
monitoring/prometheus/volume
monitoring/grafana

src/main/resources/application-local.yml

### QueryDSL ###
src/main/generated/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## Tech Stack

- [Spring Boot 2.7](https://spring.io/blog/2022/09/22/spring-boot-2-7-4-available-now)
- [Spring Boot 3.2.2](https://spring.io/blog/2024/01/19/spring-boot-3-2-2-available-now)
with [Java 17](https://docs.oracle.com/en/java/javase/17/docs/api/index.html)
- [MySQL](https://dev.mysql.com/doc/) & [JPA](https://docs.spring.io/spring-data/jpa/docs/current/reference/html/)
- [JUnit5](https://junit.org/junit5/docs/current/user-guide/) for testing
Expand Down
31 changes: 27 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
buildscript {
ext {
queryDslVersion = "5.0.0"
}
}

plugins {
id 'java'
id 'org.springframework.boot' version '2.7.4'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'org.springframework.boot' version '3.2.2'
id 'io.spring.dependency-management' version '1.1.4'
id "org.asciidoctor.jvm.convert" version "3.3.2"
id 'jacoco'
}
Expand Down Expand Up @@ -32,14 +38,16 @@ repositories {
}

dependencies {
// Properties Migrator
runtimeOnly "org.springframework.boot:spring-boot-properties-migrator"

implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

// Repositories
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.amqp:spring-rabbit:2.3.12'
implementation 'org.springframework.amqp:spring-rabbit:3.1.1'

runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j:8.0.31'
Expand Down Expand Up @@ -79,6 +87,7 @@ dependencies {
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.mockito:mockito-inline:5.2.0'

// jwt decode
implementation 'org.bouncycastle:bcprov-jdk15on:1.69'
Expand All @@ -88,6 +97,18 @@ dependencies {

// AOP
implementation 'org.springframework.boot:spring-boot-starter-aop'

// querydsl
implementation "com.querydsl:querydsl-core:${queryDslVersion}"
annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}:jakarta"
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}:jakarta"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
implementation "jakarta.annotation:jakarta.annotation-api"
implementation "com.querydsl:querydsl-codegen:${queryDslVersion}"

// tink
implementation 'com.google.crypto.tink:tink-android:1.4.0-rc1'
implementation 'com.google.crypto.tink:apps-rewardedads:1.10.0'
}

asciidoctor {
Expand All @@ -112,6 +133,7 @@ configurations {
compileOnly {
extendsFrom annotationProcessor
}
querydsl.extendsFrom compileClasspath
}

jar.enabled = false
Expand All @@ -128,6 +150,7 @@ jacocoTestReport {
}
// finalizedBy 'jacocoTestCoverageVerification'
}

//jacocoTestCoverageVerification {
// violationRules {
// rule {
Expand Down
1 change: 1 addition & 0 deletions src/docs/asciidoc/add-friend.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== 친구 추가하기

=== 요청
Expand Down
1 change: 1 addition & 0 deletions src/docs/asciidoc/apple.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== Apple 구독 구매 검증하기

=== 요청
Expand Down
28 changes: 28 additions & 0 deletions src/docs/asciidoc/check-is-possible-admob.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
:reproducible:
== 상점에서 보상형 광고 가능한지 여부

=== 요청

include::{snippets}/api/v1/admob/possible/http-request.adoc[]

=== 요청 파라미터

include::{snippets}/api/v1/admob/possible/path-parameters.adoc[]

----
tag -> ADMOB_POINT
----
* 보상형 광고 다른곳에서 사용할 수도 있으므로 tag로 어떤 곳에서 사용하고 있는곳인지 tag로 명시
* 현재는 상점에 있는 보상형 광고 (ADMOB_POINT를 tag에 요청)

=== 응답

include::{snippets}/api/v1/admob/possible/http-response.adoc[]

=== NOTE


=== CHANGELOG

- 2024.02.17 API 릴리즈
- 2024.02.16 명세서 작성
1 change: 1 addition & 0 deletions src/docs/asciidoc/check-keyword.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== 투표 키워드 확인하기

=== 요청
Expand Down
1 change: 1 addition & 0 deletions src/docs/asciidoc/check-user-by-id.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== 유저 정보 조회하기

=== 요청
Expand Down
46 changes: 46 additions & 0 deletions src/docs/asciidoc/check-user-v2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
:reproducible:
== 내 정보 조회하기 V2

=== 요청

include::{snippets}/api/v2/user/http-request.adoc[]

=== 응답

include::{snippets}/api/v2/user/http-response.adoc[]

*필드 타입*

- "userId": Long
- "name": String
- "yelloId": String
- "gender": "M" | "F"
- "email": String
- "profileImageUrl": String
- "social": "KAKAO" | "APPLE"
- "uuid": String(10)
- "deviceToken": String
- "groupId": Long
- "group": String
- "groupType": "UNIVERSITY" | "HIGH_SCHOOL" | "MIDDLE_SCHOOL" | "SOPT"
- "groupName": String
- "subGroupName": String
- "groupAdmissionYear": Integer
- "recommendCount": Long
- "ticketCount": Integer
- "point": Integer
- "subscribe": "normal" | "active" | "canceled"
- "yelloCount": Integer
- "friendCount": Integer

=== Note

- 내 정보 조회하기 V1가 제공했던 단편적인 정보를 보완하기 위해 설계된 API입니다.
- `Authroization` 헤더로 제공된 JWT Token에 담긴 유저의 정보가 응답으로 주어집니다.
- 유저 정보가 필요하면 해당 API를 사용하세요!

=== CHANGELOG

- 2024.01.07 첫 릴리즈
- 2024.01.09 필드 타입 추가
- 2024.01.30 groupId 필드 추가
3 changes: 2 additions & 1 deletion src/docs/asciidoc/check-user.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
== 내 정보 조회하기
:reproducible:
== 내 정보 조회하기 V1

=== 요청

Expand Down
1 change: 1 addition & 0 deletions src/docs/asciidoc/check-vote-available.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== 투표 가능 여부 조회

=== 요청
Expand Down
30 changes: 30 additions & 0 deletions src/docs/asciidoc/create-event-history.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
:reproducible:
== 이벤트 참여

=== 요청

include::{snippets}/api/v1/event/join/1/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/event/join/1/http-response.adoc[]

=== 주의

- "tag": "LUNCH_EVENT"

=== NOTE

- Header에 무작위한 UUID4 값을 넣어주세요
* 예시) IdempotencyKey: 0397b5f3-ecdc-47d6-b5d7-2b1afcf00e87
- 주의사항
* tag 요청값에 해당하는 이벤트의 날짜와 시간이 모두 유효해야함.
(뭔가 에러나면 서버요청 ㄱㄱ)
* 같은 멱등성키를 2번 요청하면, 400번 에러.
- ADMOB
* 광고를 시청하기 전, 해당 API를 호출.
* ADMOB 서버에 ServerSideVerificationOptions의 customData에 동일한 멱등성 키를 넘겨주세요.

=== CHANGELOG

- 2024.02.07 릴리즈
1 change: 1 addition & 0 deletions src/docs/asciidoc/create-vote.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== 투표 생성하기

=== 요청
Expand Down
1 change: 1 addition & 0 deletions src/docs/asciidoc/delete-friend.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== 친구 삭제하기

=== 요청
Expand Down
29 changes: 29 additions & 0 deletions src/docs/asciidoc/delete-user-v2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:reproducible:
== 탈퇴 & 사유 저장 v2

=== 요청

include::{snippets}/api/v2/user/deleteUser/http-request.adoc[]

=== 응답

include::{snippets}/api/v2/user/deleteUser/http-response.adoc[]

*필드 타입*

- "value": String
* value는 탈퇴 사유를 보내주시면 됩니다.


*필드 타입*

=== NOTE

- AccessToken에 해당하는 User의 탈퇴 처리 및 탈퇴 사유를 저장하는 API입니다.
// - User의 다양한 정보를 저장하는 API로 범용적인 확장할 예정입니다.
// * 차후에 tag에 들어갈 수 있는 ENUM의 종류를 다양화 할 예정입니다.

=== CHANGELOG

- 2024.01.27 API 릴리즈
- 2024.01.09 명세 작성
1 change: 1 addition & 0 deletions src/docs/asciidoc/delete-user.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== 유저 탈퇴하기

=== 요청
Expand Down
1 change: 1 addition & 0 deletions src/docs/asciidoc/device-token.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:reproducible:
== 디바이스 토큰 수정하기

=== 요청
Expand Down
39 changes: 39 additions & 0 deletions src/docs/asciidoc/edit-user.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
:reproducible:
== 유저 프로필 수정

=== 요청

include::{snippets}/api/v1/user/update/http-request.adoc[]

*필드 타입*

- "name": String
- "yelloId": String
- "gender": "M" | "F"
- "email": String
- "profileImageUrl": String
- "groupId": Long
* 대학교 검색 또는 고등학교 검색 API를 이용하여 유저가 선택한 groupId를 입력해주세요.
* 해당 groupId에 해당하는 group이 고등학교면, 해당 유저는 고등학생 / 대학교면 대학생이 됩니다.
- "groupAdmissionYear": Integer
* 대학생이면 학번 / 고등학생이면 '반(class)'를 넣어주세요.

=== 응답

include::{snippets}/api/v1/user/update/http-response.adoc[]

*필드 타입*

=== NOTE

- 포인트 / 구독정보 / 로그인 정보와 같이 user-pure하지 않은 정보는 수정할 수 없도록 설계하였습니다.
* 해당 정보 수정API는 도메인 별로 만들 예정입니다.
- 비즈니스 로직인 **'1년에 1회 수정 가능하다'**라는 조건과 상관없이 여러번 호출하여 유저 정보 수정이 가능합니다.
* 해당 비즈니스 로직을 만족하기 위해서 link:user-data-get.html[프로필 수정 가능 여부 조회]를 같이 사용해주세요.
** UserGroup(`groupId`, `groupAdmissionYear`)에 대한 정보가 유저의 기존 정보와 달라졌을때**만** `프로필 수정 가능 여부` 가 갱신됩니다.

=== CHANGELOG

- 2024.02.02 groupId, groupAdmissionYear 변경에 따른 제약조건 추가
- 2024.01.31 릴리즈
- 2024.01.09 명세 작성
37 changes: 37 additions & 0 deletions src/docs/asciidoc/find-event.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
:reproducible:
== 이벤트 조회

=== 요청

include::{snippets}/api/v1/event/1/http-request.adoc[]

=== 응답

include::{snippets}/api/v1/event/1/http-response.adoc[]

include::{snippets}/api/v1/event/2/http-response.adoc[]

include::{snippets}/api/v1/event/3/http-response.adoc[]

=== 주의

- data: *Response*[]
- *Response*
- tag : "LUNCH_EVENT"
* LUNCH_EVENT에 해당하는 *Response*가 없으면 Render 해주지 말아주세요
- startDate : "2024-01-01T00:00:00+09:00"
- endDate : "2024-12-31T00:00:00+09:00"
- title : "점심 시간 깜짝 선물!"
- subTitle : "평일 12-14시 최대 1회까지 참여 가능"
- animationList : string[]
* URL이 들어감.
- eventReward: *EventReward* | null
* 해당 필드가 **null**일 시, 이벤트 보여주지 않도록 해주세요.

=== NOTE

- *!* LUNCH_EVENT에 해당하는 Response가 없거나, LUNCH_EVENT Response의 eventReward가 null이면, 메인화면 접속시, 이벤트 화면을 띄워주지마세요.

=== CHANGELOG

- 2024.02.06 릴리즈
Loading

0 comments on commit 2ccb3ed

Please sign in to comment.