Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
322a9b2
init commit
YamYamee Feb 5, 2025
05fceca
[Chore] 깃허브 템플릿 등록 (#2)
ja7811 Feb 20, 2025
d81f8af
[Chore] CICD 스크립트 추가 (#5)
ja7811 Feb 20, 2025
ad5b2d7
[FEAT] 문서 편집 이벤트 중계 기능 (#10)
ja7811 Feb 23, 2025
ec8279f
[FEAT] 에러 처리 및 스웨거 세팅 및 CORS 설정 (#12)
YamYamee Feb 23, 2025
f329c35
[FEAT] 충돌 처리 기능 추가 (#14)
ja7811 Feb 28, 2025
d7a6930
add: 로그인 및 회원가입 구현
YamYamee Mar 6, 2025
60c9542
add: gitkeep 되돌려놈
ja7811 Mar 6, 2025
86277bf
fix: 일부 수정
YamYamee Mar 6, 2025
3e1c1b9
[feat] 로그인 및 회원가입 구현 (#19)
YamYamee Mar 6, 2025
c0ef28a
[UPDATE] Operation 예외 처리 추가 (#20)
ja7811 Mar 6, 2025
ff4af3e
add: 대시보드 관련 api 추가 및 엔티티 수정
YamYamee Mar 7, 2025
d15150d
fix: 엔티티 수정
YamYamee Mar 7, 2025
1de4ec2
[FEAT] 사용자 api 추가 및 엔티티 수정 (#22)
YamYamee Mar 7, 2025
ed3c37c
[HOTFIX] 테스트 문서 DocumentVersion NullPointerException 해결 (#23)
ja7811 Mar 8, 2025
ff22785
hotfix: fillDocumentVersionPool 로직 오류 해결 (#24)
ja7811 Mar 9, 2025
22d357b
[FIX] OperationResponseDto 필드 설정 오류 해결 (#26)
ja7811 Mar 9, 2025
76cb4bc
fix: 이름 수정
YamYamee Mar 11, 2025
4a3d24a
[HOTFIX] 이름 순서 변경 (#30)
YamYamee Mar 11, 2025
174efb5
[FEAT] @TrackExecutionTime 추가 (#28)
ja7811 Mar 11, 2025
bc445ae
[FEAT] 문서 상태 캐싱 & SYNC 구현 (#29)
ja7811 Mar 11, 2025
651e9f8
[FIX] exception 시 스택트레이스 출력 (#33)
ja7811 Mar 12, 2025
4f8fc31
[UPDATE] 로깅 강화
ja7811 Mar 12, 2025
7a59fe6
[HOTFIX] DELETE 작업 시 StringIndexOutOfBounds 익셉션 해결 (#35)
ja7811 Mar 12, 2025
f3e52e3
[HOTFIX]: Document 저장 전 내용 로깅
ja7811 Mar 12, 2025
1310bff
[HOTFIX]: Document @PreUpate 내용 로깅
ja7811 Mar 12, 2025
39bb70f
[HOTFIX]: DELETE 인덱싱 오류 수정
ja7811 Mar 12, 2025
187ce30
[FIX] Document content 동기화 문제 해결 (#39)
ja7811 Mar 12, 2025
f9bd1d4
[FEAT] 빌드 및 강의실 api 구현 (#38)
YamYamee Mar 13, 2025
4dc961a
[HOTFIX] 순서 수정 (#42)
YamYamee Mar 13, 2025
c0fcf96
[HOTFIX] sync opPosition null처리 미룸 (#45)
ja7811 Mar 13, 2025
db61d5d
[HOTFIX] sync response dto 생성
ja7811 Mar 13, 2025
738a4cd
[FEAT] 학생 도움 요청 기능 (#43)
ja7811 Mar 13, 2025
3b78b12
[FIX] 로직 수정 (#51)
YamYamee Mar 14, 2025
db9f065
[FIX] documentId 없는 경우 documentVersion도 업데이트 (#53)
ja7811 Mar 14, 2025
a20a53e
[UPDATE] Operation 충돌 처리 방식 업데이트 (#54)
ja7811 Mar 14, 2025
790b2bf
doc: README.md 업데이트
ja7811 Mar 17, 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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/gradlew text eol=lf
*.bat text eol=crlf
*.jar binary
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: 🐞 Bug
about: 버그 제보
title: ''
assignees: ''
---

### ✨ 버그 설명
<!-- 추가할 기능에 대해 간략하게 설명해주세요 -->


### ✨ 참고 자료
<!-- 쓸 내용 없으면 지워도 됩니당 -->

7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/empty_issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: 💬 Empty Issue
about: 그냥 빈 이슈 템플릿
title: ''
assignees: ''
---

16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/general_issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: ✨ Issue
about: 일반 이슈 템플릿
title: ''
assignees: ''
---

### ✨ 이슈 설명
<!-- 추가할 기능에 대해 간략하게 설명해주세요 -->




### ✨ 작업 예상 시간
<!-- 완료까지 얼마나 걸릴지 -->

26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- PR 제목은 핵심 변경 사항을 요약해주세요 -->
<!-- ex) feat: 캐스트 생성 기능 추가 -->

## #️⃣ 연관 이슈
<!-- 연관된 이슈 번호를 적어주세요-->
> Closes #n

## 📝 요약
<!-- 작업 내용을 요약해주세요. -->

- 작업 내용 요약1
- 작업 내용 요약2

## 🙏 리뷰 요청사항
<!-- 리뷰 할 때 참고했으면 하는 부분을 적어주세요. -->
<!-- 없다면 통째로 지워도 됩니다! -->

## 변경사항 상세
<!-- 변경되거나 새로 만든 부분에 대한 설명 -->
### 작업 내용 요약1
- 작업 내용 설명
- 작업 내용 설명
### 작업 내용 요약2
- 작업 내용 설명
- 작업 내용 설명

106 changes: 106 additions & 0 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: idedu backend CI/DE

on:
push:
branches:
- develop

permissions:
contents: read

jobs:
build:
name: Build in Github Actions
runs-on: ubuntu-22.04

steps:
# 저장소 Checkout하여 코드 가져오기
- name: Checkout branch
uses: actions/checkout@v3

# 최신 커밋 출력하기 (확인용)
- name: Show latest commit
run: |
latest_commit=$(git log -1 --pretty=format:"%h %s (%an)")
echo "Latest commit: $latest_commit"

# Java 버전 세팅
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'

# yml 파일 복사
- name: Copy secret
env:
APPLICATION_FILE: ${{ secrets.APPLICATION_PROFILE }}
APPLICATION_FILE_NAME: application.yml
DIR: ./src/main/resources
run: |
touch $DIR/$APPLICATION_FILE_NAME
echo "$APPLICATION_FILE" > $DIR/$APPLICATION_FILE_NAME

# gradlew 실행 권한 부여
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
shell: bash

# JAR 파일 생성
- name: Build with Gradle
run: ./gradlew clean build -x test
shell: bash

# jar 및 소스코드 업로드
- name: Upload Build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
build/libs/*-SNAPSHOT.jar
src/main/java/com/gdg/backend

deploy:
name: Deliver using SSH
needs: build
runs-on: ubuntu-22.04

steps:
# jar 및 소스코드 다운로드
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts

# SCP로 jar 파일 EC2에 배포
- name: SCP JAR to EC2
uses: appleboy/scp-action@master
with:
key: ${{ secrets.EC2_KEY }}
host: ${{ secrets.EC2_HOST }}
username: ubuntu
source: "build/libs/*.jar"
target: "/home/ubuntu/app"

# SCP로 소스코드 EC2에 붙여넣기 (확인용)
- name: SCP project source code to EC2
uses: appleboy/scp-action@master
with:
key: ${{ secrets.EC2_KEY }}
host: ${{ secrets.EC2_HOST }}
username: ubuntu
source: "src/"
target: "/home/ubuntu/app"

# jar 실행
- name: Deploy SSH
uses: appleboy/ssh-action@master
with:
key: ${{ secrets.EC2_KEY }}
host: ${{ secrets.EC2_HOST }}
username: ubuntu
# 8080 포트에서 실행 중인 서버 종료 후 재실행
script: |
sudo fuser -k -n tcp 8080
sleep 15
sudo nohup java -jar -Duser.timezone=Asia/Seoul ./app/build/libs/*.jar > ./nohup.out 2>&1 &
55 changes: 55 additions & 0 deletions .github/workflows/dev_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: idedu test pr (develop branch)

on:
pull_request:
branches:
- develop

permissions:
contents: read

jobs:
build:
name: Run tests
runs-on: ubuntu-22.04

steps:
# 작업 엑세스 가능하게 $GITHUB_WORKSPACE에서 저장소를 체크아웃
- name: Checkout branch
uses: actions/checkout@v3

# java 버전 세팅(JDK 17)
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'

# yml 파일 github secret에서 복사
- name: Copy secret
env:
APPLICATION_FILE: ${{ secrets.APPLICATION_PROFILE_TEST }}
DIR: ./src/main/resources

APPLICATION_FILE_NAME: application.yml
run: |
touch $DIR/$APPLICATION_FILE_NAME
echo "$APPLICATION_FILE" > $DIR/$APPLICATION_FILE_NAME

# github actions cache에서 gradle 캐시 기져옴 (의존성 & 빌드 데이터)
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle

# gradlew 실행 권한 부여
- name: Make gradlew executable
run: chmod +x ./gradlew
shell: bash

# 테스트 실행
- name: Run tests
run: ./gradlew test
shell: bash
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Custom ###
application*.yml
application*.yaml
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# IDEdu_BE
학생들을 위한 코딩 교육 플랫폼 - SDGs 프로젝트 7조
![idedu-logo](https://github.com/user-attachments/assets/55d99881-6322-4c0c-b509-c1f554791b90)

>**IDEdu**는 **온라인 코딩 교육의 한계점을 극복하기 위한 클라우드 코딩 플랫폼**입니다.
>교육 중 교수자와 학생의 IDE 상태는 실시간으로 중계되어 서로의 코드를 확인할 수 있으며,
>교수자는 학생의 코드를 수정할 수 있습니다.
>서버는 모든 학생의 빌드 기록을 저장하며, 각 학생이 어느 부분에서 실수를 하는지 파악할 수 있습니다.


### 백엔드 다이어그램
![idedu-architecture](https://github.com/user-attachments/assets/d4af07e9-b1b4-456a-ab4d-150cde734aad)


### 문서 동시 편집
![idedu-documenedit](https://github.com/user-attachments/assets/1224f146-7cac-424f-bf56-fe9b20d1d0b9)

### 사용자 코드 빌드 및 실행
![idedu-build](https://github.com/user-attachments/assets/feb94927-b835-4dce-9388-35040aab3f4d)


49 changes: 49 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.2'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.gdg'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0' // swagger
implementation 'org.springframework.boot:spring-boot-starter-websocket' // websocket
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

implementation 'org.springframework.boot:spring-boot-starter-security' // security

implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading