Skip to content

Conversation

@daydream-03
Copy link
Collaborator

Description

기술면접 질문 게시판을 구현했습니다.

Changes

기반 구조: Question, Answer, Tag, QuestionTag, Category 엔티티 및 DTO/Repository 계층 추가
서비스 로직: 질문 페이징/필터(카테고리/키워드/태그), 사용자별 isSolved 계산, 답변 업서트 처리
API 엔드포인트: REST API를 통한 질문 목록/상세, 답변 생성/업서트 제공
보안: JWT 필터 리팩토링(로그인 경로 화이트리스트, Bearer 상수화, early return)

Technical Details

  • Entities
    • Question, Answer, Tag(+ N:N QuestionTag), Category enum
  • DTO Classes
    • 요청: AnswerRequest { content }
    • 응답: QuestionListResponse { id, content, category, tags, isSolved, createdAt }
    • 응답: QuestionDetailResponse { ..., myAnswer? { id, content, createdAt, updatedAt } }
    • 응답: AnswerResponse { id, content, createdAt, updatedAt }
  • Repository
    • QuestionRepository: findByCategory, findByKeyword, findByTags, findByIsSolved
    • AnswerRepository: findByUserIdAndQuestionId
    • TagRepository
  • Service
    • QuestionService: 페이징/필터 분기, 현재 사용자 기준 isSolved/myAnswer 매핑
    • AnswerService: 동일 사용자·질문 존재 시 업데이트, 없으면 생성(업서트)
  • Controller / API
    • GET /api/v1/questions
      • 쿼리: page, size, sort, category, keyword, tags(복수)
      • 반환: Page
  • 필터 종류: category, keyword, tags, isSolved
    • 쿼리 파라미터로 구현(현재는 1개의 필터만 적용가능)
    • GET /api/v1/questions/{id}
      • 반환: QuestionDetailResponse(사용자 myAnswer 포함 가능)
    • POST /api/v1/questions/{questionId}
      • 바디: AnswerRequest
      • 반환: AnswerResponse(업서트)
  • Security
    • JwtAuthenticationFilter: /api/v1/users/login만 익명 통과, 그 외 Authorization: Bearer 필요

Testing

  • Postman을 통한 API 테스트 완료
  • 회원가입 및 로그인 기능 정상 동작 확인
  • MySQL 데이터베이스에 사용자 정보 정상 저장 확인

Checklist

  • 질문 목록/상세 API 구현
  • 답변 업서트 API 구현
  • DTO 매핑 및 페이징/필터 적용
  • JWT 필터 동작(로그인 경로 제외)
  • 예외/검증 처리 기본 적용
  • Docker Compose 기준 로컬 테스트

🔗 Related Issues

Closes #2

daydream-03 and others added 30 commits July 23, 2025 23:27
@daydream-03 daydream-03 force-pushed the feature/2-tech-questions-dashboard branch 26 times, most recently from 4b6c5d7 to c0f0f2b Compare September 25, 2025 08:48
@daydream-03 daydream-03 closed this Oct 8, 2025
@daydream-03 daydream-03 force-pushed the feature/2-tech-questions-dashboard branch from c0f0f2b to 46e8334 Compare October 8, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants