Skip to content

Commit cedfd3c

Browse files
Merge pull request #15 from NIPA-AWS-Developer-2nd/feature/chat-and-web-push
[FEAT] 모임 채팅, Web-push 알림
2 parents 21ed1b7 + dc23dc2 commit cedfd3c

74 files changed

Lines changed: 5832 additions & 1373 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.

.github/workflows/01-dev-build-deploy.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ jobs:
5454
envkey_AWS_CLOUDFRONT_DOMAIN: ${{ secrets.AWS_CLOUDFRONT_DOMAIN}}
5555
envkey_NAVER_MAP_CLIENT_ID: ${{ secrets.NAVER_MAP_CLIENT_ID }}
5656
envkey_NAVER_MAP_CLIENT_SECRET: ${{ secrets.NAVER_MAP_CLIENT_SECRET }}
57+
envkey_COOLSMS_API_KEY: ${{ secrets.COOLSMS_API_KEY }}
58+
envkey_COOLSMS_API_SECRET: ${{ secrets.COOLSMS_API_SECRET }}
59+
envkey_COOLSMS_FROM_NUMBER: ${{ secrets.COOLSMS_FROM_NUMBER }}
60+
envkey_VAPID_PUBLIC_KEY: ${{ secrets.VAPID_PUBLIC_KEY }}
61+
envkey_VAPID_PRIVATE_KEY: ${{ secrets.VAPID_PRIVATE_KEY }}
62+
envkey_VAPID_SUBJECT: ${{ secrets.VAPID_SUBJECT }}
5763
file_name: .env.development
5864
fail_on_empty: false
5965
sort_keys: false
@@ -125,6 +131,14 @@ jobs:
125131
NAVER_MAP_CLIENT_ID=${{ secrets.NAVER_MAP_CLIENT_ID }}
126132
NAVER_MAP_CLIENT_SECRET=${{ secrets.NAVER_MAP_CLIENT_SECRET }}
127133
134+
COOLSMS_API_KEY=${{ secrets.COOLSMS_API_KEY }}
135+
COOLSMS_API_SECRET=${{ secrets.COOLSMS_API_SECRET }}
136+
COOLSMS_FROM_NUMBER=${{ secrets.COOLSMS_FROM_NUMBER }}
137+
138+
VAPID_PUBLIC_KEY=${{ secrets.VAPID_PUBLIC_KEY }}
139+
VAPID_PRIVATE_KEY=${{ secrets.VAPID_PRIVATE_KEY }}
140+
VAPID_SUBJECT=${{ secrets.VAPID_SUBJECT }}
141+
128142
- name: Deploy Amazon ECS task definition
129143
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
130144
with:

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@
1515
- Entities 추가
1616
- TypeORM 설정, 마이그레이션 추가
1717
- Seeder 추가
18-
- JWT 가드 구현
18+
- JWT 가드 구현
19+
- **2025-08-16**
20+
- Cool SMS API 통합 완료
21+
- 전화번호 인증 SMS 발송 기능 구현

package-lock.json

Lines changed: 107 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"schema:drop": "npm run typeorm -- schema:drop -d src/config/typeorm.config.ts",
2929
"schema:create": "npm run typeorm -- schema:sync -d src/config/typeorm.config.ts",
3030
"db:refresh": "npm run schema:drop && npm run schema:create && npm run seed",
31+
"meetings:refresh": "NODE_ENV=development ts-node -r tsconfig-paths/register src/database/seeds/refresh-meetings.ts",
3132
"version:patch": "npm version patch --no-git-tag-version",
3233
"version:minor": "npm version minor --no-git-tag-version",
3334
"version:major": "npm version major --no-git-tag-version"
@@ -70,6 +71,7 @@
7071
"typeorm": "^0.3.25",
7172
"ulid": "^3.0.1",
7273
"uuid": "^11.1.0",
74+
"web-push": "^3.6.7",
7375
"winston": "^3.17.0"
7476
},
7577
"devDependencies": {
@@ -87,6 +89,7 @@
8789
"@types/pg": "^8.15.5",
8890
"@types/supertest": "^6.0.2",
8991
"@types/uuid": "^10.0.0",
92+
"@types/web-push": "^3.6.4",
9093
"eslint": "^9.18.0",
9194
"eslint-config-prettier": "^10.0.1",
9295
"eslint-plugin-prettier": "^5.2.2",

src/app.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { LevelModule } from './modules/level/level.module';
1414
import { UserInterestsModule } from './modules/user-interests/user-interests.module';
1515
import { UserHashtagsModule } from './modules/user-hashtags/user-hashtags.module';
1616
import { MissionModule } from './modules/mission/mission.module';
17+
import { MissionVerificationModule } from './modules/mission/mission-verification.module';
1718
import { MeetingModule } from './modules/meeting/meeting.module';
1819
import { HomeModule } from './modules/home/home.module';
1920
import { LocationModule } from './modules/location/location.module';
@@ -24,6 +25,7 @@ import { SchedulerModule } from './modules/scheduler/scheduler.module';
2425
import { PointModule } from './modules/point/point.module';
2526
import { AttendanceModule } from './modules/attendance/attendance.module';
2627
import { ChatModule } from './modules/chat/chat.module';
28+
import { GiftCardModule } from './modules/gift-card/gift-card.module';
2729
import { JwtAuthGuard } from './auth/guards/jwt-auth.guard';
2830
import { AllExceptionsFilter } from './common/filters/all-exceptions.filter';
2931

@@ -100,6 +102,7 @@ import { AllExceptionsFilter } from './common/filters/all-exceptions.filter';
100102
UserInterestsModule,
101103
UserHashtagsModule,
102104
MissionModule,
105+
MissionVerificationModule,
103106
MeetingModule,
104107
HomeModule,
105108
LocationModule,
@@ -110,6 +113,7 @@ import { AllExceptionsFilter } from './common/filters/all-exceptions.filter';
110113
PointModule,
111114
AttendanceModule,
112115
ChatModule,
116+
GiftCardModule,
113117
],
114118
controllers: [AppController],
115119
providers: [

src/auth/auth.controller.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@ export class AuthController {
225225
// 전화번호 인증 코드 발송
226226
@Public()
227227
@Post('phone/send-code')
228-
sendVerificationCode(
228+
async sendVerificationCode(
229229
@Body() body: PhoneVerificationRequest,
230-
): PhoneVerificationResult {
230+
): Promise<PhoneVerificationResult> {
231231
try {
232-
const result = this.authService.sendVerificationCode(body.phoneNumber);
232+
const result = await this.authService.sendVerificationCode(body.phoneNumber);
233233
return result;
234234
} catch (error: unknown) {
235235
this.logger.error('전화번호 인증 코드 발송 실패', {

src/auth/auth.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { GoogleService } from './service/google.service';
1111
import { PhoneService } from './service/phone.service';
1212
import { JwtStrategy } from './strategies/jwt.strategy';
1313
import { JwtAuthGuard } from './guards/jwt-auth.guard';
14+
import { SmsService } from '../common/services';
1415
import {
1516
User,
1617
SocialAccount,
@@ -55,6 +56,7 @@ import {
5556
NaverService,
5657
GoogleService,
5758
PhoneService,
59+
SmsService,
5860
JwtStrategy,
5961
JwtAuthGuard,
6062
],

src/auth/auth.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ export class AuthService {
6868
}
6969

7070
// 전화번호 인증 코드 발송
71-
sendVerificationCode(phoneNumber: string): PhoneVerificationResult {
72-
return this.phoneService.sendVerificationCode(phoneNumber);
71+
async sendVerificationCode(phoneNumber: string): Promise<PhoneVerificationResult> {
72+
return await this.phoneService.sendVerificationCode(phoneNumber);
7373
}
7474

7575
// 전화번호 인증 및 로그인

0 commit comments

Comments
 (0)