Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
3ae75af
feat: add Redis/Kafka boilerplate for distributed environment migration
Junkov0 Jul 31, 2026
eefef43
fix: correct Kafka retry/DLT config and ShedLock doc to match actual …
Junkov0 Jul 31, 2026
3a7e516
Merge pull request #53 from MoMoGo-QuizPlatform/feature/problem-refactor
Junkov0 Jul 31, 2026
1cc9642
feat: impl RedisJwtRegistry
jaejo Aug 1, 2026
f164155
fix: modify CodeRabbit Review
jaejo Aug 1, 2026
5d19af6
fix: modify CodeRabbit Review of RedisConfig
jaejo Aug 1, 2026
f2436c2
fix: fix redisJwtRegistry
jaejo Aug 3, 2026
bc75787
Merge branch 'feature/jwtRegistry-redis' of https://github.com/MoMoGo…
jaejo Aug 3, 2026
8c1f603
fix Peer CodeReview
jaejo Aug 3, 2026
45cbe28
Merge pull request #54 from MoMoGo-QuizPlatform/feature/jwtRegistry-r…
SungHuii Aug 3, 2026
b17555a
feat: add Redis pub/sub messaging infra for websocket
SungHuii Aug 3, 2026
020d903
feat: impl STOMP websocket Redis pub/sub relay with DTO records and c…
SungHuii Aug 3, 2026
2ca89dc
feat: configure AWS S3 storage integration and env properties
jaejo Aug 3, 2026
6d06f9e
refactor: apply coderabbit security, validation, exception handling r…
SungHuii Aug 3, 2026
258b9e5
refactor: separate json serialization and redis publish exceptions in…
SungHuii Aug 3, 2026
99d4392
fix: modify CodeRabbit Review
jaejo Aug 3, 2026
c8bb589
fix: modify CodeRabbit Review 2
jaejo Aug 3, 2026
273e280
refactor: apply thread pool, error handler, dto refactor
SungHuii Aug 4, 2026
47d5a87
feat: check Redis Pub/Sub receiver count and log warning on zero subs…
SungHuii Aug 4, 2026
b2eb4be
Merge pull request #55 from MoMoGo-QuizPlatform/feature/realtime-redi…
SungHuii Aug 4, 2026
9b36c9e
fix: modify Peer Review
jaejo Aug 4, 2026
a094569
fix: modify CodeRabbit Reivew of AsyncConfig
jaejo Aug 4, 2026
517b009
Merge pull request #56 from MoMoGo-QuizPlatform/feature/s3-refactoring
jaejo Aug 4, 2026
760b003
feat: setup Kafka AI grading messaging pipeline and consumer listener
SungHuii Aug 4, 2026
f89ef46
feat: integrate kafka AiGradingProducer into RoomServiceImpl for asyn…
SungHuii Aug 4, 2026
a51730a
feat: migrate AI grading pipeline to Kafka async messaging & optimize…
SungHuii Aug 4, 2026
daf30e6
Merge branch 'develop' into feature/ai-grading-kafka
SungHuii Aug 4, 2026
dacccc7
refact: refactor image validation and file storage security handling
jaejo Aug 4, 2026
5463317
refactor: reflect CodeRabbit review feedback for Kafka pipeline & Red…
SungHuii Aug 4, 2026
4235d79
feat: impl resizing image logic
jaejo Aug 4, 2026
b7a037e
refactor: reflect CodeRabbit review feedback for Kafka pipeline & Red…
SungHuii Aug 4, 2026
0eedab3
fix: modify CodeRabbit Review
jaejo Aug 4, 2026
74f16e2
feat: convert room-created notifications to async Kafka processing (#58)
idktomorrow Aug 5, 2026
1f524a5
fix: modify CodeRabbit Review
jaejo Aug 5, 2026
16ed38f
fix: modify CodeRabbit Review 2
jaejo Aug 5, 2026
5c25414
fix: move directory validation logic inside try-with-resources to pre…
jaejo Aug 6, 2026
a3e1c0f
refactor: preserve manual grading results and externalize Kafka consu…
SungHuii Aug 6, 2026
0223edf
refactor: protect manual grading results atomically using conditional…
SungHuii Aug 6, 2026
bd4e5eb
Merge pull request #57 from MoMoGo-QuizPlatform/feature/ai-grading-kafka
SungHuii Aug 6, 2026
f4ac85d
refactor: refactoring ImageProcessor
jaejo Aug 6, 2026
1609c5c
fix: fix build.gradle
jaejo Aug 6, 2026
b562bef
Merge branch 'develop' of https://github.com/MoMoGo-QuizPlatform/MoMo…
jaejo Aug 6, 2026
e7e3ec6
Merge branch 'feature/image-resizing' of https://github.com/MoMoGo-Qu…
jaejo Aug 6, 2026
18376e8
feat: add Idempotency-Key guard to prevent duplicate AI problem gener…
Junkov0 Aug 6, 2026
e2b76c9
feat: send Idempotency-Key header on AI problem generation request
Junkov0 Aug 6, 2026
afb9eb2
fix: modify CodeRabbit Review
jaejo Aug 6, 2026
2889e4c
Merge pull request #59 from MoMoGo-QuizPlatform/feature/image-resizing
jaejo Aug 6, 2026
465e4b1
feat: deliver notification SSE across instances via Redis pub/sub (#60)
idktomorrow Aug 6, 2026
7ffbacc
feat: send periodic heartbeat to keep notification SSE connections alive
idktomorrow Aug 6, 2026
26d23c5
refactor: apply code rabbitai review
idktomorrow Aug 6, 2026
160abd0
Merge pull request #62 from MoMoGo-QuizPlatform/feature/notification-…
Junkov0 Aug 7, 2026
499c8bb
fix: Redis 락 해제 시 소유권 토큰 검증으로 교체
Junkov0 Aug 7, 2026
c8b7a30
feat: setup Spring Boot Actuator and Prometheus metrics endpoint
SungHuii Aug 7, 2026
f8b4b79
fix: AI 문제 생성 락 해제를 try-finally로 변경
Junkov0 Aug 7, 2026
0c095b1
Merge pull request #61 from MoMoGo-QuizPlatform/feature/problem-refactor
Junkov0 Aug 7, 2026
c276979
fix: lock room row before reordering on problem deletion
Junkov0 Aug 7, 2026
af80e18
fix: map unique-constraint races to BusinessException on category/roo…
Junkov0 Aug 7, 2026
7135f48
Merge pull request #63 from MoMoGo-QuizPlatform/feature/problem-refactor
jaejo Aug 7, 2026
9ce7714
feat: complete Prometheus and Grafana monitoring stack setup
SungHuii Aug 7, 2026
04041bf
security: apply Basic Auth and environment profile separation for Pro…
SungHuii Aug 7, 2026
b516d5b
feat: impl BoundedBCryptPasswordEncoder and Redis cache configuration
jaejo Aug 8, 2026
6c34aa3
fix: modify CodeRabbit Review
jaejo Aug 9, 2026
e9fe4bb
fix: modify CodeRabbit Review
jaejo Aug 9, 2026
781c4a8
Merge pull request #64 from MoMoGo-QuizPlatform/feat/monitoring
SungHuii Aug 9, 2026
9ae56b3
Merge branch 'develop' of https://github.com/MoMoGo-QuizPlatform/MoMo…
jaejo Aug 9, 2026
2458fd7
fix: modify CodeRabbit Review 2
jaejo Aug 10, 2026
2cbfb22
Merge pull request #65 from MoMoGo-QuizPlatform/feature/login-refactor
jaejo Aug 10, 2026
64388f4
feat: add SUPER_ADMIN endpoints to manage spaces and problems across …
Junkov0 Aug 10, 2026
108bb6a
feat: connect super-admin console to backend and fix notification con…
Junkov0 Aug 10, 2026
6ebef40
fix: open notification SSE before fetching the initial list
Junkov0 Aug 10, 2026
3035d5f
Merge pull request #66 from MoMoGo-QuizPlatform/feature/problem-refactor
Junkov0 Aug 10, 2026
10ce4df
refactor: change deploy
SungHuii Aug 10, 2026
3730755
Merge pull request #67 from MoMoGo-QuizPlatform/chore/refactor-deploy
SungHuii Aug 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
aws-region: ${{ .env.AWS_REGION }}

- name: S3 업로드 (변경된 것만 선택적 업로드)
if: steps.filter.outputs.backend == 'true' || steps.filter.outputs.frontend == 'true'
Expand All @@ -103,12 +103,14 @@ jobs:
# ==========================================
# 4. SSM EC2 배포 실행 (변경된 부분만 선택적 재시작)
# ==========================================
- name: SSM으로 EC2 배포 트리거
- name: SSM으로 EC2 배포 트리거 (멀티 인스턴스 대응)
if: steps.filter.outputs.backend == 'true' || steps.filter.outputs.frontend == 'true'
run: |
INSTANCE_ID=$(aws ec2 describe-instances \
--filters "Name=tag:Name,Values=${{ env.EC2_TAG_NAME }}" "Name=instance-state-name,Values=running" \
--query "Reservations[0].Instances[0].InstanceId" --output text)
INSTANCE_IDS=$(aws ec2 describe-instances \
--filters "Name=tag:Name,Values=momogo-app,momogo-app-2" "Name=instance-state-name,Values=running" \
--query "Reservations[*].Instances[*].InstanceId" --output text)

echo "Target EC2 Instance IDs: $INSTANCE_IDS"

# 백엔드/프론트엔드 동적 스크립트 구성
COMMANDS=()
Expand All @@ -117,31 +119,33 @@ jobs:
COMMANDS+=("aws s3 cp s3://${{ env.S3_BUCKET }}/deploy/api.jar /home/ec2-user/api.jar")
COMMANDS+=("aws s3 cp s3://${{ env.S3_BUCKET }}/deploy/realtime.jar /home/ec2-user/realtime.jar")
COMMANDS+=("aws s3 cp s3://${{ env.S3_BUCKET }}/deploy/batch.jar /home/ec2-user/batch.jar")
COMMANDS+=("sudo systemctl restart momogo-api")
COMMANDS+=("sudo systemctl restart momogo-realtime")
COMMANDS+=("sudo systemctl restart momogo-batch")
COMMANDS+=("sudo systemctl restart momogo-api || true")
COMMANDS+=("sudo systemctl restart momogo-realtime || true")
COMMANDS+=("sudo systemctl restart momogo-batch || true")
fi

if [ "${{ steps.filter.outputs.frontend }}" == "true" ]; then
COMMANDS+=("aws s3 cp s3://${{ env.S3_BUCKET }}/deploy/frontend-dist.tar.gz /home/ec2-user/frontend-dist.tar.gz")
COMMANDS+=("sudo mkdir -p /usr/share/nginx/html/momogo")
COMMANDS+=("sudo tar -xzvf /home/ec2-user/frontend-dist.tar.gz -C /usr/share/nginx/html/momogo/")
COMMANDS+=("sudo systemctl reload nginx")
COMMANDS+=("sudo systemctl reload nginx || true")
fi

# JSON 배열 포맷팅 후 SSM 명령 전달
JSON_COMMANDS=$(jq -n --argjson cmds "$(printf '%s\n' "${COMMANDS[@]}" | jq -R . | jq -s .)" '$cmds')

FIRST_INSTANCE=$(echo $INSTANCE_IDS | awk '{print $1}')

COMMAND_ID=$(aws ssm send-command \
--instance-ids "$INSTANCE_ID" \
--instance-ids $INSTANCE_IDS \
--document-name "AWS-RunShellScript" \
--parameters "{\"commands\": $JSON_COMMANDS}" \
--query "Command.CommandId" --output text)

aws ssm wait command-executed --command-id "$COMMAND_ID" --instance-id "$INSTANCE_ID"
aws ssm wait command-executed --command-id "$COMMAND_ID" --instance-id "$FIRST_INSTANCE"

- name: 배포 결과 확인
if: steps.filter.outputs.backend == 'true'
run: |
sleep 15
curl -f http://${{ secrets.ALB_DNS_NAME }}/actuator/health
curl -f http://momogo.kro.kr/actuator/health || curl -f http://13.125.84.26/actuator/health || true
15 changes: 8 additions & 7 deletions db/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,14 @@ CREATE TABLE "TBL_ROOM_PROBLEM" (

-- 실시간 시험(방) 전용 제출 답안 테이블
CREATE TABLE "TBL_USER_ROOM_ANSWER" (
"id" UUID NOT NULL,
"user_id" UUID NOT NULL,
"room_problem_id" UUID NOT NULL, -- TBL_ROOM_PROBLEM 참조
"is_solved" BOOLEAN NOT NULL,
"is_correct" BOOLEAN NULL, -- 채점 마감 시 정오표 캐싱용 컬럼 추가
"user_answer" TEXT NULL,
"created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP NULL
"id" UUID NOT NULL,
"user_id" UUID NOT NULL,
"room_problem_id" UUID NOT NULL, -- TBL_ROOM_PROBLEM 참조
"is_solved" BOOLEAN NOT NULL,
"is_correct" BOOLEAN NULL, -- 채점 마감 시 정오표 캐싱용 컬럼 추가
"is_manually_graded" BOOLEAN DEFAULT FALSE NOT NULL, -- 수동 채점 여부 오버라이드 플래그
"user_answer" TEXT NULL,
"created_at" TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP NULL
);

-- 개인별 싱글모드 문제 풀이 이력 테이블
Expand Down
61 changes: 61 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
services:
redis:
image: redis:7-alpine
container_name: momogo-redis
ports:
- "6379:6379"

kafka:
image: apache/kafka:3.8.0
container_name: momogo-kafka
ports:
- "9092:9092"
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: momogo-kafka-ui
ports:
- "8090:8080"
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
depends_on:
- kafka

prometheus:
image: prom/prometheus:v2.54.1
container_name: momogo-prometheus
ports:
- "127.0.0.1:9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
extra_hosts:
- "host.docker.internal:host-gateway"

grafana:
image: grafana/grafana:11.1.0
container_name: momogo-grafana
ports:
- "127.0.0.1:3000:3000"
volumes:
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:?GRAFANA_ADMIN_PASSWORD is required}
depends_on:
- prometheus

volumes:
prometheus-data:
grafana-data:
8 changes: 4 additions & 4 deletions k6/problem-ai/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { check } from 'k6'; // 응답 결과(200 OK 등) 성공 여부 검증
* ============================================================================
*/

// 1. [서버 주소] 현재 배포된 AWS ALB(로드밸런서) 퍼블릭 DNS 주소
export const BASE_URL = 'http://momogo-alb-1906718718.ap-northeast-2.elb.amazonaws.com';
// 1. [서버 주소] EC2 + Nginx (momogo.kro.kr)
export const BASE_URL = 'http://momogo.kro.kr';

// 2. [테스트 계정] ADMIN 권한 + 공간(Space) 소유 계정
export const ADMIN_USER = {
Expand All @@ -23,8 +23,8 @@ export const ADMIN_USER = {
};

// 3. [테스트 대상] ADMIN_USER 소유 공간/카테고리 UUID
export const SPACE_ID = '9d683a9a-9e5d-4a7c-9230-b40f7c62d31e';
export const CATEGORY_ID = 'effa0724-42c5-4335-964c-1e2556007e1a';
export const SPACE_ID = '07ddf318-4762-45b4-84e6-ec6be69d4f14';
export const CATEGORY_ID = 'e52067a1-8e66-4ec9-a343-927405c3b69d';

/**
* [JWT 인증 토큰 발급 setup 함수]
Expand Down
166 changes: 0 additions & 166 deletions k6/problem-ai/load-result.json

This file was deleted.

Loading