Skip to content

feat(comment): implement comment board (backend API + admin panel)#6

Open
Menstear wants to merge 14 commits into
mainfrom
feature/5-comment-board
Open

feat(comment): implement comment board (backend API + admin panel)#6
Menstear wants to merge 14 commits into
mainfrom
feature/5-comment-board

Conversation

@Menstear
Copy link
Copy Markdown

backoffice PR


feat(comment): 코멘트 게시판 기능 구현 (#5)

개요

웹사이트 방문자가 코멘트를 남기고, 관리자가 검토 후 공개 여부를 결정하는 게시판 기능을 구현했습니다.

변경 사항

백엔드

모델

  • Commentcontent, author, status(pending/approved/rejected), timestamps
  • AuditLog — 관리자 액션 감사 로그 (actorUserId: Mixed — local/OAuth 계정 모두 호환)

공개 API

  • POST /comments — 코멘트 등록 (rate limit: IP당 분당 5회)
  • GET /comments — 승인된 코멘트 목록 (페이지네이션)

관리자 API (isLoggedIn 미들웨어 적용)

  • GET /bo/admin/comments — 전체 목록 (상태 필터)
  • PATCH /bo/admin/comments/:id/approve — 승인 (멱등 처리)
  • PATCH /bo/admin/comments/:id/reject — 거절 (멱등 처리)
  • DELETE /bo/admin/comments/:id — 삭제

보안

  • 허니팟 hidden 필드로 봇 필터링
  • page 파라미터 DoS 상한 적용 (최대 500)
  • CORS origin 문자열 → 배열로 수정, 프로덕션에 DELETE 메서드 추가
  • app.enable("trust proxy")app.set("trust proxy", 1) 변경 (nginx 한 단계만 신뢰)

패키지 추가: express-rate-limit, cors

프론트엔드

  • comment_api.jsx 추가 (fetchComments / approveComment / rejectComment / deleteComment)
  • 기존 별도 페이지(/commentAdmin)를 recruitDB오버레이 패널로 통합
    • 상태 탭 필터 (대기 / 승인 / 거절 / 전체)
    • 테이블 + 페이지네이션
    • ESC 키로 패널 닫기, 패널 열림 중 테이블 키보드 이벤트 차단
  • commentAdmin.jsx, commentAdmin.css 삭제 (기능 통합으로 불필요)

i2na and others added 14 commits March 15, 2026 03:35
refactor(backend): migrate MySQL/Sequelize to MongoDB for Render
Add MongoDB-backed ActivityType and ActivityItem models. Add backoffice CRUD and reorder APIs for activity CMS. Register MongoDB connection, Swagger docs, and standalone backoffice docker compose.

Refs #3
fix(backend): resolve unable to access recruit page
백엔드
- Comment 모델 추가 (content, author, status: pending/approved/rejected)
- AuditLog 모델 추가 (관리자 액션 감사 로그, actorUserId: Mixed 타입)
- AuditLogService 추가
- 공개 API: POST /comments (등록), GET /comments (승인된 목록 페이지네이션)
- 관리자 API: GET/PATCH(approve/reject)/DELETE /bo/admin/comments
- 보안: 허니팟 필드, rate limit (IP당 분당 5회), page 파라미터 DoS 상한(500)
- CORS: 개발/프로덕션 origin 배열로 수정, 프로덕션에 DELETE 메서드 추가
- trust proxy: app.enable → app.set('trust proxy', 1) 로 변경
- express-rate-limit, cors 패키지 추가

프론트엔드
- comment_api.jsx 추가 (fetchComments, approveComment, rejectComment, deleteComment)
- commentAdmin 기능을 recruitDB 내 오버레이 패널로 통합 (별도 라우트 제거)
- 코멘트 관리 패널: 상태 탭 필터, 테이블, 페이지네이션, ESC 키 닫기
- recruitDB.css에 다크 테마 패널 스타일 추가
@Menstear Menstear requested a review from i2na as a code owner May 18, 2026 11:50
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

Deployment failed with the following error:

There is no GitHub account connected to this Vercel account.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
backoffice-dev Ready Ready Preview, Comment May 18, 2026 11:50am

@Menstear Menstear changed the title feat(comment): 코멘트 게시판 구현 (백엔드 API + 관리자 패널) feat(comment): implement comment board (backend API + admin panel) May 18, 2026
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.

3 participants