Skip to content

Commit 448039f

Browse files
authored
Merge pull request #72 from team-MoPlus/develop
1차 어드민 배포
2 parents f428b5c + fdd6b0b commit 448039f

File tree

257 files changed

+8212
-1523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+8212
-1523
lines changed

.github/workflows/CI.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
6+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
7+
8+
name: Gradle Package
9+
10+
on:
11+
pull_request:
12+
branches:
13+
- "master"
14+
- "develop"
15+
16+
jobs:
17+
build:
18+
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
packages: write
23+
24+
steps:
25+
- name: checkout
26+
uses: actions/checkout@v3
27+
28+
- name: Set up JDK 17
29+
uses: actions/setup-java@v3
30+
with:
31+
java-version: '17'
32+
distribution: 'temurin'
33+
34+
35+
- name: build and test
36+
run: |
37+
chmod +x gradlew
38+
./gradlew build

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ build/
44
!gradle/wrapper/gradle-wrapper.jar
55
!**/src/main/**/build/
66
!**/src/test/**/build/
7-
87
.env
8+
local.env
99

1010
### STS ###
1111
.apt_generated
@@ -37,3 +37,5 @@ out/
3737

3838
### VS Code ###
3939
.vscode/
40+
41+
src/test/resources/insert-search-problem.sql

Dockerfile

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@ FROM openjdk:17
22
ARG JAR_FILE=build/libs/*.jar
33
COPY ${JAR_FILE} app.jar
44

5-
ARG apm_agent=apm-agent/*.jar
6-
COPY ${apm_agent} apm-agent.jar
7-
8-
ARG PROFILE=dev
95
ENV SPRING_PROFILES_ACTIVE=${PROFILE}
106

11-
ENTRYPOINT ["java", \
12-
"-javaagent:/apm-agent.jar", \
13-
"-Delastic.apm.server_urls=http://114.70.23.79:8200", \
14-
"-Delastic.apm.service_name=moplus-apm-agent", \
15-
"-Delastic.apm.application_packages=com.server", \
16-
"-Delastic.apm.environment=dev", \
17-
"-jar", \
18-
"/app.jar"]
7+
ENTRYPOINT ["java", "-jar", "app.jar"]

Dockerfile.prod

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@ FROM openjdk:17
22
ARG JAR_FILE=build/libs/*.jar
33
COPY ${JAR_FILE} app.jar
44

5-
ARG apm_agent=apm-agent/*.jar
6-
COPY ${apm_agent} apm-agent.jar
7-
8-
ARG PROFILE=dev
95
ENV SPRING_PROFILES_ACTIVE=${PROFILE}
106

11-
ENTRYPOINT ["java", \
12-
"-javaagent:/apm-agent.jar", \
13-
"-Delastic.apm.server_urls=http://114.70.23.79:8200", \
14-
"-Delastic.apm.service_name=moplus-apm-agent", \
15-
"-Delastic.apm.application_packages=com.server", \
16-
"-Delastic.apm.environment=prod", \
17-
"-jar", \
18-
"/app.jar"]
7+
ENTRYPOINT ["java", "-jar", "app.jar"]

README.md

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,47 @@
1+
# 모플: 매일 3문항 수학 사고력 향상 서비스
12

3+
매일 **기출 문제 3문항**을 풀며, **수학 사고력 취약점을 진단, 처방, 교정**까지 한 번에 해결하는 **올인원 수학 사고력 향상 서비스**입니다.
24

3-
![깃허브 배너](https://github.com/user-attachments/assets/e0f52d08-05f9-44ba-9a71-f20cb9d52743)
5+
---
46

5-
<br/>
7+
## 🎯 사용자 서비스 기능
8+
<div style="display: flex; justify-content: center; gap: 10px;">
9+
<img src="https://github.com/user-attachments/assets/a4c8cf3c-72f9-4d99-b701-ff5f9cc5f85d" width="250" height="400"/>
10+
<img src="https://github.com/user-attachments/assets/7704d134-8b45-4320-996c-5aa7deafffbd" width="250" height="400"/>
11+
<img src="https://github.com/user-attachments/assets/0eb0bcb3-a400-43ae-8eda-773b09795d03" width="250" height="400"/>
12+
</div>
613

7-
<h2> 빠르게 받아보는 내 취약점 복습서, 모플 </h2>
8-
<h3> 기능1: 빠르게 틀린 문제를 체크해서 내 점수와 등급을 받아보세요. </h3>
9-
<h3> 기능2: 입력한 오답문제를 바탕으로 복습서를 제공합니다. </h3>
10-
<h3> 기능3: 친구에게 내 결과를 공유해보세요. </h3>
14+
- **핵심 사고 과정 점검**: 각 기출 문항은 3개의 세부 문항으로 구성되어 있어, 취약점을 명확히 진단할 수 있습니다.
15+
- **손해설 및 풀이 과정 제공**: 풀이 후, 문제 해결 과정에서 필요했던 핵심 사고력을 정리하여 개념 보완을 돕습니다.
16+
- **오답 분석 및 맞춤 처방**: 세부 문항별 오답을 분석하고, 추가 학습이 필요한 개념을 처방합니다.
17+
- **교정 학습 기능**: 틀린 문제와 유사한 문제를 다시 풀며, 취약한 사고 과정을 보완하고 사고력을 강화할 수 있습니다.
1118

12-
<br/>
19+
---
1320

14-
<h2> Admin 페이지 </h2>
15-
<h3> Thymeleaf를 통해 구현한 어드민 페이지로 모의고사에 대한 정보, 정답, 정답률, 문제 이미지를 업로드할 수 있습니다. </h3>
16-
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;">
17-
<img src="https://github.com/user-attachments/assets/f9bfffc3-7708-49a4-b240-80ea71bae83e" alt="image" width="400" height="400">
18-
<img src="https://github.com/user-attachments/assets/6bf10fa0-018a-4e63-9219-442ed3843312" alt="image" width="400" height="400">
19-
<img src="https://github.com/user-attachments/assets/b255e176-8eec-4666-b190-12c6e5a3c996" alt="image" width="400" height="400">
20-
<img src="https://github.com/user-attachments/assets/26ac807a-eeab-42ab-8f66-bcb9af101ee4" alt="image" width="400" height="400">
21+
## 🛠 어드민 서비스 기능
22+
<div style="display: flex; flex-direction: column; align-items: center; gap: 10px;">
23+
<img width="900" src="https://github.com/user-attachments/assets/c5007734-4f8c-4fb4-80fe-c46a98293798" />
24+
<img width="900" src="https://github.com/user-attachments/assets/eb8342d1-1ec9-46bb-a6b0-664f87eaca8e" />
25+
<img width="900" src="https://github.com/user-attachments/assets/90d4003d-4836-4408-9dd5-d698b57c2cab" />
2126
</div>
2227

28+
- **문항 및 세부 문항 등록**: 새 문제와 세부 문항을 손쉽게 등록할 수 있습니다.
29+
- **세트 구성 및 일정 관리**: 여러 문항을 세트로 묶어 원하는 날짜에 발행 가능합니다.
30+
- **자동 배포 기능**: 발행된 세트는 사용자에게 **"오늘의 문제"**로 제공됩니다.
2331

24-
<br/>
32+
---
2533

26-
## 서버 팀원 소개
27-
|[BE 개발자 박세준](https://github.com/sejoon00)|
28-
|:--------:|
29-
|<img src="https://avatars.githubusercontent.com/u/74056843?v=4" width=200>|
34+
## 🏗 Architecture
35+
<div style="display: flex; justify-content: center;">
36+
<img width="900" src="https://github.com/user-attachments/assets/dae74b75-2c3f-436a-ac43-f09bcb1233ec" />
37+
</div>
3038

39+
- 서비스의 **안정적인 운영을 위해 prod(운영)과 dev(개발) 서버를 분리**하여 배포 및 관리하고 있습니다.
40+
41+
---
42+
43+
## 서버 팀원 소개
44+
|<img src="https://avatars.githubusercontent.com/u/74056843?v=4" width=200>|<img src="https://avatars.githubusercontent.com/u/101867059?v=4" width=200>|
45+
|:--------:|:--------:|
46+
|[BE 박세준](https://github.com/sejoon00)|[BE 홍석범](https://github.com/seokbeom00)|
47+
</br>

build.gradle

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ repositories {
2323
mavenCentral()
2424
}
2525

26+
2627
dependencies {
2728
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
2829
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
@@ -33,6 +34,10 @@ dependencies {
3334
testImplementation 'org.springframework.boot:spring-boot-starter-test'
3435
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
3536

37+
// Spring Security
38+
implementation 'org.springframework.boot:spring-boot-starter-security'
39+
testImplementation 'org.springframework.security:spring-security-test'
40+
3641
//db-h2
3742
implementation 'com.h2database:h2'
3843
testImplementation 'com.h2database:h2'
@@ -44,6 +49,28 @@ dependencies {
4449
//s3
4550
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'
4651

52+
// JWT
53+
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
54+
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
55+
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
56+
57+
// validator
58+
implementation 'commons-validator:commons-validator:1.7'
59+
60+
// Map Struct
61+
implementation 'org.mapstruct:mapstruct:1.6.3'
62+
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'
63+
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'
64+
65+
// JPA
66+
implementation 'jakarta.persistence:jakarta.persistence-api:3.1.0'
67+
implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1'
68+
69+
// QueryDSL
70+
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
71+
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
72+
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
73+
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
4774
}
4875

4976
tasks.named('test') {

docker-compose-dev.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ services:
2222
- CLOUD_AWS_REGION_STATIC=${AWS_REGION}
2323
- CLOUD_AWS_REGION_AUTO=false
2424
- CLOUD_AWS_STACK_AUTO=false
25+
- JWT_ACCESS_TOKEN_SECRET=${JWT_ACCESS_TOKEN_SECRET}
26+
- JWT_REFRESH_TOKEN_SECRET=${JWT_REFRESH_TOKEN_SECRET}
27+
- JWT_ACCESS_TOKEN_EXPIRATION_TIME=${JWT_ACCESS_TOKEN_EXPIRATION_TIME} # 기본값: 2시간
28+
- JWT_REFRESH_TOKEN_EXPIRATION_TIME=${JWT_REFRESH_TOKEN_EXPIRATION_TIME} # 기본값: 7일
29+
- JWT_ISSUER=${JWT_ISSUER}
2530

2631
depends_on:
2732
- mysql
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package com.moplus.moplus_server.domain.concept.domain;
2+
3+
import static com.querydsl.core.types.PathMetadataFactory.*;
4+
5+
import com.querydsl.core.types.dsl.*;
6+
7+
import com.querydsl.core.types.PathMetadata;
8+
import javax.annotation.processing.Generated;
9+
import com.querydsl.core.types.Path;
10+
11+
12+
/**
13+
* QConceptTag is a Querydsl query type for ConceptTag
14+
*/
15+
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
16+
public class QConceptTag extends EntityPathBase<ConceptTag> {
17+
18+
private static final long serialVersionUID = 652954745L;
19+
20+
public static final QConceptTag conceptTag = new QConceptTag("conceptTag");
21+
22+
public final com.moplus.moplus_server.global.common.QBaseEntity _super = new com.moplus.moplus_server.global.common.QBaseEntity(this);
23+
24+
//inherited
25+
public final DateTimePath<java.time.LocalDateTime> createdDate = _super.createdDate;
26+
27+
public final NumberPath<Long> id = createNumber("id", Long.class);
28+
29+
public final StringPath name = createString("name");
30+
31+
//inherited
32+
public final DateTimePath<java.time.LocalDateTime> updatedDate = _super.updatedDate;
33+
34+
public QConceptTag(String variable) {
35+
super(ConceptTag.class, forVariable(variable));
36+
}
37+
38+
public QConceptTag(Path<? extends ConceptTag> path) {
39+
super(path.getType(), path.getMetadata());
40+
}
41+
42+
public QConceptTag(PathMetadata metadata) {
43+
super(ConceptTag.class, metadata);
44+
}
45+
46+
}
47+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package com.moplus.moplus_server.domain.member.domain;
2+
3+
import static com.querydsl.core.types.PathMetadataFactory.*;
4+
5+
import com.querydsl.core.types.dsl.*;
6+
7+
import com.querydsl.core.types.PathMetadata;
8+
import javax.annotation.processing.Generated;
9+
import com.querydsl.core.types.Path;
10+
11+
12+
/**
13+
* QMember is a Querydsl query type for Member
14+
*/
15+
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
16+
public class QMember extends EntityPathBase<Member> {
17+
18+
private static final long serialVersionUID = -705761779L;
19+
20+
public static final QMember member = new QMember("member1");
21+
22+
public final com.moplus.moplus_server.global.common.QBaseEntity _super = new com.moplus.moplus_server.global.common.QBaseEntity(this);
23+
24+
//inherited
25+
public final DateTimePath<java.time.LocalDateTime> createdDate = _super.createdDate;
26+
27+
public final StringPath email = createString("email");
28+
29+
public final NumberPath<Long> id = createNumber("id", Long.class);
30+
31+
public final StringPath name = createString("name");
32+
33+
public final StringPath password = createString("password");
34+
35+
public final EnumPath<MemberRole> role = createEnum("role", MemberRole.class);
36+
37+
//inherited
38+
public final DateTimePath<java.time.LocalDateTime> updatedDate = _super.updatedDate;
39+
40+
public QMember(String variable) {
41+
super(Member.class, forVariable(variable));
42+
}
43+
44+
public QMember(Path<? extends Member> path) {
45+
super(path.getType(), path.getMetadata());
46+
}
47+
48+
public QMember(PathMetadata metadata) {
49+
super(Member.class, metadata);
50+
}
51+
52+
}
53+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.moplus.moplus_server.domain.problem.domain;
2+
3+
import static com.querydsl.core.types.PathMetadataFactory.*;
4+
5+
import com.querydsl.core.types.dsl.*;
6+
7+
import com.querydsl.core.types.PathMetadata;
8+
import javax.annotation.processing.Generated;
9+
import com.querydsl.core.types.Path;
10+
11+
12+
/**
13+
* QAnswer is a Querydsl query type for Answer
14+
*/
15+
@Generated("com.querydsl.codegen.DefaultEmbeddableSerializer")
16+
public class QAnswer extends BeanPath<Answer> {
17+
18+
private static final long serialVersionUID = 983834524L;
19+
20+
public static final QAnswer answer = new QAnswer("answer");
21+
22+
public final StringPath value = createString("value");
23+
24+
public QAnswer(String variable) {
25+
super(Answer.class, forVariable(variable));
26+
}
27+
28+
public QAnswer(Path<? extends Answer> path) {
29+
super(path.getType(), path.getMetadata());
30+
}
31+
32+
public QAnswer(PathMetadata metadata) {
33+
super(Answer.class, metadata);
34+
}
35+
36+
}
37+

0 commit comments

Comments
 (0)