Skip to content

🌟 Treat Well Planner: A Spring Boot-based application to manage schedules, recurring tasks, and indefinite plans efficiently with customizable recurrence rules.

License

Notifications You must be signed in to change notification settings

keepConcentration/treat-well-planner-backend

Repository files navigation

🌏 Treat Well Planner

πŸ“– ν”„λ‘œμ νŠΈ μ†Œκ°œ

Treat Well PlannerλŠ” μ‚¬μš©μžκ°€ 일정 및 κ³„νšμ„ μƒμ„±ν•˜κ³ , 반볡 κ·œμΉ™μ„ 톡해 주기적인 이벀트λ₯Ό 관리할 수 μžˆλŠ” Spring Boot 기반 μ–΄ν”Œλ¦¬μΌ€μ΄μ…˜μž…λ‹ˆλ‹€.
μ‚¬μš©μžλŠ” μ‹œμž‘μΌ(startDate)κ³Ό μ’…λ£ŒμΌ(endDate)을 μ„€μ •ν•˜μ—¬ 일정을 관리할 수 있으며, λ¬΄κΈ°ν•œ 일정과 νŠΉμ • 반볡 κ·œμΉ™(RecurrenceRule)을 ν™œμš©ν•œ λ‹€μ–‘ν•œ κ³„νšμ„ μ§€μ›ν•©λ‹ˆλ‹€.


🚧 ν”„λ‘œμ νŠΈ μƒνƒœ

ν˜„μž¬ Treat Well PlannerλŠ” 개발 진행 쀑인 ν”„λ‘œμ νŠΈλ‘œ, 정식 μ„œλΉ„μŠ€λŠ” 아직 μ˜€ν”ˆλ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.
1μ°¨ λͺ©ν‘œλŠ” μ£Όμš” κΈ°λŠ₯ MVP(Minimum Viable Product) κ°œλ°œμ„ μ™„λ£Œν•˜κ³  ν…ŒμŠ€νŠΈ ν™˜κ²½μ—μ„œμ˜ μ•ˆμ •μ„±μ„ κ²€μ¦ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€. 정식 배포 및 μ˜€ν”ˆ 일정은 μΆ”ν›„ 곡지될 μ˜ˆμ •μž…λ‹ˆλ‹€.


✨ μ£Όμš” κΈ°λŠ₯

  • πŸ—“οΈ 일정 관리: 일정 생성, μˆ˜μ •, μ‚­μ œ
  • πŸ” 반볡 κ·œμΉ™ 관리:
    • 주기적인 일정(예: 맀주, 맀월)
    • νŠΉμ • μš”μΌ, 월별 λ‚ μ§œ, μ—°κ°„ 반볡 κ·œμΉ™ μ„€μ •
  • 🌟 λ¬΄κΈ°ν•œ 일정 지원: μ’…λ£ŒμΌ(endDate) 없이 μ§€μ†λ˜λŠ” 일정 생성
  • πŸ” 일정 검색 및 쑰회:
    • νŠΉμ • λ‚ μ§œκ°€ ν¬ν•¨λœ 일정 검색
    • λ¬΄κΈ°ν•œ 일정 및 반볡 일정 계산

πŸ› οΈ 기술 μŠ€νƒ

πŸ“¦ λ°±μ—”λ“œ

  • πŸ–₯️ Java 17: μ•ˆμ •μ„±κ³Ό μ„±λŠ₯을 높이기 μœ„ν•œ μ΅œμ‹  LTS 버전 μ‚¬μš©
  • 🌿 Spring Boot: κ°•λ ₯ν•œ REST API 및 μ• ν”Œλ¦¬μΌ€μ΄μ…˜ 개발 ν”„λ ˆμž„μ›Œν¬
  • 🌐 Swagger: API λ¬Έμ„œν™” 및 ν…ŒμŠ€νŠΈλ₯Ό μœ„ν•œ UI 제곡
  • 🌿 Spring Data JPA: λ°μ΄ν„°λ² μ΄μŠ€μ™€μ˜ κ°„λ‹¨ν•˜κ³  효율적인 μƒν˜Έμž‘μš©
  • βš™οΈ Gradle: λΉŒλ“œ 및 μ˜μ‘΄μ„± 관리λ₯Ό μœ„ν•œ 도ꡬ
  • πŸ“ƒ Lombok: μ½”λ“œ κ°„μ†Œν™” (Getter, Setter, Builder λ“± μžλ™ 생성)
  • πŸ—„οΈ H2 Database: ν…ŒμŠ€νŠΈ ν™˜κ²½μš© 인메λͺ¨λ¦¬ λ°μ΄ν„°λ² μ΄μŠ€
    • (μ‹€μ œ μš΄μ˜μ—μ„œλŠ” λ‹€λ₯Έ λ°μ΄ν„°λ² μ΄μŠ€λ‘œ λ³€κ²½ κ°€λŠ₯)

πŸš€ μ„€μΉ˜ 및 μ‹€ν–‰

1. μ‹œμŠ€ν…œ μš”κ΅¬μ‚¬ν•­

  • β˜• Java 17 이상
  • 🐘 Gradle 7.x 이상

2. ν”„λ‘œμ νŠΈ 클둠

git clone https://github.com/keepConcentration/treat-well-planner.git  
cd treat-well-planner  

3. μ• ν”Œλ¦¬μΌ€μ΄μ…˜ λΉŒλ“œ

Gradle을 μ‚¬μš©ν•΄ ν”„λ‘œμ νŠΈλ₯Ό λΉŒλ“œν•©λ‹ˆλ‹€:

# μ˜μ‘΄μ„± μ„€μΉ˜ 및 λΉŒλ“œ  
./gradlew build  

4. μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ‹€ν–‰

Gradle둜 μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μ‹€ν–‰:

./gradlew bootRun  
  • 기본적으둜 http://localhost:8080μ—μ„œ μ„œλ²„κ°€ μ‹€ν–‰λ©λ‹ˆλ‹€.
  • Swagger API λ¬Έμ„œλ₯Ό ν™•μΈν•˜λ €λ©΄ λ‹€μŒ 링크λ₯Ό λ°©λ¬Έν•˜μ„Έμš”:
    πŸ‘‰ http://localhost:8080/swagger-ui.html

🎯 Swagger μ„€μ •

이 ν”„λ‘œμ νŠΈλŠ” Swaggerλ₯Ό μ‚¬μš©ν•˜μ—¬ μΌκ΄€λœ API λ¬Έμ„œλ₯Ό μ œκ³΅ν•©λ‹ˆλ‹€. SwaggerλŠ” API λ¬Έμ„œλ₯Ό μžλ™μœΌλ‘œ μƒμ„±ν•˜λ©°, μ‚¬μš©μž μΉœν™”μ μΈ UIλ₯Ό 톡해 ν…ŒμŠ€νŠΈν•  수 μžˆμŠ΅λ‹ˆλ‹€.

Swagger κ΄€λ ¨ μ˜μ‘΄μ„± (Gradle)

build.gradle νŒŒμΌμ— μ•„λž˜ μ˜μ‘΄μ„±μ„ μΆ”κ°€ν•©λ‹ˆλ‹€.

dependencies {  
    implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'  
}  

API λ¬Έμ„œν™”λŠ” 기본적으둜 /swagger-ui.html κ²½λ‘œμ—μ„œ μ•‘μ„ΈμŠ€ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ„€μ • 값은 application.ymlμ—μ„œ μˆ˜μ •ν•  수 μžˆμŠ΅λ‹ˆλ‹€.


🧩 도메인 섀계

1. Plan (일정)

μ£Όμš” 엔터티이며, μΌμ •μ˜ κΈ°λ³Έ 정보λ₯Ό κ΄€λ¦¬ν•©λ‹ˆλ‹€.

πŸ“‘ ν•„λ“œ μ„€λͺ…
id UUID 기반 고유 μ‹λ³„μž
title 일정 제λͺ©
description 일정 μ„€λͺ…
startDate μ‹œμž‘ λ‚ μ§œ
endDate μ’…λ£Œ λ‚ μ§œ (nullable)
recurrenceRule μΌμ •μ˜ 반볡 κ·œμΉ™ (Optional)

2. RecurrenceRule (반볡 κ·œμΉ™)

μΌμ •μ˜ 반볡 논리λ₯Ό μ •μ˜ν•©λ‹ˆλ‹€.

πŸ“‘ ν•„λ“œ μ„€λͺ…
id UUID 기반 고유 μ‹λ³„μž
startDate 반볡 μ‹œμž‘ λ‚ μ§œ
endDate 반볡 μ’…λ£Œ λ‚ μ§œ (nullable)
interval 반볡 간격 (days, weeks λ“±)
daysOfWeek νŠΉμ • μš”μΌ 지정 (Optional)
daysOfMonth νŠΉμ • λ‚ μ§œ 지정 (Optional)

πŸ”— API μ‚¬μš© 방법

Treat Well Planner μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ μ£Όμš” APIλ₯Ό λ‚˜μ—΄ν•©λ‹ˆλ‹€.

1. 일정 생성

POST /plans

{
  "title": "Workout Plan",
  "description": "Daily running schedule",
  "startDate": "2023-11-01",
  "endDate": null, // λ¬΄κΈ°ν•œμΌ 경우 null
  "recurrenceRule": {
    "startDate": "2023-11-01",
    "interval": 1
  }
}

2. 일정 쑰회

GET /plans?date=2023-11-01

3. 반볡 κ·œμΉ™ μΆ”κ°€

POST /plans/{planId}/recurrence-rule

{
  "startDate": "2023-11-01",
  "endDate": "2023-12-31",
  "interval": 7
}

더 λ§Žμ€ API μ •λ³΄λŠ” πŸ‘‰ Swagger UI μ—μ„œ ν™•μΈν•˜μ‹€ 수 μžˆμŠ΅λ‹ˆλ‹€.


πŸ§ͺ ν…ŒμŠ€νŠΈ

1. λ‹¨μœ„ ν…ŒμŠ€νŠΈ

test 디렉토리 λ‚΄μ—μ„œ λ‹¨μœ„ ν…ŒμŠ€νŠΈλ₯Ό μ‹€ν–‰ν•©λ‹ˆλ‹€:

./gradlew test  

πŸ“ μ£Όμš” 파일 ꡬ쑰

src/  
β”œβ”€β”€ main/  
β”‚   β”œβ”€β”€ java/com/treat/well/planner/  
β”‚   β”‚   β”œβ”€β”€ global/ (κΈ€λ‘œλ²Œ 이벀트 μ •μ˜)  
β”‚   β”‚   β”œβ”€β”€ plan/  
β”‚   β”‚   β”‚   β”œβ”€β”€ domain/            # Plan, RecurrenceRule μ—”ν‹°ν‹°  
β”‚   β”‚   β”‚   β”œβ”€β”€ service/           # λΉ„μ¦ˆλ‹ˆμŠ€ 둜직  
β”‚   β”‚   β”‚   β”œβ”€β”€ repository/        # Spring Data JPA Repository  
β”‚   β”œβ”€β”€ resources/  
β”‚       β”œβ”€β”€ application.yml        # Spring Boot μ„€μ •  
β”‚       β”œβ”€β”€ data.sql               # μƒ˜ν”Œ 데이터  
β”œβ”€β”€ test/  
    β”œβ”€β”€ java/com/treat/well/planner/  
        β”œβ”€β”€ plan/                  # Plan κ΄€λ ¨ λ‹¨μœ„ ν…ŒμŠ€νŠΈ  

πŸ› οΈ ν–₯ν›„ κ³„νš

  • πŸ—“οΈ μΆ”κ°€ API 제곡:
    • νŠΉμ • μ£Ό λ‹¨μœ„ 반볡, μ—°κ°„ 반볡 일정 지원
  • πŸ” μ‚¬μš©μž 인증 및 κΆŒν•œ 관리 κ΅¬ν˜„
  • 🌍 κ΅­μ œν™”(i18n) 및 λ‹€κ΅­μ–΄ 지원
  • 🎨 ν”„λ‘ νŠΈμ—”λ“œ 톡합 개발 (React 및 Vue.js κ³ λ €)

🀝 κΈ°μ—¬ 방법

Treat Well PlannerλŠ” μ˜€ν”ˆ μ†ŒμŠ€ ν”„λ‘œμ νŠΈλ‘œ ν˜‘μ—…μ„ ν™˜μ˜ν•©λ‹ˆλ‹€!

  1. 리포지토리λ₯Ό ν¬ν¬ν•©λ‹ˆλ‹€.
  2. μƒˆλ‘œμš΄ 브랜치λ₯Ό μƒμ„±ν•©λ‹ˆλ‹€: git checkout -b feature/my-feature
  3. μ½”λ“œλ₯Ό μ»€λ°‹ν•©λ‹ˆλ‹€: git commit -m 'Add new feature'
  4. 브랜치λ₯Ό ν‘Έμ‹œν•©λ‹ˆλ‹€: git push origin feature/my-feature
  5. πŸ› οΈ ν’€ λ¦¬ν€˜μŠ€νŠΈλ₯Ό μ œμΆœν•©λ‹ˆλ‹€.

πŸ“œ λΌμ΄μ„ μŠ€

이 ν”„λ‘œμ νŠΈλŠ” MIT λΌμ΄μ„ μŠ€λ₯Ό λ”°λ¦…λ‹ˆλ‹€.


About

🌟 Treat Well Planner: A Spring Boot-based application to manage schedules, recurring tasks, and indefinite plans efficiently with customizable recurrence rules.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published