Commit Graph

44 Commits

Author SHA1 Message Date
4c367e84ad Fix: entry token 만료 기반으로 stale waiting room 판단
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 35s
Server CI/CD / deploy (push) Successful in 56s
타임아웃 대신 Redis entry token 존재 여부로 판단:
- pending token이 Redis에 남아있음 → 정상 로딩 중, 방 보존
- pending token이 없음 (만료/소비) → abandoned 확정, 즉시 정리

정상 로딩 중인 파티원의 방을 보호하면서도
강제 종료 유저의 즉각적 복구 가능.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:16:28 +09:00
7ece5f3c44 Fix: 로딩 중 강제 종료 시 stale waiting room 자동 정리
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 38s
Server CI/CD / deploy (push) Successful in 55s
로딩 화면에서 강제 종료하면 BossRoom이 waiting 상태로 남아
재입장이 영구 차단되는 문제 수정.

- waiting 상태 2분 초과 BossRoom 자동 정리 (15초 주기)
- RequestEntry 시 해당 유저의 stale waiting room 선제 정리
- 연결된 RoomSlot도 idle로 리셋

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:00:36 +09:00
4bbab002ea Fix: 테스트 코드 콜백 시그니처 업데이트 (rewardGrant → txID 반환)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 36s
Server CI/CD / deploy (push) Successful in 54s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:45:44 +09:00
9883985968 Fix: 보상 이중 지급 방지, 에러 응답 개선, Rate Limit 조정
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 32s
Server CI/CD / deploy (push) Has been skipped
- reward_worker에 txCheck 기반 이중 지급 방지 추가 (LastTxID 저장 후 재시도 전 확인)
- RewardFailure 모델에 LastTxID 필드 추가
- grantWithRetry가 txID를 반환하도록 변경
- 10회 재시도 초과 시 CRITICAL 로그에 상세 정보 포함
- 경험치 실패도 hasRewardFailure에 반영하여 reward_failed 상태 전이
- 에러 응답에 requestId 필드 포함 (관측성 개선)
- /api/auth/refresh를 authLimiter에서 분리 (NAT 환경 한도 초과 방지)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 21:01:45 +09:00
f50b629d59 Fix: CORS AllowHeaders에 X-Requested-With 추가
Some checks failed
Server CI/CD / lint-and-build (push) Waiting to run
Server CI/CD / deploy (push) Has been cancelled
웹 클라이언트의 fetch 요청에서 X-Requested-With 헤더가
CORS preflight에서 차단되는 문제 수정.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 17:02:56 +09:00
4393503245 Fix: GrantExperience에서 프로필 미존재 시 자동 생성 fallback 추가
FindByUserID → GetProfile(auto-create 포함)로 변경하여
프로필 없는 유저의 경험치 지급 실패 방지.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:15:49 +09:00
d6c75dcaad Fix: BossRoom 레코드 미삭제로 데디서버 슬롯 재사용 불가 수정
CompleteRaid/FailRaid에서 슬롯 리셋 전 BossRoom hard-delete 추가.
기존에는 BossRoom.SessionName uniqueIndex 충돌로 한 번 사용된 슬롯의
재사용이 불가능했음 (10개 중 점점 사용 가능 슬롯 감소).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:00:14 +09:00
83c583c04d Fix: 지갑 미발견 시 자동 생성 fallback 추가
resolveUsername()에서 user_wallets 레코드가 없는 유저(레거시/마이그레이션 누락)에 대해
CreateWallet을 자동 호출하여 지갑을 즉시 생성. unique constraint 충돌 시 재조회로
동시성 안전 처리.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 11:28:38 +09:00
feb8ec96ad feat: 체인 클라이언트 멀티노드 페일오버 (SPOF 해결)
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 21s
Server CI/CD / deploy (push) Successful in 56s
CHAIN_NODE_URLS 환경변수(쉼표 구분)로 복수 노드 지정 가능.
Client.Call()이 네트워크/HTTP 오류 시 다음 노드로 자동 전환.
RPC 레벨 오류(트랜잭션 실패 등)는 즉시 반환 (페일오버 미적용).
기존 CHAIN_NODE_URL 단일 설정은 하위 호환 유지.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 17:31:46 +09:00
fa03673e9c refactor: main.go 서버 초기화 로직을 internal/server/server.go로 분리
Fiber 앱 설정, 미들웨어, rate limiter를 server 패키지로 추출.
main.go는 DB 연결, DI, 서버 시작, graceful shutdown만 담당.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:11:13 +09:00
0dfa744c16 feat: DB DI 전환 + download 하위 호환성 + race condition 수정
- middleware(Auth, Idempotency)를 클로저 팩토리 패턴으로 DI 전환
- database.DB/RDB 전역 변수 제거, ConnectMySQL/Redis 값 반환으로 변경
- download API X-API-Version 헤더 + 하위 호환성 규칙 문서화
- SaveGameData PlayTimeDelta 원자적 UPDATE (race condition 해소)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:58:36 +09:00
f4d862b47f feat: 보상 재시도 + TX 확정 대기 + 에러 포맷 통일 + 품질 고도화
- 보상 지급 실패 시 즉시 재시도(3회 backoff) + DB 기록 + 백그라운드 워커 재시도
- WaitForTx 폴링으로 블록체인 TX 확정 대기, SendTxAndWait 편의 메서드
- chain 트랜잭션 코드 중복 제거 (userTx/operatorTx 헬퍼, 50% 감소)
- AppError 기반 에러 응답 포맷 통일 (8개 코드, 전 핸들러 마이그레이션)
- TX 에러 분류 + 한국어 사용자 메시지 매핑 (11가지 패턴)
- player 서비스 테스트 20개 + chain WaitForTx 테스트 10개 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 16:42:03 +09:00
b16eb6cc7a feat: 에러 처리 표준화 + BossRaid 낙관적 잠금
에러 표준화:
- pkg/apperror — AppError 타입, 7개 sentinel error
- pkg/middleware/error_handler — Fiber ErrorHandler 통합
- 핸들러에서 AppError 반환 시 구조화된 JSON 자동 응답

BossRaid Race Condition:
- 상태 전이 4곳 낙관적 잠금 (UPDATE WHERE status=?)
- TransitionRoomStatus/TransitionRoomStatusMulti 메서드 추가
- ErrStatusConflict sentinel error

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 10:48:28 +09:00
844a5b264b feat: 보안 수정 + Prometheus 메트릭 + 단위 테스트 추가
보안:
- Zip Bomb 방어 (io.LimitReader 100MB)
- Redis Del 에러 로깅 (auth, idempotency)
- 로그인 실패 로그에서 username 제거
- os.Remove 에러 로깅

모니터링:
- Prometheus 메트릭 미들웨어 + /metrics 엔드포인트
- http_requests_total, http_request_duration_seconds 등 4개 메트릭

테스트:
- download (11), chain (10), bossraid (20) = 41개 단위 테스트

기타:
- DB 모델 GORM 인덱스 태그 추가
- launcherHash 필드 + hashFileToHex() 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 10:37:42 +09:00
82adb37ecb fix: BossRoom soft delete → hard delete + 프로필 자동 생성
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 17s
Server CI/CD / deploy (push) Successful in 57s
- BossRoom 삭제 시 Unscoped() hard delete로 변경하여 unique index 충돌 방지
- GetProfile에서 프로필 없으면 기본값으로 자동 생성

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 13:09:23 +09:00
2c1e9698d2 refactor: 클라이언트 직접 호출 BossRaid 엔드포인트 제거
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 13s
Server CI/CD / deploy (push) Successful in 55s
클라이언트가 MMO 서버 경유로 보스 레이드 입장하도록 변경하면서
불필요해진 public /api/bossraid/ 라우트와 핸들러 제거.
입장은 MMO 서버 → internal API 경로만 사용.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:56:38 +09:00
fc976dbba8 fix: ResetRoom 시 BossRoom 레코드 정리
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 15s
Server CI/CD / deploy (push) Successful in 57s
데디서버가 reset-room 호출 시 슬롯만 idle로 변경하고 BossRoom 레코드는
남아있어서 다음 입장 시 unique 제약 위반(Duplicate entry) 발생.
ResetRoom에서 해당 sessionName의 BossRoom 레코드도 함께 삭제.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 23:17:14 +09:00
22e0652ee3 fix: 좀비 슬롯 정리 및 보상 실패 상태 추적
All checks were successful
Server CI/CD / lint-and-build (push) Successful in 1m5s
Server CI/CD / deploy (push) Successful in 58s
- RequestEntry() 시 CheckStaleSlots() 호출하여 좀비 슬롯 자동 정리
- 블록체인 보상 실패 시 BossRoom 상태를 reward_failed로 업데이트
- UpdateRoomStatus() 레포지토리 메서드 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 20:07:34 +09:00
befea9dd68 feat: Swagger API 문서 추가 + 보스레이드/플레이어 레벨 시스템
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 12m3s
Server CI/CD / deploy (push) Has been cancelled
- swaggo/swag 기반 전체 API 엔드포인트 Swagger 어노테이션 (59개)
- /swagger/ 경로에 Swagger UI 제공
- 보스레이드 데디서버 관리 (등록, 하트비트, 슬롯 리셋)
- 플레이어 레벨/경험치 시스템 및 스탯 성장

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 17:51:37 +09:00
423e2832a0 fix: 3차 리뷰 LOW — 에러 메시지 일관성, Redis 타임아웃, 입력 검증
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 30s
Server CI/CD / deploy (push) Has been skipped
- 5개 핸들러 err.Error() → 제네릭 메시지 (Login, Refresh, SSAFY, Ticket, BossRaid)
- Redis context.Background() → WithTimeout 5s (10곳)
- SprintMultiplier 범위 검증 추가
- 방어적 문서화 (SSAFY 충돌, zip bomb, body limit prefix, 로그 주입)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 19:05:17 +09:00
9504bf37de fix: RequestEntry TOCTOU 경쟁 조건 수정 — 트랜잭션으로 원자화
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 38s
Server CI/CD / deploy (push) Has been skipped
중복 입장 방지를 위해 active-room 체크와 room 생성을 단일 트랜잭션으로 래핑

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 18:53:33 +09:00
b0de89a18a feat: 코드 리뷰 기반 전면 개선 — 보안, 검증, 테스트, 안정성
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 47s
Server CI/CD / deploy (push) Has been skipped
- 체인 nonce 경쟁 조건 수정 (operatorMu + per-user mutex)
- 등록/SSAFY 원자적 트랜잭션 (wallet+profile 롤백 보장)
- IdempotencyRequired 미들웨어 (SETNX 원자적 클레임)
- 런치 티켓 API (JWT URL 노출 방지)
- HttpOnly 쿠키 refresh token
- SSAFY OAuth state 파라미터 (CSRF 방지)
- Refresh 시 DB 조회로 최신 role 사용
- 공지사항/유저목록 페이지네이션
- BodyLimit 미들웨어 (1MB, upload 제외)
- 입력 검증 강화 (닉네임, 게임데이터, 공지 길이)
- 에러 메시지 내부 정보 노출 방지
- io.LimitReader (RPC 10MB, SSAFY 1MB)
- RequestID 비출력 문자 제거
- 단위 테스트 (auth 11, announcement 9, bossraid 16)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 18:03:25 +09:00
cc8368dfba feat: 인프라 개선 — 헬스체크, 로깅, 보안, CI 검증
Some checks failed
Server CI/CD / lint-and-build (push) Failing after 1m13s
Server CI/CD / deploy (push) Has been skipped
- /health + /ready 엔드포인트 추가 (DB/Redis 상태 확인)
- RequestID 미들웨어 + 구조화 JSON 로깅
- 체인 트랜잭션 per-user rate limit (20 req/min)
- DB 커넥션 풀 설정 (MaxOpen 25, MaxIdle 10, MaxLifetime 5m)
- Graceful Shutdown 시 Redis/MySQL 연결 정리
- Dockerfile HEALTHCHECK 추가
- CI에 go vet + 빌드 검증 단계 추가 (deploy 전 실행)
- 보스 레이드 클라이언트 입장 API (JWT 인증)
- Player 프로필 모듈 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 03:41:34 +09:00
d597ef2d46 fix: 보안·안정성·동시성 개선 3차
All checks were successful
Server CI/CD / deploy (push) Successful in 1m31s
- 입력 검증 강화 (로그인/체인 핸들러 전체)
- boss raid 비관적 잠금으로 동시성 문제 해결
- SSAFY 사용자명 sanitize + 트랜잭션 처리
- constant-time API 키 비교, 보안 헤더, graceful shutdown
- 안전하지 않은 기본값 경고 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 21:40:06 +09:00
cc751653c4 fix: 코드 리뷰 기반 보안·안정성 개선 2차
All checks were successful
Server CI/CD / deploy (push) Successful in 1m26s
보안:
- RPC 응답 HTTP 상태코드 검증 (chain/client)
- SSAFY OAuth 에러 응답 내부 로깅으로 변경 (제3자 상세 노출 제거)
- resolveUsername에서 username 노출 제거
- LIKE 쿼리 특수문자 이스케이프 (bossraid/repository)
- 파일명 경로 순회 방지 + 길이 제한 (download/handler)
- ServerAuth 실패 로깅 추가

안정성:
- AutoMigrate 에러 시 서버 종료
- GetLatest() 에러 시 nil 반환 (초기화 안 된 포인터 방지)
- 멱등성 캐시 저장 시 새 context 사용
- SSAFY HTTP 클라이언트 타임아웃 10s
- io.ReadAll/rand.Read 에러 처리
- Login에서 DB 에러/Not Found 구분

검증 강화:
- 중복 플레이어 검증 (bossraid/service)
- username 길이 제한 50자 (auth/handler, bossraid/handler)
- 역할 변경 시 세션 무효화
- 지갑 복호화 실패 로깅

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 17:48:05 +09:00
61cf47070d feat: 보스 레이드 방 관리 모듈 추가
All checks were successful
Server CI/CD / deploy (push) Successful in 1m34s
MMO 서버/데디케이트 서버 연동을 위한 내부 API 엔드포인트 구현:
- POST /api/internal/bossraid/entry — 파티 입장 요청 (방 생성)
- POST /api/internal/bossraid/start — 세션 시작 보고
- POST /api/internal/bossraid/complete — 클리어 보고 + TOL Chain 보상 지급
- POST /api/internal/bossraid/fail — 실패 보고
- GET /api/internal/bossraid/room — 방 조회

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 17:14:03 +09:00
23bec776ab fix: 코드 리뷰 기반 보안·안정성 개선 (14건)
All checks were successful
Server CI/CD / deploy (push) Successful in 1m36s
- unsafe 타입 단언 → safe assertion (chain handler 11곳, auth Logout)
- Repository 에러 시 nil 반환으로 통일 (chain, auth, announcement)
- string ID → uint 파싱으로 타입 안전성 확보 (auth, announcement)
- CORS AllowHeaders에 Idempotency-Key, X-API-Key 추가
- /verify 엔드포인트 rate limiter 적용
- Redis 호출에 context timeout 적용 (auth, idempotency 미들웨어)
- chain handler 에러 응답에서 내부 정보 노출 방지
- f.Close() 에러 검사 추가 (download service 2곳)
- 공지사항 Delete 404 응답 추가
- 회원가입 롤백 시 Delete 에러 로깅

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:47:00 +09:00
9738f1a83c fix: SSAFYTokenResponse.expires_in 타입을 int로 수정
All checks were successful
Server CI/CD / deploy (push) Successful in 1m26s
SSAFY 서버가 expires_in을 숫자로 반환하므로 string에서 int로 변경.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 01:21:01 +09:00
0ce39a48b9 feat: SSAFY OAuth 2.0 로그인 구현
All checks were successful
Server CI/CD / deploy (push) Successful in 26s
SSAFY 인증 서버를 통한 소셜 로그인 기능 추가.
인가 코드 교환, 사용자 정보 조회, 자동 회원가입 처리.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:54:22 +09:00
26876ba8ca fix: 보안 강화 및 안정성 개선
All checks were successful
Server CI/CD / deploy (push) Successful in 5s
- fileHash 빈 문자열 시 게임 업로드 거부 (A301.exe 누락 zip 차단)
- Rate limiting 추가: 인증 API 10req/min, 일반 API 60req/min
- 블록체인 트랜잭션 Idempotency-Key 미들웨어 (Redis 캐싱, 10분 TTL)
- 파일 업로드 크기 제한 4GB (BodyLimit)
- Username 대소문자 정규화 (Register/Login에서 소문자 변환)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 11:10:23 +09:00
4843470310 fix: 보안 강화 및 리프레시 토큰 도입
All checks were successful
Server CI/CD / deploy (push) Successful in 7s
- middleware: JWT MapClaims 타입 단언 패닉 → ok 패턴으로 방어
- auth/service: Redis Set 오류 처리, 지갑 생성 실패 시 유저 롤백
- auth/service: EnsureAdmin 지갑 생성 추가, Logout 리프레시 토큰도 삭제
- auth/service: 리프레시 토큰 발급(7일) 및 로테이션, REFRESH_SECRET 분리
- auth/handler: Login 응답에 refreshToken 포함, Refresh 핸들러 추가
- auth/handler: Logout 에러 처리 추가
- download/service: hashGameExeFromZip io.Copy 오류 처리
- download/handler: Content-Disposition mime.FormatMediaType으로 헤더 인젝션 방어
- announcement/handler: Update 빈 body 400 반환
- config: REFRESH_SECRET 환경변수 추가
- routes: POST /api/auth/refresh 엔드포인트 추가
- main: INTERNAL_API_KEY 미설정 시 경고 출력
- .env.example: 누락 환경변수 7개 보완

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 09:51:17 +09:00
f8b23e93bf feat: 블록체인(chain) 통합 및 내부 API 추가
All checks were successful
Server CI/CD / deploy (push) Successful in 7s
- internal/chain 패키지 추가 (client, handler, service, repository, model)
- 체인 연동 엔드포인트: 지갑 조회, 잔액, 자산, 인벤토리, 마켓 등
- 관리자 전용 체인 엔드포인트: 민팅, 보상, 템플릿 등록
- 게임 서버용 내부 API (/api/internal/chain/*) + ServerAuth 미들웨어
- 회원가입 시 블록체인 월렛 자동 생성
- 체인 관련 환경변수 및 InternalAPIKey 설정 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:18:15 +09:00
1b6260ee4e refactor: verify 응답에서 userId 제거
All checks were successful
Server CI/CD / deploy (push) Successful in 37s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 14:14:39 +09:00
d6abac3f0a feat: JWT 검증 엔드포인트 추가 (POST /api/auth/verify)
All checks were successful
Server CI/CD / deploy (push) Successful in 1m17s
게임 서버가 클라이언트로부터 받은 JWT를 웹 서버에 전달하면,
서명 검증 + Redis 세션 확인 후 userId와 username을 응답한다.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 13:13:26 +09:00
f547593c6f feat: launcher.exe와 game.zip 별도 업로드/서빙 분리
All checks were successful
Server CI/CD / deploy (push) Successful in 36s
- POST /api/download/upload/game - 게임 zip 업로드
- POST /api/download/upload/launcher - launcher.exe 업로드
- GET /api/download/launcher - launcher.exe 서빙
- Info 모델에 LauncherURL, LauncherSize 필드 추가
- Content-Disposition 헤더로 올바른 파일명 설정

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 23:34:09 +09:00
18c39bd4c5 feat: 게임 파일 직접 업로드 방식으로 전환
All checks were successful
Server CI/CD / deploy (push) Successful in 35s
- zip 스트리밍 업로드 (StreamRequestBody) → /data/game/game.zip 저장
- A301.exe SHA256 해시 자동 추출 (zip 분석)
- 버전·파일명·크기 파일명 및 용량에서 자동 추출
- GET /api/download/file 엔드포인트 추가
- BASE_URL, GAME_DIR 환경변수 추가
- Dockerfile에 /data/game 디렉토리 생성

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 23:25:07 +09:00
003eb4c1c2 fix: fileHash 필수 조건 제거 (선택 입력으로 변경)
All checks were successful
Server CI/CD / deploy (push) Successful in 35s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 22:34:53 +09:00
8dee6f70b3 feat: 다운로드 정보에 fileHash 필드 추가
All checks were successful
Server CI/CD / deploy (push) Successful in 38s
게임 EXE의 SHA256 해시를 저장하여 런처가 버전 검증에 활용

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 22:22:37 +09:00
3fb182c271 feat: 회원가입 API 추가 (POST /api/auth/register)
All checks were successful
Server CI/CD / deploy (push) Successful in 37s
- Register 서비스 메서드 추가 (중복 아이디 체크, bcrypt 해시, role: user로 생성)
- Register 핸들러 추가 (빈값, 6자 미만 비밀번호 유효성 검사)
- /api/auth/register 라우트 등록 (public)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 15:11:34 +09:00
17983ad775 feat: 유저 관리 API 추가 (목록 조회, 권한 변경, 삭제)
- GET /api/users - 전체 유저 목록 (admin only)
- PATCH /api/users/:id/role - 권한 변경 (admin only)
- DELETE /api/users/:id - 유저 삭제 (admin only)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 14:52:45 +09:00
ec6ac35ac7 refactor: 모델에 JSON 태그 추가 및 gorm.Model 인라인 확장
All checks were successful
Server CI/CD / deploy (push) Successful in 35s
camelCase JSON 필드명으로 통일, PasswordHash json:"-" 처리

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 14:32:11 +09:00
633175f5be feat: 환경변수로 초기 admin 계정 자동 생성
서버 시작 시 ADMIN_USERNAME, ADMIN_PASSWORD 환경변수 기반으로
admin 계정이 없을 경우 자동 생성 (이미 있으면 스킵)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 14:28:33 +09:00
bf17d4d1da fix: username 컬럼 타입을 varchar(100)으로 명시
All checks were successful
Server CI/CD / deploy (push) Successful in 38s
longtext 타입은 MySQL에서 uniqueIndex를 걸 수 없어
AutoMigrate 실패 및 announcements 테이블 미생성 문제 해결

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 14:24:37 +09:00
3345549051 Chore: project init 2026-02-24 13:18:43 +09:00