Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
fd3df90
feat: 피드백 작성 api 구현 (#24)
Kohseoyoung Jul 20, 2026
8052221
Merge branch 'develop' of https://github.com/SLAT-TO/SLATE-TO-BE into…
Kohseoyoung Jul 22, 2026
5291f61
feat: 피드백 생성 api 타임코드/작성자 응답 수정 (#24)
Kohseoyoung Jul 22, 2026
6039fdf
feat: 피드백 수정 api 구현 (#24)
Kohseoyoung Jul 22, 2026
8254a1a
feat: 피드백 삭제 api 구현 (#24)
Kohseoyoung Jul 22, 2026
d2bb705
fix: BaseEntity updated_at 컬럼 nullable = false 추가
sangwon02 Jul 22, 2026
d8423b3
feat: 알림 목록 조회 모델 추가
guingguing Jul 22, 2026
5120f88
feat: 알림 설정 엔티티 및 가입 시 자동 생성
sangwon02 Jul 22, 2026
923c89d
feat: 알림 설정 조회/변경 API 구현
sangwon02 Jul 22, 2026
fde77fa
feat: 알림 목록 조회 API 구현
guingguing Jul 22, 2026
03cb0d1
feat: 프로필 수정 API 구현
sangwon02 Jul 22, 2026
8baef92
feat: 공개 프로필 조회 API 구현
sangwon02 Jul 22, 2026
c6c2950
fix: 알림 설정 지연 생성 동시성 처리
sangwon02 Jul 22, 2026
315ca83
feat: 피드백 목록 조회 api 구현 (#24)
Kohseoyoung Jul 22, 2026
d295921
refactor: 피드백 작성자 조회를 위한 연관관계 매핑 전환 (#24)
Kohseoyoung Jul 22, 2026
a833792
refactor: 프로젝트 파일 도메인 모델 정리
chazy-d Jul 22, 2026
16dfd0f
feat: S3 파일 저장 설정 추가
chazy-d Jul 22, 2026
8dba980
feat: 프로젝트 파일 요청 및 조회 구조 추가
chazy-d Jul 22, 2026
c595a17
feat: 프로젝트 파일 업로드 API 구현
chazy-d Jul 22, 2026
49d3203
feat: 피드백 해결 상태 변경 api 구현 (#24)
Kohseoyoung Jul 22, 2026
c7841bf
feat: 프로젝트 파일 관리 API 구현
chazy-d Jul 22, 2026
e4e788f
feat: 프로젝트 파일 다운로드 API 구현
chazy-d Jul 22, 2026
2a7cc6c
feat: 답글 작성 api 구현 (#24)
Kohseoyoung Jul 22, 2026
95522d9
feat: S3 연동 (#54)
young0206 Jul 22, 2026
ffff99c
fix: 코드 리뷰 수정 (#54)
young0206 Jul 22, 2026
6ad6227
fix: 알림 목록 조회 사용자 식별 방식 수정
guingguing Jul 22, 2026
e80bbc6
fix: 알림 목록 조회 커서 검증 수정
guingguing Jul 22, 2026
98a16be
Merge pull request #47 from SLAT-TO/feature/30-mypage
sangwon02 Jul 23, 2026
2dcb208
feat: 포트폴리오 엔티티 및 enum 정비
sangwon02 Jul 23, 2026
fdd5c79
feat: 포트폴리오 생성 API 구현
sangwon02 Jul 23, 2026
54f9f60
feat: 포트폴리오 조회 API 구현
sangwon02 Jul 23, 2026
b2e77c4
feat: 포트폴리오 수정/삭제 API 구현
sangwon02 Jul 23, 2026
624442a
fix: 포트폴리오 썸네일 URL을 hqdefault로 변경 및 미사용 메서드 제거
sangwon02 Jul 23, 2026
098627f
feat: 답글 목록 조회 API 구현 (#24)
Kohseoyoung Jul 23, 2026
56bb44f
feat: 답글 수정 api 구현 (#24)
Kohseoyoung Jul 23, 2026
88af257
feat: 답글 삭제 api 구현 (#24)
Kohseoyoung Jul 23, 2026
70c3246
fix: 연관 테이블만 교체하는 수정에서 updatedAt이 갱신되지 않는 문제 해결
sangwon02 Jul 23, 2026
560896b
Merge pull request #55 from SLAT-TO/feature/infra-s3
young0206 Jul 23, 2026
9c2c734
Merge pull request #50 from SLAT-TO/feature/43-notification-list-api
guingguing Jul 23, 2026
8662969
feat: 알림 읽음 처리 도메인 메서드 추가
guingguing Jul 23, 2026
c051031
feat: 알림 읽음 처리 조회 메서드 추가
guingguing Jul 23, 2026
b37a2b8
feat: 알림 읽음 처리 로직 구현
guingguing Jul 23, 2026
3ac6501
feat: 알림 단건 읽음 처리 API 구현
guingguing Jul 23, 2026
3c900b3
feat: 알림 전체 읽음 처리 API 구현
guingguing Jul 23, 2026
8550121
merge: develop 브랜치 반영
chazy-d Jul 23, 2026
d1410af
fix: S3 테스트 설정 보정
chazy-d Jul 23, 2026
45fd04b
feat: 답글 해결 상태 변경 api 구현 (#24)
Kohseoyoung Jul 23, 2026
be591eb
feat: 피드백 목록 조회에 답글 개수 추가 (#24)
Kohseoyoung Jul 23, 2026
bc50aaa
fix: s3 버킷 환경변수 추가 (#62)
young0206 Jul 23, 2026
2bdee86
Merge pull request #63 from SLAT-TO/fix/62-dev-cd
young0206 Jul 23, 2026
1444c04
Merge remote-tracking branch 'origin/develop' into feature/project-fi…
chazy-d Jul 23, 2026
aebefe8
fix: 인증 사용자 정보 사용 수정 (#64)
young0206 Jul 23, 2026
c190320
feat: 프로젝트 목록 카드 응답 필드 추가
chazy-d Jul 23, 2026
7e865d0
feat: 프로젝트 고정 도메인 추가
chazy-d Jul 23, 2026
b2af9f2
feat: 프로젝트 고정 API 추가
chazy-d Jul 23, 2026
fa34850
feat: 프로젝트 파일 고정 API 추가
chazy-d Jul 23, 2026
2436296
feat: 프로젝트 공지 읽음 상태 추가
chazy-d Jul 23, 2026
c768ff1
feat: 프로젝트 공지 읽음 처리 API 추가
chazy-d Jul 23, 2026
6619dd8
fix: 코드리뷰 반영 - 상태 변경 권한 및 타임코드 검증 (#24)
Kohseoyoung Jul 24, 2026
441f623
Merge pull request #57 from SLAT-TO/feature/48-portfolio
sangwon02 Jul 24, 2026
c1a0dbc
fix: 피드백 작성자 XOR 검증 추가 (#24)
Kohseoyoung Jul 24, 2026
5caf6aa
fix: 피드백/답글 작성자 XOR 검증 추가 (#24)
Kohseoyoung Jul 24, 2026
efafc2c
Merge pull request #60 from SLAT-TO/feature/24-review-api
Kohseoyoung Jul 24, 2026
8e71df4
Merge pull request #65 from SLAT-TO/refactor/64-video
young0206 Jul 24, 2026
8fe497e
refactor: 프로젝트 권한 응답 필드 정리
chazy-d Jul 24, 2026
839adbd
fix: 고정 항목 커서 페이지네이션 보정
chazy-d Jul 24, 2026
3e5d840
feat: 공유 링크 생성 api 구현 (#61)
Kohseoyoung Jul 24, 2026
6987501
Merge remote-tracking branch 'origin/develop' into feature/project-fi…
chazy-d Jul 24, 2026
83c1aa4
feat: 영상 북마크 api 구현 (#66)
young0206 Jul 24, 2026
2bd593f
fix: 파일 업로드 multipart 제한 설정
chazy-d Jul 24, 2026
09440a4
fix: 파일 업로드 롤백 시 S3 객체 정리
chazy-d Jul 24, 2026
a0305c3
feat: 영상 상세 조회 api 구현 (#66)
young0206 Jul 24, 2026
0321cb4
fix: 코드 리뷰 수정 (#66)
young0206 Jul 24, 2026
3e4ddf5
feat: 영상 참조 파일 요청 및 응답 DTO 추가
chazy-d Jul 24, 2026
a14b354
feat: 영상 참조 파일 도메인 메서드 추가
chazy-d Jul 24, 2026
3910d2a
feat: 영상 참조 파일 조회 쿼리 추가
chazy-d Jul 24, 2026
3a05ba4
feat: 영상 참조 파일 연결 서비스 구현
chazy-d Jul 24, 2026
d6c9c74
feat: 영상 참조 파일 목록 및 제거 서비스 구현
chazy-d Jul 25, 2026
b17f743
feat: 영상 참조 파일 API 엔드포인트 추가
chazy-d Jul 25, 2026
e42a711
Merge pull request #68 from SLAT-TO/feature/66-video-api
young0206 Jul 25, 2026
10662bc
Merge pull request #67 from SLAT-TO/feature/project-file-s3-api
chazy-d Jul 25, 2026
5dfdd84
Merge remote-tracking branch 'origin/develop' into feature/project-ap…
chazy-d Jul 25, 2026
46a3ac1
fix: 영상 서비스 프로젝트 유형 참조 수정
chazy-d Jul 25, 2026
be731ef
fix: 공지 수정 응답 읽음 상태 보정
chazy-d Jul 25, 2026
4e5721c
fix: 공지 읽음 처리 동시성 보정
chazy-d Jul 25, 2026
c61728d
fix: 프로젝트 고정 처리 동시성 보정
chazy-d Jul 25, 2026
630f21c
feat: 공유 링크 진입 검증 api 및 게스트 경로 인증 예외 추가 (#61)
Kohseoyoung Jul 25, 2026
1e8368c
feat: 게스트 등록 api 구현 (#61)
Kohseoyoung Jul 25, 2026
8719ba6
feat: 공유 링크 소유자 조회 api 구현 (#61)
Kohseoyoung Jul 25, 2026
283b7e9
feat: 공유 링크 활성/비활성 토글 api 구현 (#61)
Kohseoyoung Jul 25, 2026
d08644a
Merge branch 'develop' into feature/61-share-link
Kohseoyoung Jul 25, 2026
1459219
Merge pull request #70 from SLAT-TO/feature/project-api-alignment-ref…
chazy-d Jul 25, 2026
5f583df
refactor: 공유 링크 생성 작성자 인증 방식 개선 및 검증 보강 (#61)
Kohseoyoung Jul 25, 2026
507d1d3
Merge remote-tracking branch 'origin/develop' into feature/video-refe…
chazy-d Jul 25, 2026
de2ff4d
fix: 알림 전체 읽음 처리 bulk update 적용
guingguing Jul 25, 2026
ab76f28
Merge pull request #73 from SLAT-TO/feature/59-notification-read-api
guingguing Jul 25, 2026
6a87de6
Merge pull request #74 from SLAT-TO/feature/video-reference-file-api
chazy-d Jul 25, 2026
72f9546
Merge pull request #72 from SLAT-TO/feature/61-share-link
Kohseoyoung Jul 25, 2026
443b790
feat: 알림 생성 도메인 메서드 추가
guingguing Jul 25, 2026
de69719
feat: 일정 담당자 알림 생성 로직 추가
guingguing Jul 25, 2026
bf3f888
feat: 프로젝트 일정 생성 알림 연동
guingguing Jul 26, 2026
c0ec175
feat: 프로젝트 일정 수정 알림 연동
guingguing Jul 26, 2026
61d90b3
refactor: 일정 API 인증 사용자 조회 방식 변경
guingguing Jul 26, 2026
0698418
feat: CORS 설정 추가
sangwon02 Jul 26, 2026
be67f50
refactor: 쿠키 SameSite 환경변수화 및 프록시 헤더 설정 추가
sangwon02 Jul 26, 2026
10eb991
Merge pull request #78 from SLAT-TO/feature/77-schedule-assigned-noti…
guingguing Jul 26, 2026
8911433
Merge pull request #80 from SLAT-TO/refactor/79-schedule-auth-principal
guingguing Jul 26, 2026
5d59963
Revise README with project details and guidelines
chazy-d Jul 26, 2026
1793a5e
refactor: 피드백/답글 작성자 인증 방식 통일 (#75)
Kohseoyoung Jul 26, 2026
f83751f
Merge pull request #83 from SLAT-TO/chazy-d-patch-1
chazy-d Jul 26, 2026
68cefb5
fix: 피드백/답글 조회 GET permitAll 제거 (#75)
Kohseoyoung Jul 27, 2026
84835b3
feat: 알림 생성 공통 메서드 추가
guingguing Jul 27, 2026
3199a0e
refactor: 알림 이동 대상 타입 상수화
guingguing Jul 27, 2026
a993ea0
feat: 그룹핑 알림 생성 메서드 추가
guingguing Jul 28, 2026
924e1ab
feat: 알림 유형별 생성 메서드 추가
guingguing Jul 28, 2026
64317ad
fix: 빈 알림 수신자 목록 처리
guingguing Jul 28, 2026
8cbb614
Merge pull request #84 from SLAT-TO/feature/75-auth-refactor
Kohseoyoung Jul 28, 2026
c30fcfb
fix: 단건 알림 읽음 처리 시 수정일 갱신 방지
guingguing Jul 28, 2026
d52bec2
fix: 그룹핑 알림 갱신 로직 개선
guingguing Jul 28, 2026
b6bf3ca
feat: 쿠키 기반 토큰 재발급에 CSRF 방어 추가
sangwon02 Jul 28, 2026
2508716
fix: SameSite=None 쿠키에 Secure 강제하도록 검증 추가
sangwon02 Jul 28, 2026
89ea088
Merge remote-tracking branch 'origin/develop' into feature/81-cors-ht…
sangwon02 Jul 28, 2026
4a53621
Merge pull request #82 from SLAT-TO/feature/81-cors-https-config
sangwon02 Jul 28, 2026
5a7cccc
Merge pull request #87 from SLAT-TO/feature/86-notification-common-se…
guingguing Jul 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,19 @@ PROJECT_INVITATION_BASE_URL=http://localhost:3000/project-invitations

# 리프레시 토큰 쿠키의 Secure 속성. 로컬 http 테스트 시에만 false
COOKIE_SECURE=true

# 리프레시 토큰 쿠키의 SameSite 속성. Lax / Strict / None 중 하나
# 프론트와 API가 다른 사이트면 None, 같은 사이트면 Lax
# None인데 COOKIE_SECURE=false면 애플리케이션이 기동에 실패한다 (브라우저가 그런 쿠키를 차단하기 때문)
COOKIE_SAME_SITE=Lax

# CORS 허용 오리진. 콤마로 구분
# POST /api/v1/auth/refresh의 CSRF 방어에도 쓰인다. 이 목록에 없는 오리진의 재발급 요청은 403으로 차단된다
CORS_ALLOWED_ORIGINS=http://localhost:3000

# S3 dev 테스트
AWS_ACCESS_KEY_ID=<aws-access-key-id>
AWS_SECRET_ACCESS_KEY=<aws-secret-access-key>

# S3 bucket
CLOUD_AWS_S3_BUCKET=<cloud-aws-s3-bucket>
293 changes: 204 additions & 89 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,112 +1,227 @@
# SLAT-TO Backend Repository

> 슬레이투 백엔드 레포지토리입니다.

## Team Members


## 🛠️ 기술 스택 (Tech Stack)

- Java 21
- Spring Boot 3.5.15
- Gradle - Groovy
- MySQL
- Spring Data JPA
- Spring Web
- Validation
- Lombok
- Swagger / Springdoc OpenAPI

## 🚀 로컬 실행 방법

### 1. IntelliJ에서 실행

1. IntelliJ IDEA에서 프로젝트를 엽니다.
2. Project SDK를 Java 21로 설정합니다.
3. Gradle Sync를 실행합니다.
4. Run Configuration의 Environment variables에 DB 환경변수를 설정합니다.
5. `SlattoApplication` main class를 실행합니다.

### 2. 필수 환경변수

DB 접속 대상은 아직 로컬 MySQL 또는 RDS 중 확정되지 않았습니다.
현재는 MySQL 사용을 전제로 환경변수만 열어둡니다.
<!-- @format -->

# SLATE-TO Backend

<div align="center">

<!-- TODO: 배너 이미지를 docs/assets/readme-banner.png 경로에 추가한 뒤 아래 주석을 해제합니다. -->
<!-- <img width="100%" alt="SLATE-TO Backend Banner" src="./docs/assets/readme-banner.png" /> -->
<img width="1920" height="1080" alt="Frame 2147229304" src="https://github.com/user-attachments/assets/fbe510e1-01c9-4b1a-b400-38a5297a1efa" />

<h3>영상 제작 협업을 위한 프로젝트 관리 및 피드백 플랫폼</h3>

</div>

---

## 프로젝트 소개

SLATE-TO는 영상 제작자와 클라이언트가 하나의 프로젝트 공간에서 작업물을 공유하고, 피드백을 남기며, 일정과 파일을 관리할 수 있도록 돕는 협업 서비스입니다.

## 팀원 소개

<div align="center">

<table>
<tr>
<td align="center">
<a href="https://github.com/chazy-d">
<img src="https://github.com/chazy-d.png" width="96" height="96" alt="chazy-d" />
<br />
<b>chazy-d</b>
</a>
<br />
Backend
</td>
<td align="center">
<a href="https://github.com/sangwon02">
<img src="https://github.com/sangwon02.png" width="96" height="96" alt="sangwon02" />
<br />
<b>sangwon02</b>
</a>
<br />
Backend
</td>
<td align="center">
<a href="https://github.com/young0206">
<img src="https://github.com/young0206.png" width="96" height="96" alt="young0206" />
<br />
<b>young0206</b>
</a>
<br />
Backend
</td>
<td align="center">
<a href="https://github.com/guingguing">
<img src="https://github.com/guingguing.png" width="96" height="96" alt="guingguing" />
<br />
<b>guingguing</b>
</a>
<br />
Backend
</td>
<td align="center">
<a href="https://github.com/Kohseoyoung">
<img src="https://github.com/Kohseoyoung.png" width="96" height="96" alt="Kohseoyoung" />
<br />
<b>Kohseoyoung</b>
</a>
<br />
Backend
</td>
</tr>
</table>

</div>

## 주요 기능

| 도메인 | 기능 |
| -------- | -------------------------------------------------------------------------- |
| 인증 | Google OAuth 로그인, JWT 기반 인증, 토큰 재발급 |
| 프로젝트 | 프로젝트 생성/수정/삭제, 목록/상세 조회, 프로젝트 고정 |
| 멤버 | 초대 링크 생성/조회/수락, 멤버 목록/상세 조회, 역할 수정, 멤버 삭제/나가기 |
| 영상 | YouTube URL 기반 영상 등록, 영상 목록/상세 조회, 진행 상태 관리 |
| 피드백 | 영상 타임코드 기반 피드백, 답글, 해결 처리 |
| 파일 | 프로젝트 파일 업로드/다운로드, 검색, 수정/삭제, 파일 고정 |
| 공지 | 프로젝트 공지 등록/조회/수정/삭제, 읽음 처리 |
| 일정 | 개인 일정과 프로젝트 일정 관리 |
| 알림 | 프로젝트 활동 기반 알림 조회 및 읽음 처리 |

## 기술 스택

<div align="center">

### Backend

<p>
<img src="https://img.shields.io/badge/JAVA_21-007396?style=for-the-badge&logo=openjdk&logoColor=white" alt="Java 21" />
<img src="https://img.shields.io/badge/SPRING_BOOT_3.5-6DB33F?style=for-the-badge&logo=springboot&logoColor=white" alt="Spring Boot" />
<img src="https://img.shields.io/badge/SPRING_SECURITY-6DB33F?style=for-the-badge&logo=springsecurity&logoColor=white" alt="Spring Security" />
<img src="https://img.shields.io/badge/JWT-000000?style=for-the-badge&logo=jsonwebtokens&logoColor=white" alt="JWT" />
<img src="https://img.shields.io/badge/SPRING_DATA_JPA-6DB33F?style=for-the-badge&logo=spring&logoColor=white" alt="Spring Data JPA" />
</p>

### Database & Storage

<p>
<img src="https://img.shields.io/badge/MYSQL_8.0-4479A1?style=for-the-badge&logo=mysql&logoColor=white" alt="MySQL" />
<img src="https://img.shields.io/badge/AWS_S3-569A31?style=for-the-badge&logo=amazons3&logoColor=white" alt="AWS S3" />
<img src="https://img.shields.io/badge/H2_TEST_DB-09476B?style=for-the-badge&logo=h2database&logoColor=white" alt="H2" />
</p>

### Infra & Deploy

<p>
<img src="https://img.shields.io/badge/AWS_EC2-FF9900?style=for-the-badge&logo=amazonec2&logoColor=white" alt="AWS EC2" />
<img src="https://img.shields.io/badge/GITHUB_ACTIONS-2088FF?style=for-the-badge&logo=githubactions&logoColor=white" alt="GitHub Actions" />
<img src="https://img.shields.io/badge/GRADLE-02303A?style=for-the-badge&logo=gradle&logoColor=white" alt="Gradle" />
</p>

### API & External

<p>
<img src="https://img.shields.io/badge/SWAGGER_UI-85EA2D?style=for-the-badge&logo=swagger&logoColor=black" alt="Swagger UI" />
<img src="https://img.shields.io/badge/GOOGLE_OAUTH-4285F4?style=for-the-badge&logo=google&logoColor=white" alt="Google OAuth" />
<img src="https://img.shields.io/badge/YOUTUBE_DATA_API-FF0000?style=for-the-badge&logo=youtube&logoColor=white" alt="YouTube Data API" />
</p>

</div>

## 시스템 구성

<img width="1309" height="1201" alt="slat_infra" src="https://github.com/user-attachments/assets/97a66797-34f1-4ce4-96a1-aea0913b504b" />

## 협업 방식

### 브랜치 전략

| 브랜치 | 설명 |
| --- | --- |
| `main` | 최종 사용자에게 배포되는 가장 안정적인 버전입니다. |
| `develop` | 다음 출시 버전을 개발하는 중심 브랜치입니다. 기능 개발이 완료된 `feature` 브랜치가 병합됩니다. |
| `feature/*` | 기능 개발용 브랜치입니다. 최신 `develop`에서 분기하여 작업합니다. |

### 브랜치 규칙 및 네이밍

- 모든 기능 개발은 `feature` 브랜치에서 시작합니다.
- 작업을 시작하기 전에는 `develop` 브랜치의 최신 내용을 반영합니다.
- 작업이 끝나면 `develop`을 대상으로 Pull Request를 생성하고, Reviewer를 지정합니다.
- 리뷰 후 승인된 Pull Request만 `develop`에 병합합니다.

```bash
DB_URL=jdbc:mysql://<host>:3306/<database>?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
DB_USER=<username>
DB_PASSWORD=<password>
JPA_DDL_AUTO=validate
git switch develop
git pull origin develop
git switch -c feature/1-login
```

환경변수 예시는 `.env.example`을 참고합니다. Spring Boot는 `.env` 파일을 자동으로 읽지 않으므로 IntelliJ Run Configuration 또는 shell 환경변수로 값을 주입합니다.
브랜치 이름은 아래 형식을 사용합니다.

### 3. Swagger

애플리케이션 실행 후 아래 주소에서 Swagger UI를 확인할 수 있습니다.

```txt
http://localhost:8080/swagger-ui
```text
feature/{이슈번호}-{기능명}
```

## 🧩 초기 패키지 방향
예시: `feature/1-login`

```txt
com.slatto
├── global
│ └── config
└── domain
### 커밋 컨벤션

```text
<type>: <작업 내용>
```

공통 응답 형식, 예외 처리 방식, Security/Auth 구조는 팀 합의 후 추가합니다.
- `type`은 소문자만 사용합니다.
- `subject`는 현재형 동사로 작성합니다.

### 🌐 Git-flow 전략 (Git-flow Strategy)
| type | 설명 |
| ---------- | ------------------------ |
| `feat` | 새로운 기능 추가 |
| `fix` | 버그 수정 |
| `refactor` | 기능 변경 없는 코드 개선 |
| `docs` | 문서 수정 |
| `test` | 테스트 코드 추가/수정 |
| `chore` | 빌드, 설정, 기타 작업 |

- **`main`**: 최종적으로 사용자에게 배포되는 가장 안정적인 버전 브랜치
- **`develop`**: 다음 출시 버전을 개발하는 중심 브랜치. 기능 개발 완료 후 `feature` 브랜치들이 병합
- **`feature`**: 기능 개발용 브랜치. `develop`에서 분기하여 작업
### Pull Request

### 📌 브랜치 규칙 및 네이밍 (Branch Rules & Naming)
- PR은 `develop` 브랜치를 기준으로 생성합니다.
- PR 생성 시 Reviewer를 지정합니다.
- 작업 내용, 주요 변경 파일, 검증 결과를 함께 작성합니다.
- 기능 단위가 커질 경우 작은 커밋 단위로 나누어 리뷰 흐름을 명확하게 유지합니다.

1. 모든 기능 개발은 **feature** 브랜치에서 시작
2. 작업 시작 전, 항상 최신 `develop` 내용 받아오기 (`git pull origin develop`)
3. 작업 완료 후, `develop`으로 Pull Request(PR) 생성
4. PR에 Reviewer(멘션) 지정
5. 리뷰어가 PR을 보고 코드 확인 후 머지 진행
## 프로젝트 구조 및 실행

**브랜치 이름 형식:**
feature/이슈번호-기능명
### 패키지 구조

- 예시: `feature/1-login`
```text
src/main/java/com/slatto
├── domain
│ ├── auth, user, project, video, feedback
│ ├── schedule, notification, recruitment, sharelink, inquiry
│ └── controller, service, repository, entity, dto 중심으로 구성
├── global
│ ├── config, security, exception, response
│ ├── storage, health
│ └── 공통 설정과 횡단 관심사 관리
└── SlattoApplication.java
```

### 🎯 커밋 컨벤션 (Commit Convention)
### 로컬 실행 및 검증

- **주의 사항:**
- `type`은 소문자만 사용 (feat, fix, refactor, docs, style, test, chore)
- `subject`는 **모두 현재형 동사**
Java 21 기준으로 실행합니다.

#### 📋 타입 목록
```bash
./gradlew bootRun
```

| type | 설명 |
| :------------------ | :------------------------------------ |
| `start` | 새로운 프로젝트를 시작할 때 |
| `feat` | 새로운 기능을 추가할 때 |
| `fix` | 버그를 수정할 때 |
| `design` | CSS 등 사용자 UI 디자인을 변경할 때 |
| `refactor` | 기능 변경 없이 코드를 리팩토링할 때 |
| `settings` | 설정 파일을 변경할 때 |
| `comment` | 필요한 주석을 추가하거나 변경할 때 |
| `dependency/Plugin` | 의존성/플러그인을 추가할 때 |
| `docs` | README.md 등 문서를 수정할 때 |
| `merge` | 브랜치를 병합할 때 |
| `deploy` | 빌드 및 배포 관련 작업을 할 때 |
| `rename` | 파일 혹은 폴더명을 수정하거나 옮길 때 |
| `remove` | 파일을 삭제하는 작업만 수행했을 때 |
| `revert` | 이전 버전으로 롤백할 때 |
전체 테스트와 빌드는 아래 명령으로 확인합니다.

```bash
#### ✨ 예시
feat: 로그인 기능 추가
fix: 로그인 버그 수정
refactor: 로그인 로직 리팩토링
./gradlew test
./gradlew clean build
```

---

<div align="center">
SLATE-TO Backend
</div>
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ dependencies {
testCompileOnly 'org.projectlombok:lombok'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testAnnotationProcessor 'org.projectlombok:lombok'

// AWS
implementation platform('software.amazon.awssdk:bom:2.27.21')
implementation 'software.amazon.awssdk:s3'
}

tasks.named('test') {
Expand All @@ -46,4 +50,4 @@ tasks.named('test') {

tasks.named('bootJar') {
archiveFileName = 'slatto.jar'
}
}
21 changes: 14 additions & 7 deletions src/main/java/com/slatto/domain/auth/service/AuthService.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import com.slatto.domain.auth.repository.RefreshTokenRepository;
import com.slatto.domain.auth.support.GoogleAuthFailureReason;
import com.slatto.domain.auth.support.OAuthState;
import com.slatto.domain.notification.entity.NotificationSetting;
import com.slatto.domain.notification.repository.NotificationSettingRepository;
import com.slatto.domain.user.entity.Users;
import com.slatto.domain.user.enums.SocialType;
import com.slatto.domain.user.repository.UserRepository;
Expand All @@ -31,6 +33,7 @@ public class AuthService {
private final GoogleOAuthClient googleOAuthClient;
private final UserRepository userRepository;
private final RefreshTokenRepository refreshTokenRepository;
private final NotificationSettingRepository notificationSettingRepository;
private final JwtTokenProvider jwtTokenProvider;
private final FrontendProperties frontendProperties;

Expand Down Expand Up @@ -115,13 +118,17 @@ private Users findOrCreateUser(GoogleUserInfo userInfo) {
existing.linkSocialAccount(SocialType.GOOGLE, userInfo.sub());
return existing;
}))
.orElseGet(() -> userRepository.save(Users.createSocialUser(
userInfo.email(),
userInfo.name(),
userInfo.picture(),
SocialType.GOOGLE,
userInfo.sub()
)));
.orElseGet(() -> {
Users createdUser = userRepository.save(Users.createSocialUser(
userInfo.email(),
userInfo.name(),
userInfo.picture(),
SocialType.GOOGLE,
userInfo.sub()
));
notificationSettingRepository.save(NotificationSetting.createDefault(createdUser));
return createdUser;
});
}

private String issueRefreshToken(Users user) {
Expand Down
Loading
Loading