Skip to content

SWYP-mingling/Backend

Repository files navigation

🀝 Mingling Backend

πŸš€ Mingling λ°”λ‘œκ°€κΈ°

Mingling은 약속 및 λͺ¨μž„ μ°Έμ—¬μžλ“€μ˜ μΆœλ°œμ—­μ„ 기반으둜 졜적의 쀑간 지점을 μΆ”μ²œν•˜κ³ , λͺ¨μž„ λͺ©μ μ— λ§žλŠ” μž₯μ†Œλ₯Ό 탐색할 수 μžˆλ„λ‘ μ§€μ›ν•˜λŠ” μ›Ήμ‚¬μ΄νŠΈμž…λ‹ˆλ‹€.


✨ Features

κΈ°λŠ₯ ν™”λ©΄
λͺ¨μž„ 생성
λͺ¨μž„ μ°Έμ—¬
μΆœλ°œμ§€ 등둝
쀑간지점 결과보기
μž₯μ†Œ μΆ”μ²œ

πŸ›  Tech Stack

Language

Java

Framework

Spring Boot

Database

MariaDB

Documentation

Swagger


πŸ–₯ Architecture

Image

πŸ“Š Entity Relationship Diagram (ERD)

Image

πŸš€ API Specification

πŸ“¦ Common Response Format

λͺ¨λ“  API 응닡은 μ•„λž˜μ˜ 곡톡 κ·œκ²©μ„ λ”°λ¦…λ‹ˆλ‹€.

βœ… Success Response

{
  "success": true,
  "data": {
    "items": [],
    "page": 1
  },
  "timestamp": "2026-03-06T14:00:00Z"
}

❌ Failure Response

{
  "success": false,
  "code": "INVALID_TOKEN",
  "message": "토큰이 μœ νš¨ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.",
  "data": null,
  "timestamp": "2026-03-06T14:00:00Z"
}

🌿 Branch Strategy

브랜치 생성 μ‹œ μ•„λž˜ κ·œμΉ™μ„ μ€€μˆ˜ν•˜λ©°, μž‘μ—… λ‹¨μœ„λ³„λ‘œ λͺ…ν™•νžˆ λΆ„λ¦¬ν•©λ‹ˆλ‹€.

Format: <type>/<jira-issue-number>-<short-description>

Type Description Example
feature μ‹ κ·œ κΈ°λŠ₯ 개발 feature/SW-10-jwt-refresh-token
fix 버그 μˆ˜μ • fix/SW-21-user-profile-error
refactor μ½”λ“œ λ¦¬νŒ©ν† λ§ refactor/SW-35-order-validation
chore μ„€μ •, ν™˜κ²½ 및 기타 μž‘μ—… chore/SW-01-setup-gradle

πŸ’¬ Commit Message Convention

AngularJS Git Commit Convention을 λ”°λ₯΄λ©°, subjectλŠ” ν•œκ΅­μ–΄λ‘œ λͺ…ν™•ν•˜κ²Œ μž‘μ„±ν•©λ‹ˆλ‹€.

Format: [issue-number] <type>: <subject>

  • feat: μƒˆλ‘œμš΄ κΈ°λŠ₯ μΆ”κ°€
  • fix: 버그 μˆ˜μ •
  • docs: λ¬Έμ„œ μˆ˜μ • (README, Swagger λ“±)
  • style: μ½”λ“œ ν¬λ§·νŒ… (둜직 λ³€κ²½ μ—†μŒ)
  • refactor: μ½”λ“œ λ¦¬νŒ©ν† λ§
  • test: ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€ 및 μˆ˜μ •
  • chore: λΉŒλ“œ 업무, νŒ¨ν‚€μ§€ μ„€μ • λ“±

πŸ’‘ Example: [SW-94] fix: μž₯μ†Œ μΆ”μ²œ API λŸ°νƒ€μž„ 였λ₯˜ μˆ˜μ •


🌐 Deployment

πŸ— Service Architecture

전체적인 μ‹œμŠ€ν…œ κ΅¬μ‘°λŠ” Nginxλ₯Ό λ¦¬λ²„μŠ€ ν”„λ‘μ‹œλ‘œ ν™œμš©ν•˜λ©°, μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ„œλ²„μ™€ λ°μ΄ν„°λ² μ΄μŠ€ λͺ¨λ‘ Docker μ»¨ν…Œμ΄λ„ˆλ‘œ 독립 μš΄μ˜λ©λ‹ˆλ‹€. μ„œλΉ„μŠ€μ˜ μ•ˆμ •μ μΈ μš΄μ˜μ„ μœ„ν•΄ 둜그 λ°μ΄ν„°λŠ” 호슀트 μ„œλ²„μ™€ λ³Όλ₯¨ 마운트λ₯Ό 톡해 영ꡬ λ³΄κ΄€λ©λ‹ˆλ‹€.

  • Web Server: Nginx (Reverse Proxy)
  • Application Server: Docker Containers (Spring Boot 3.x)
  • Database: Docker Container (MariaDB 10.11+)
  • Log Management: Host-Container Volume Mapping (/logs)

πŸ’» Infrastructure Detail

Infrastructure Detail
Cloud NCP (Naver Cloud Platform)
Instance Micro Server (Ubuntu 22.04 LTS)
Database MariaDB 10.11 (Dockerized)
Container Docker, Docker-compose

πŸš€ CI/CD Pipeline

GitHub Actions와 NCP Container Registryλ₯Ό μ—°λ™ν•˜μ—¬ 배포 μžλ™ν™”λ₯Ό κ΅¬μΆ•ν–ˆμŠ΅λ‹ˆλ‹€.

  1. GitHub Actions: main λΈŒλžœμΉ˜μ— μ½”λ“œ Push μ‹œ λΉŒλ“œ 및 ν…ŒμŠ€νŠΈ μžλ™ μˆ˜ν–‰
  2. NCP Container Registry (NCR): λΉŒλ“œλœ 이미지λ₯Ό NCP μ „μš© μ»¨ν…Œμ΄λ„ˆ μ €μž₯μ†Œμ— Push 및 관리
  3. Deployment Flow:
    • GitHub Actionsμ—μ„œ ν”„λ‘œμ νŠΈ λΉŒλ“œ (Gradle)
    • Docker 이미지 생성 ν›„ NCP Container Registry둜 Push
    • λŒ€μƒ μ„œλ²„μ— SSH 접속 ν›„ μ΅œμ‹  이미지 pull 및 docker-compose μž¬μ‹€ν–‰

πŸ’Ύ Log Management

μ»¨ν…Œμ΄λ„ˆ 재배포 μ‹œμ—λ„ 과거의 μ—λŸ¬ 기둝을 λ³΄μ‘΄ν•˜κΈ° μœ„ν•΄ 호슀트 μ„œλ²„μ˜ 파일 μ‹œμŠ€ν…œκ³Ό λ™κΈ°ν™”ν•˜μ—¬ κ΄€λ¦¬ν•©λ‹ˆλ‹€.

  • 둜그 보관 경둜: /home/ncp-user/mingling-logs (Host) ↔ /logs (Container)
  • 둜그 파일 ꡬ성:
    • error.log: λͺ¨λ“  ERROR 레벨 둜그 기둝 (μ„œλΉ„μŠ€ μž₯μ•  μΆ”μ μš©)
    • warn.log: WARN 이상 레벨 둜그 기둝 (잠재적 문제 λͺ¨λ‹ˆν„°λ§μš©)
  • λͺ¨λ‹ˆν„°λ§: μ„œλ²„ ν„°λ―Έλ„μ—μ„œ tail -f λͺ…λ Ήμ–΄λ₯Ό 톡해 μ‹€μ‹œκ°„μœΌλ‘œ μ‹œμŠ€ν…œ μƒνƒœλ₯Ό 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.

πŸ“„ API Documentation

μƒμ„Έν•œ API λͺ…μ„Έ 및 ν…ŒμŠ€νŠΈλŠ” μ•„λž˜ Swagger UI 링크λ₯Ό μ°Έμ‘°ν•˜μ„Έμš”. πŸ‘‰ Mingling Swagger UI λ°”λ‘œκ°€κΈ°

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors