Skip to content
Open

Prod #43

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
ce44d49
Feat: 학부 공지사항 및 취업 정보 API 개발 완료
sungmin306 Feb 1, 2025
201c231
Merge pull request #30 from sungmin306/develop
sungmin306 Feb 1, 2025
065e93f
Feat: 등급별 API 접근 권한 설정 완료
sungmin306 Feb 1, 2025
c294152
Merge pull request #31 from sungmin306/develop
sungmin306 Feb 1, 2025
caf6731
Fix: 빈생성 안되는 문제 해결
sungmin306 Feb 1, 2025
234e547
Merge pull request #32 from sungmin306/develop
sungmin306 Feb 1, 2025
ec72c25
Feat: 로그아웃 기능 구현
sungmin306 Feb 1, 2025
48aeeab
Merge pull request #33 from sungmin306/develop
sungmin306 Feb 1, 2025
30850d4
Fix: fastAPI에서 데이터 값 전체 안가져오는거 수정
sungmin306 Feb 2, 2025
78fd338
Merge pull request #34 from sungmin306/develop
sungmin306 Feb 2, 2025
760168f
Refactor 학생회 등급 수정 및 학생증 인증 관련 코드 변경
sungmin306 Feb 2, 2025
e473284
Merge pull request #35 from sungmin306/develop
sungmin306 Feb 2, 2025
3892ea0
Fix : roleChange 권한 접근 안되는 문제 핸결
sungmin306 Feb 2, 2025
29b16ff
Merge pull request #36 from sungmin306/develop
sungmin306 Feb 2, 2025
a384827
Fix: API 연동 안되는 오류 해결
sungmin306 Feb 2, 2025
ea03824
Merge pull request #37 from sungmin306/develop
sungmin306 Feb 2, 2025
8dac5bf
Feat: 스웨거 설명 기능 추가
sungmin306 Feb 4, 2025
8d58d61
Merge pull request #38 from sungmin306/develop
sungmin306 Feb 4, 2025
962ce95
Feat: 학과 질문 공개 여부 기능 추가
sungmin306 Feb 4, 2025
71ae0e2
Merge pull request #39 from sungmin306/develop
sungmin306 Feb 4, 2025
6c6db19
Feat: 과행사 생성에 GOOGLE GLOUD STORAGE 연동 완료
sungmin306 Feb 5, 2025
75aa7fc
Merge pull request #40 from sungmin306/develop
sungmin306 Feb 5, 2025
05f389b
Refactor: 배포를 위한 yaml 파일 분리
sungmin306 Feb 6, 2025
4df8c9f
Merge pull request #41 from sungmin306/develop
sungmin306 Feb 6, 2025
18786e2
Refactor: 학생증 등록 여부에 따른 쿠키 리다이랙트 조정:
sungmin306 Feb 6, 2025
0725893
Merge pull request #42 from sungmin306/develop
sungmin306 Feb 6, 2025
f9d2632
Feat: Google Cloud SQL 세팅 - 배포용 브랜치
sungmin306 Feb 6, 2025
4cbda3e
Merge pull request #44 from sungmin306/prod
sungmin306 Feb 6, 2025
20074d5
Feat: FCM 기능을 위한 각 공지별 알람 끄고 켜는 기능 추가
sungmin306 Feb 8, 2025
56ee9a5
Merge branch 'develop' of https://github.com/sungmin306/ComNCheck-bac…
sungmin306 Feb 8, 2025
0c3bdd5
Merge : develop 에 있는 FCM 세팅 및 알람 on/off 기능 병합
sungmin306 Feb 8, 2025
deaf80e
Merge pull request #46 from sungmin306/prod
sungmin306 Feb 8, 2025
684dee0
Refactor: 알람등록 비즈니스 로직 및 컨트롤러 Operation 변경
sungmin306 Feb 9, 2025
ac2affd
Merge pull request #45 from sungmin306/develop
sungmin306 Feb 9, 2025
3958578
Merge branch 'develop' into prod
sungmin306 Feb 9, 2025
cb94957
Feat: FCM 기능 구현 개발
sungmin306 Feb 9, 2025
3434569
Merge pull request #47 from sungmin306/develop
sungmin306 Feb 9, 2025
f7fadb0
Feat: fcm 기능 과행사 공지 및 취업 공지사항에 기능 추가
sungmin306 Feb 10, 2025
040328e
Merge pull request #48 from sungmin306/develop
sungmin306 Feb 10, 2025
c3855c3
Refactor : JWTFilter 예외처리 수정
sungmin306 Feb 10, 2025
959bb4d
Merge pull request #49 from sungmin306/develop
sungmin306 Feb 10, 2025
9de0175
Fix : 학생증 검사 안해도 true 반환 되는 문제 해결
sungmin306 Feb 11, 2025
1484448
Merge pull request #2 from ComNCheck/develop
sungmin306 Feb 11, 2025
7489cf2
Merge pull request #50 from sungmin306/develop
sungmin306 Feb 11, 2025
0d9b22a
Merge pull request #3 from ComNCheck/develop
sungmin306 Feb 11, 2025
e598ebe
Feat: MemberDTO 생성자로 Setting 했던 부분 제거
sungmin306 Feb 11, 2025
b14ca41
Merge branch 'develop' into prod
sungmin306 Feb 11, 2025
53c1cd1
Merge: develop 기능 병합
sungmin306 Feb 11, 2025
876918c
Merge pull request #52 from sungmin306/prod
sungmin306 Feb 11, 2025
934a7b1
Refactor 예외처리 변경 진행 중 권한 예외처리 403
sungmin306 Feb 11, 2025
13c8f67
Feat: GCS에 필요한 의존성 추가
sungmin306 Feb 11, 2025
dd72da7
Refactor: 학생회 신청 API 변경
sungmin306 Feb 11, 2025
698e0f9
Merge branch 'develop' into prod
sungmin306 Feb 11, 2025
49f7728
Merge 학생회 신청 컨트롤러 변동 병합
sungmin306 Feb 11, 2025
63f5780
Merge pull request #54 from sungmin306/prod
sungmin306 Feb 11, 2025
0c05050
Feat: 학부 질문 전체 목록 조회 기능 API 추가
sungmin306 Feb 12, 2025
66f066d
Merge branch 'develop' into prod
sungmin306 Feb 12, 2025
2db9c67
Feat: 내가 쓴 개발자 글 목록 조회 API 기능 구현
sungmin306 Feb 12, 2025
5285387
Merge branch 'develop' into prod
sungmin306 Feb 12, 2025
31e28c3
Refactor: 모든 예외처리 상태코드와 함께 응답 하도록 변경
sungmin306 Feb 12, 2025
d3d0374
Merge branch 'develop' into test_prod
sungmin306 Feb 12, 2025
cd073a3
Fix: FAQ 업데이트 안되는 버그 해결
sungmin306 Feb 12, 2025
c66f7ca
Merge branch 'develop' into test_prod
sungmin306 Feb 12, 2025
67459be
Refactor: 로컬이 아닌 배포세팅에 맞춰서 시큐리티 변경
sungmin306 Feb 15, 2025
0c04cd3
Refactor: yaml 파일 수정
sungmin306 Feb 15, 2025
c44e0eb
Fix: 머지 충돌 해결
sungmin306 Feb 15, 2025
3c1c2b2
Fix: 과행사 게시글 목록 링크 가지 않는 이슈 해결
sungmin306 Feb 15, 2025
74a0ab3
Merge branch 'develop' into test_prod
sungmin306 Feb 15, 2025
ba2cef6
Fix: 글 목록 조회시 구글폼, 이미지 전달 안되는 문제 해결
sungmin306 Feb 16, 2025
b765818
Merge branch 'develop' into test_prod
sungmin306 Feb 16, 2025
14b4e17
Refactor: 프론트 로컬 테스트에 맞는 브랜치 생성
sungmin306 Feb 16, 2025
d87d591
Fix: 쿼리문 제대로 안날라오는 문제 해결
sungmin306 Feb 16, 2025
f2174dd
Fix: 로그아웃 기능 변경
sungmin306 Feb 16, 2025
658dca3
Merge branch 'develop' into test_local
sungmin306 Feb 16, 2025
8e64728
Refactor RoleChange requestRole Enumerated 설정 안되어있는 부분 설정 완료
sungmin306 Feb 17, 2025
db46396
Merge branch 'develop' into test_local
sungmin306 Feb 17, 2025
639bd64
Refactor: test_local에 맞게 쿠키 설정 변경
sungmin306 Feb 17, 2025
760ba0f
Refactor: 질문하기 목록 업데이트 순서로 내림차순 정렬
sungmin306 Feb 17, 2025
510a6b9
Merge branch 'test_local' into develop
sungmin306 Feb 17, 2025
06a3f6a
Refactor: FAQ 관련 질문 정렬 적용
sungmin306 Feb 17, 2025
fe8e94c
Refactor: 학생회 행사 기간 지난것도 가져오는 식으로 API 변경
sungmin306 Feb 23, 2025
979e129
Merge pull request #76 from sungmin306/prod
sungmin306 Feb 23, 2025
550ced8
Refactor: 시큐리티 도메인 Local에서 배포용 도메인으로 변경
sungmin306 Feb 23, 2025
16678d1
Merge pull request #77 from sungmin306/prod
sungmin306 Feb 23, 2025
0fe9bbd
Refactor: front URL localhost 변경
sungmin306 Feb 25, 2025
1afddf9
Fix : 머지 충돌 해결
sungmin306 Feb 25, 2025
7356b5a
Merge pull request #79 from sungmin306/prod
sungmin306 Feb 25, 2025
fc66700
Fix: 과행사 목록 id(pk)가지 않는 문제 해결
sungmin306 Feb 28, 2025
ecbd53f
Merge branch 'develop' into prod
sungmin306 Feb 28, 2025
0292442
Refactor: 쿠키 서드 파티 도메인 설정
sungmin306 Mar 1, 2025
b1abd0e
Refactor: 프론트 도메인 (배포 위치) 변경에 따른 시큐리티 도메인 수정
sungmin306 Mar 2, 2025
1afa8df
Merge pull request #81 from sungmin306/prod
sungmin306 Mar 2, 2025
2b60d73
Refactor: 쿠키 생성시 도메인 수정
sungmin306 Mar 3, 2025
5987417
Merge pull request #82 from sungmin306/prod
sungmin306 Mar 3, 2025
ff5a183
Refactor: 학부 공지, 취업 공지 페이지네이션 오름차순 보장
sungmin306 Mar 4, 2025
15f1d70
Merge branch 'develop' into prod
sungmin306 Mar 4, 2025
2e9cddb
Merge pull request #85 from sungmin306/prod
sungmin306 Mar 5, 2025
03dffe1
Refactor: majorQuestion DTO 변수명 수정 및 AnswerUpdateRequestDTO 사용안했던 부분 사용
sungmin306 Mar 7, 2025
76c057f
Merge branch 'develop' into prod
sungmin306 Mar 7, 2025
1803f1b
Refactor: AnswerResponseDTO questionId -> majorQuestionId 변경
sungmin306 Mar 7, 2025
60b072d
Merge: AnswerResponseDTO 병합
sungmin306 Mar 7, 2025
d0c4745
Feat: 승인 없이 바로 등급 수정되는 API 개발 - 과회장 등급만 사용 가능한 API
sungmin306 Mar 9, 2025
1022752
Feat: Merge 충돌 해결
sungmin306 Mar 9, 2025
4af4bbb
Merge pull request #89 from sungmin306/prod
sungmin306 Mar 9, 2025
9d9ad60
Feat: hufs 도메인 & 관리자 계정만 로그인 되도록 설정
sungmin306 Mar 10, 2025
0eb029c
Merge pull request #90 from sungmin306/prod
sungmin306 Mar 10, 2025
8ade4d0
Refactor: 과행사 오름차순에서 내림차순으로 정려 변경 -> 안끝난 행사가 맨위로 갈 수 있도록
sungmin306 Mar 10, 2025
9eb3b4e
Merge branch 'develop' into prod
sungmin306 Mar 10, 2025
9f68afe
Merge pull request #93 from sungmin306/prod
sungmin306 Mar 10, 2025
4dbf2a1
등급 신청 오름차순 정렬
sungmin306 Mar 10, 2025
fb72598
Merge branch 'develop' into prod
sungmin306 Mar 10, 2025
8e9cf29
Refactor: 내 계정 관리자 계정 등록
sungmin306 Mar 10, 2025
8aec1db
Fix: 로직상 hufs 도메인 아닐시 에러처리 안되는 부분 해결
sungmin306 Mar 10, 2025
421d73a
Fix SecurityConfig 수정
sungmin306 Mar 11, 2025
08e202f
Refactor : MajorEvent 엔티티 notice 컬럼 TEXT 적용
sungmin306 Mar 13, 2025
def741e
Merge pull request #95 from sungmin306/prod
sungmin306 Mar 13, 2025
b9d8943
Refactor: MajorEvent 엔티티 변경
sungmin306 Mar 13, 2025
8cebf14
Merge branch 'develop' into prod
sungmin306 Mar 13, 2025
f2cf50e
Feat: 로그인 클릭시 계정 선택되는 기능 추가
sungmin306 Mar 17, 2025
4f35090
develop 충돌 해결 무조건 구글 계정 선택 되게끔
sungmin306 Mar 17, 2025
3b72828
Docs: README.md 파일 생성
sungmin306 Mar 26, 2025
c43ece2
Update README.md
sungmin306 Mar 26, 2025
2bfb91f
Merge branch 'develop' into prod
sungmin306 Mar 26, 2025
ffb1782
Feat: 다른 공지 기능 추가
sungmin306 May 19, 2025
7fb7715
Fix : 과행사 외 다른 행사 이미지 테이블 이름 충돌 문제 해결
sungmin306 May 29, 2025
96882a5
Fix : anotherEvent 엔티티 테이블 명 오탈자 수정 및 FK 수정
sungmin306 May 29, 2025
0be7ce0
Merge branch 'develop' into prod
sungmin306 Aug 4, 2025
c27fafe
Merge : anotherEvent 개발 및 문제 해결
sungmin306 Aug 4, 2025
4583e02
Merge pull request #104 from sungmin306/prod
sungmin306 Aug 4, 2025
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
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@ out/
hs_err_pid44980.jfr
hs_err_pid44980.log


build/

docker-compose.yaml

#GCP, FIREBASE KEY
/src/main/resources/gcp
/src/main/resources/firebase

data/
gradle/

buildDockerWindow.sh
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
FROM openjdk:17
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} test-app.jar
COPY ${JAR_FILE} prod.jar

COPY src/main/resources/gcp/ancient-pipe-447417-i4-755ce59fbf03.json /app/ancient-pipe-447417-i4-755ce59fbf03.json
ENV GOOGLE_APPLICATION_CREDENTIALS="app/ancient-pipe-447417-i4-755ce59fbf03.json"

COPY src/main/resources/firebase/comncheck-firebase-adminsdk-fbsvc-1255c6f2ed.json /app/comncheck-firebase-adminsdk-fbsvc-1255c6f2ed.json

EXPOSE 8080
CMD ["java", "-Dtest.customName=${CUSTOM_NAME}", "-jar", "test-app.jar"]
CMD ["java", "-Dtest.customName=${CUSTOM_NAME}", "-jar", "prod.jar"]

66 changes: 62 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# backend
<p align='center'><img width="518" alt="Image" src="https://github.com/user-attachments/assets/739c96ac-ebcb-4235-aa44-d79a5315e090" />

## branch 특징
### main : 배포
### develop : 개발


# 1. OverView(프로젝트 개요)
- 프로젝트 이름: ComNCheck
- 프로젝트 설명: 한국외국어대학교 컴퓨터공학부 알리미
- 프로젝트 시작 계기 : 학창시절 과회장을 하면서 학부 행사 같은 경우 카톡방에 쌓이고, 학교 공지는 홈페이지에 수시로 들어가야 하는 불편함을 하나의 서비스로 해결하기 위해
- 프로젝트 사이트 : https://www.comncheck.com
- 프로젝트에서 하고 싶었던 부분 : Spring, FastAPI 백엔드 개발, 쿠버네티스 기반 서버 구축 및 운영
# 2. Team Members (팀원 및 팀 소개)
| 조성민 | 노성원 | 이예림 |
|:------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------:|
| Lead, BE, Server | FE, UI/UX Designer | FE, UI/UX Designer |
| <p align='center'><img src="https://avatars.githubusercontent.com/u/101984130?v=4" height=100/> | <p align='center'><img src="https://avatars.githubusercontent.com/u/129041262?v=4" height=100/> | <p align='center'><img src="https://avatars.githubusercontent.com/u/129266668?v=4" height=100/> |
| [@sungmin306](https://github.com/sungmin306) | [@sungwonnoh](https://github.com/sungwonnoh) | [@YerimLee](https://github.com/yerimi00) |
# 3. Project Preview
<p align='center'><img src="https://github.com/user-attachments/assets/07c2a735-6f02-4421-9c76-c0f3740af64f" />

- 약 134명의 사용자가 현재 접속하여 사용중(2025.03.24 기준)

# 4. Architecture
<p align='center'><img src='https://github.com/user-attachments/assets/8fe431d7-f6df-4780-a497-55da01240110'/></p>

1. 단일 노드에서 `K3s` 기반으로 구축했다.(기존 GCP에서 미니PC 설치 후 서버 이동)
2. 클라이언트(Client)는 `Nginx` 서버로 접속한다. → 80 또는 **`443`**
- Nginx 내부적으로 Certbot을 이용하여 SSL 인증을 진행
3. `Nginx`는 “/” 경로로 온 요청은 Next.js 컨테이너로 요청을 보낸다.
4. `Nginx`는 “/api” 경로로 온 요청은 `Spring` 컨테이너로 요청을 보낸다.
- 직접적으로 외부 통신 하지 않는 파드 같은 경우 Cluster IP로 설정하여 외부 서버에서 접근하는것을 막았다.
- `FastAPI` 및 `Next.js` 같은 경우 Replicaset 기반으로 5개의 파드가 동작해 비스의 확장성과 안정성이 보장한다.
5. 모든 요청과 응답은 `Nginx`를 통해 전달한다.
6. DB 서버는 백업기능을 위해 서버 로컬에서 관리한다.

# 5. Service Detail
| 일정 관리 | 알람 기능 |
|:---------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------:|
| <img width="492" alt="Image" src="https://github.com/user-attachments/assets/20bb9454-bdbd-47aa-a32d-6fb397a94da1" /> | <img width="495" alt="Image" src="https://github.com/user-attachments/assets/024f8a41-c2f2-4f0e-9e14-aadb0aaa78a6" /> |
| **익명 질문** | **추가 기능** |
| <img width="490" alt="Image" src="https://github.com/user-attachments/assets/4669557e-f505-40cf-9084-88ce13ce25ce" /> | <img width="490" alt="Image" src="https://github.com/user-attachments/assets/97f16b11-08ec-400f-93dd-c61c2c84b7d1" /> |

# 4. Tech stack

### Backend

<img src="https://img.shields.io/badge/Spring-6DB33F?style=flat-square&logo=Spring&logoColor=white"/> <img src="https://img.shields.io/badge/FastAPI-009688?style=flat-square&logo=Spring&logoColor=white"/> <img src="https://img.shields.io/badge/Docker-2496ED?style=flat-square&logo=Docker&logoColor=white"/> <img src="https://img.shields.io/badge/Kubernetes-326CE5?style=flat-square&logo=Spring&logoColor=white"/><img src="https://img.shields.io/badge/MySQL-4479A1?style=flat-square&logo=MySQL&logoColor=white"/> <img src="https://img.shields.io/badge/Ubuntu-E95420?style=flat-square&logo=Ubuntu&logoColor=white"/>


# 5. 앞으로의 목표

백엔드

- [ ] 테스트코드 작성
- [ ] 레디스 이용 → 성능 최적화
- [ ] 코드 리펙토링(클린코드 만들기)
- [ ] 로직개선

클라우드

- [ ] control-plane, worker 노드 분리(고가용성)
- [ ] HPA 설정
- [ ] 모니터링 툴 세팅
- [ ] CI/CD 환경구성
10 changes: 8 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,27 @@ repositories {
mavenCentral()
}


dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'io.jsonwebtoken:jjwt-api:0.12.3'
implementation 'io.jsonwebtoken:jjwt-impl:0.12.3'
implementation 'io.jsonwebtoken:jjwt-jackson:0.12.3'
implementation 'io.github.cdimascio:java-dotenv:5.2.2' // .env 파일
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
runtimeOnly 'com.h2database:h2'
// runtimeOnly 'mysql:mysql-connector-java:8.0.33'
runtimeOnly 'com.mysql:mysql-connector-j'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.google.firebase:firebase-admin:8.1.0'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0'
implementation group: 'com.google.cloud', name: 'spring-cloud-gcp-starter', version: '6.0.0'
implementation group: 'com.google.cloud', name: 'spring-cloud-gcp-storage', version: '6.0.0'
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '4.29.3'
}

tasks.named('test') {
Expand Down
11 changes: 0 additions & 11 deletions docker-compose.yaml

This file was deleted.

Binary file removed gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 0 additions & 7 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Binary file removed hs_err_pid44980.jfr
Binary file not shown.
Loading