-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from TeamSobokSobok/develop
RELEASE 2024/07/07
- Loading branch information
Showing
11 changed files
with
161 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,29 @@ | ||
# SobokSobok-Server | ||
SobokSobok server with Java, Spring | ||
|
||
## 프로젝트 | ||
# 소복소복<img src="https://user-images.githubusercontent.com/68781598/149136866-31b58e24-59f2-437b-8338-87111dd8a479.png" align=left width=100> | ||
|
||
> 소중한 사람과 함께하는 복약 체크 서비스 💊 | ||
<br /> | ||
|
||
## 💭 프로젝트 설명 | ||
|
||
> 여러분은 소중한 사람의 건강을 지키기 위해 어떤 노력을 하고 계신가요? | ||
> | ||
> 걱정되는 마음은 있지만, 막상 내가 매일 무언가 행동하는 건 쉽지 않죠. | ||
> 일상이 바쁜 당신을 위해서 소복소복이 여러분의 일을 줄여드려요. | ||
> 소복소복에서는 소중한 사람이 약을 제 때 먹었는지 직접 물어보지 않고도 체크할 수 있거든요. | ||
> | ||
> **나의 복약 체크는 물론, 소중한 사람의 복약까지 확인할 수 있는 ‘소복소복’** | ||
> **우리의 건강을 챙기는 매일의 실천입니다** 🙂 | ||
<br /> | ||
|
||
## 💭 프로젝트 핵심 기능 | ||
|
||
- 메인 나의 복약을 체크하고, 상대방이 보내준 응원스티커를 확인할 수 있습니다. | ||
- 공유 소중한 사람의 복약 캘린더를 확인하고, 응원을 보낼 수 있습니다. | ||
- 알림 캘린더 공유 요청과 전송받은 복약 정보를 확인할 수 있습니다. | ||
- 약 추가 내 복약 정보를 추가하고, 소중한 사람에게 복약 일정을 전송할 수 있습니다. | ||
|
||
<img src="https://user-images.githubusercontent.com/51286325/150369337-b16e0891-b7c0-4443-a459-77821cb5d05d.jpg"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/java/io/sobok/SobokSobok/auth/domain/Platform.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.sobok.SobokSobok.auth.domain; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum Platform { | ||
|
||
iOS, | ||
ANDROID, | ||
; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package io.sobok.SobokSobok.config; | ||
|
||
import io.awspring.cloud.sqs.operations.SqsTemplate; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import software.amazon.awssdk.auth.credentials.AwsCredentials; | ||
import software.amazon.awssdk.regions.Region; | ||
import software.amazon.awssdk.services.sqs.SqsAsyncClient; | ||
|
||
@Configuration | ||
public class SQSConfig { | ||
|
||
@Value("${spring.cloud.aws.credentials.access-key}") | ||
private String AWS_ACCESS_KEY; | ||
|
||
@Value("${spring.cloud.aws.credentials.secret-key}") | ||
private String AWS_SECRET_KEY; | ||
|
||
@Value("${spring.cloud.aws.region.static}") | ||
private String AWS_REGION; | ||
|
||
@Bean | ||
public SqsAsyncClient sqsAsyncClient() { | ||
return SqsAsyncClient.builder() | ||
.credentialsProvider(() -> new AwsCredentials() { | ||
@Override | ||
public String accessKeyId() { | ||
return AWS_ACCESS_KEY; | ||
} | ||
|
||
@Override | ||
public String secretAccessKey() { | ||
return AWS_SECRET_KEY; | ||
} | ||
}) | ||
.region(Region.of(AWS_REGION)) | ||
.build(); | ||
} | ||
|
||
@Bean | ||
public SqsTemplate sqsTemplate() { | ||
return SqsTemplate.newTemplate(sqsAsyncClient()); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/sobok/SobokSobok/external/aws/sqs/SQSMessageSender.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package io.sobok.SobokSobok.external.aws.sqs; | ||
|
||
import io.awspring.cloud.sqs.operations.SendResult; | ||
import io.awspring.cloud.sqs.operations.SqsTemplate; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
import software.amazon.awssdk.services.sqs.SqsAsyncClient; | ||
|
||
@Component | ||
public class SQSMessageSender { | ||
|
||
private final SqsTemplate queueMessagingTemplate; | ||
|
||
@Value("${spring.cloud.aws.sqs.name}") | ||
private String QUEUE_NAME; | ||
|
||
public SQSMessageSender(SqsAsyncClient sqsAsyncClient) { | ||
this.queueMessagingTemplate = SqsTemplate.newTemplate(sqsAsyncClient); | ||
} | ||
|
||
public SendResult<SQSPushNotificationRequest> sendMessage(SQSPushNotificationRequest request) { | ||
return queueMessagingTemplate.send(to -> to | ||
.queue(QUEUE_NAME) | ||
.payload(request)); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/io/sobok/SobokSobok/external/aws/sqs/SQSPushNotificationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.sobok.SobokSobok.external.aws.sqs; | ||
|
||
public record SQSPushNotificationRequest( | ||
|
||
String deviceToken, | ||
|
||
String title, | ||
|
||
String content | ||
) { | ||
} |