Skip to content

Commit

Permalink
[release] : 갤러리 도메인, 애플 로그인 (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb authored Mar 4, 2024
2 parents 7e771cb + f3cb875 commit 71637d1
Show file tree
Hide file tree
Showing 107 changed files with 3,094 additions and 236 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/accept-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-release-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Setup opnenjdk-11
- name: Setup opnenjdk-17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-stage-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Setup opnenjdk-11
- name: Setup opnenjdk-17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,40 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: docker setup
uses: docker-practice/actions-setup-docker@master

- name: docker network setup
run: docker network create e2e-net

- name: run dbms
run: docker run --rm -it --name database --network e2e-net -e MYSQL_ROOT_PASSWORD=0000 -e MYSQL_DATABASE=luffy -d mysql:8.0.33

- name: build nalab-server
run: ./gradlew clean build

- name: build nalab-server-docker-image
run: docker build --tag luffy:e2e --build-arg DB_URL=jdbc:mysql://database:3306/luffy --build-arg DB_USERNAME=root --build-arg DB_PASSWORD=0000 --build-arg JWT_SECRET=fore2e .

- name: run nalab-server
run: docker run --rm -it --name nalab-server --network e2e-net -d luffy:e2e

- name: build hurl image
run: docker build --tag hurl:e2e support/e2e/

- name: e2e test
run: docker run --rm --network e2e-net hurl:e2e
4 changes: 2 additions & 2 deletions .github/workflows/unit-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11.0.11-jre-slim
FROM openjdk:17-jdk-slim

ARG JAR_FILE=./api/build/libs/*-SNAPSHOT.jar
ARG DB_URL
Expand Down
198 changes: 183 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,183 @@
# 13th-3team-server


[![SonarCloud](https://sonarcloud.io/images/project_badges/sonarcloud-white.svg)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=coverage)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=bugs)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
# Na Lab <img src="https://github.com/depromeet/na-lab-server/assets/71487608/7975a91f-83e2-4dd3-88f0-e5d9d429cd8f" align=left width=100>

> 동료의 익명 피드백을 통한 나의 커리어 브랜딩, Na Lab &nbsp;&nbsp; • <b>백엔드</b> 레포지토리

</br>



[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=coverage)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=depromeet_na-lab-server&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=depromeet_na-lab-server)
[![e2e test](https://github.com/depromeet/na-lab-server/actions/workflows/e2e.yml/badge.svg)](https://github.com/depromeet/na-lab-server/actions/workflows/e2e.yml)

<br/>

### 🧐 Na Lab ?

**오직 나만을 위한 커리어 연구실, Na Lab 🧬🧪**
‘Na Lab’은 동료의 익명 피드백을 통해 나의 직무 강점을 발견하는 서비스입니다.

### 👉 [Na Lab 바로가기](https://www.nalab.me/)

---

</br>


<img src ="https://github.com/oyeon-kwon/personal_color/assets/61301574/e5acce5d-a9b9-4200-bc3c-7e6846b89702" alt="na lab" width="1000" height="750" />
<img src ="https://github.com/depromeet/na-lab-client/assets/26461307/02ec7d6a-4a82-4d0a-9c5a-1eaa0de7d166" alt="na lab" width="1000" />

> 나의 커리어 브랜딩을 완성해주는 기본질문을 통해 손쉽게 질문폼을 만들 수 있어요
> 새로운 질문을 추가하고 싶다면 객관식, 주관식으로 자유롭게 질문을 만들어보세요!
<br />

<br />

<img src ="https://github.com/oyeon-kwon/personal_color/assets/61301574/16b0b65b-69ef-4915-a7be-c5ea9b1335ba" alt="na lab" width="1000" height="750" />
<img src = "https://github.com/depromeet/na-lab-client/assets/26461307/53664ba1-0970-4054-9b49-8071f0a4bf6c" alt="na lab" width="1000" />

> 부담스러웠던 동료 평가의 경험을 마치 친구와 심리테스트 하듯 즐겁게 할 수 있도록 설계했어요
> 나랩의 연구를 책임지는 Dr. 왓슨 박사님과 함께 채팅으로 대화하며 익명으로 피드백을 남길 수 있어요
<br />

<br />


<img src ="https://github.com/oyeon-kwon/personal_color/assets/61301574/f6ae2893-0969-4122-a76a-dca99555d6f0" alt="na lab" width="1000" height="750" />
<img src ="https://github.com/depromeet/na-lab-client/assets/26461307/459be0a9-1ba9-4d75-9a33-b36ed1747db8" alt="na lab" width="1000" />

> 많은 사람들의 답변 속에서 정말 나에게 도움이 되는 피드백은 어느 것일까요?
> 나랩은 유저가 개별 답변에 대한 이해도를 높이며 의미 있는 피드백을 얻을 수 있도록 결과를 정리했어요
<br />

<br />

<img src ="https://github.com/oyeon-kwon/personal_color/assets/61301574/35ce40d7-c57c-4f61-80c9-6f7d643f0fe1" alt="na lab" width="1000" height="750" />

> 피드백 결과를 통해 나의 커리어 연구 결과를 확인할 수 있고,
> 동료들의 피드백을 저장해 나만의 커리어 명함을 만들 수 있어요

<br />

<br />

![추가이미지1](https://github.com/depromeet/na-lab-client/assets/26461307/53c6a91b-d029-4fd9-acad-647a771507e3)

![추가이미지2](https://github.com/depromeet/na-lab-client/assets/26461307/27586832-3bd7-4cbb-a659-1e446ed996d3)

</br>

---

## 😎 Develoment Description

- 안정성과 유지보수를 위해서 단위테스트, 통합테스트, E2E 테스트를 모두 짜는 전략으로 진행
- 테스트 커버리는 분기와 라인 커버리지를 모두 검증하였으며 ***테스트 커버리지 93.7%를 달성***
- 특히, E2E 테스트를 통해 실제 사용자의 여러 시나리오를 테스트함으로써 애플리케이션의 무결성을 검증하고자 하였으며
도입 이후 2차 MVP의 QA 에서 ***버그 제로 달성***
- 유연하고 확장가능한 서비스를 위해 멀티모듈과 헥사고날 아키텍처를 적용
- E2E 부터 깃허브 라벨링, PR 알람 등의 가능한 모든 작업을 자동화시켜 팀의 생산성 증대

</br>

## 🏛️ System Architecture

![아키텍처이미지](https://github.com/oyeon-kwon/personal_color/assets/61301574/794d7625-f63f-418f-b03a-a7ab396f015b)

</br>

## 📚 Tech Stack

<div align="left">
<div>
<img src="https://img.shields.io/badge/Spring Boot-6DB33F?style=flat-square&logo=Spring Boot&logoColor=white">
<img src="https://img.shields.io/badge/Gradle-02303A?style=flat-square&logo=Gradle&logoColor=white">
</div>

<div>
<img src="https://img.shields.io/badge/MySQL-4479A1.svg?style=flat-square&logo=MySQL&logoColor=white">
<img src="https://img.shields.io/badge/Amazon RDS-527FFF?style=flat-square&logo=Amazon RDS&logoColor=white">
</div>

<div>
<img src="https://img.shields.io/badge/Amazon AWS-232F3E?style=flat-square&logo=Amazon AWS&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/JSON Web Tokens-000000?style=flat-square&logo=JSON Web Tokens&logoColor=white">
</div>

<div>
<img src="https://img.shields.io/badge/SonarCloud-F3702A?style=flat-square&logo=SonarCloud&logoColor=white">
<img src="https://img.shields.io/badge/-HURL-black?style=flat-square&logo=curl">
</div>

<div>
<img src="https://img.shields.io/badge/Slack-4A154B?style=flat-square&logo=slack&logoColor=white">
<img src="https://img.shields.io/badge/Notion-000000?style=flat&logo=notion&logoColor=white">
</div>


</div>

<br/>

## 🧑🏻‍💻 Developers

<table>
<tr align="center">
<td><B>Backend</B></td>
<td><B>Backend</B></td>
<td><B>Backend</B></td>
</tr>
<tr align="center">
<td><B>이준영</B></td>
<td><B>이수진</B></td>
<td><B>유도진</B></td>
</tr>
<tr align="center">
<td>
<img src="https://github.com/devxb.png?size=100">
<br>
<a href="https://github.com/devxb"><I>devxb</I></a>
</td>
<td>
<img src="https://github.com/ssssujini99.png?size=100" width="100">
<br>
<a href="https://github.com/ssssujini99"><I>ssssujini99</I></a>
</td>
<td>
<img src="https://github.com/dojinyou.png?size=100" width="100">
<br>
<a href="https://github.com/dojinyou"><I>dojinyou</I></a>
</td>
</tr>
<tr align="center">
<td>
<img src="https://github.com/depromeet/na-lab-server/assets/71487608/b63d382b-a879-483b-9efb-bb6652811911" width="100" height="75">
<br>
<a href="https://www.nalab.me/dna/459013095722156718"><I>devxb의 커리어 명함</I></a>
</td>
<td>
<img src="https://github.com/depromeet/na-lab-server/assets/71487608/263d7e89-4d4b-45d0-b595-528beecaf730" width="100" height="75">
<br>
<a href="https://www.nalab.me/dna/468088240919167918"><I>ssssujini99의 커리어 명함</I></a>
</td>
<td>
<img src="https://github.com/depromeet/na-lab-server/assets/71487608/b63d382b-a879-483b-9efb-bb6652811911" width="100" height="75">
<br>
<a href="https://www.nalab.me/dna/467660084072569641"><I>dojinyou의 커리어 명함</I></a>
</td>
</tr>
</table>


</br>


![추가이미지3](https://github.com/depromeet/na-lab-server/assets/71487608/09a06bb1-4f06-4513-977d-e6fe49bd8f06)
1 change: 1 addition & 0 deletions api/acceptance-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies {
testImplementation project(':user:user-application')
testImplementation project(':user:user-jpa-adapter')
testImplementation project(':user:user-web-adaptor')
testImplementation project(':gallery')

testImplementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public Long saveTargetAndGetId(String name, Instant date) {
.nickname(name)
.createdAt(date)
.updatedAt(date)
.imageUrl("empty image")
.build();
entityManager.persist(targetEntity);
return targetEntity.getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@
import me.nalab.luffy.api.acceptance.test.feedback.create.response.SurveyFindResponse;
import me.nalab.luffy.api.acceptance.test.survey.RequestSample;
import org.json.JSONObject;

import static me.nalab.luffy.api.acceptance.test.feedback.FeedbackAcceptanceValidator.*;
import static me.nalab.luffy.api.acceptance.test.feedback.FeedbackCreateRequestFixture.*;

import java.time.Instant;
import java.util.Map;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ public abstract class AbstractSurveyTestSupporter {
private static final String API_VERSION = "/v1";
private static final Set<String> tableNameSet = Set.of("target", "survey", "form_question", "choice");

protected ResultActions bookmarkSurvey(String token, Long surveyId) throws Exception {
return mockMvc.perform(MockMvcRequestBuilders
.post("/{version}/surveys/{surveyId}/bookmarks", "v1", surveyId)
.accept(MediaType.APPLICATION_JSON)
.header(HttpHeaders.AUTHORIZATION, token));
}

protected ResultActions createSurvey(String token, String content) throws Exception {
return mockMvc.perform(MockMvcRequestBuilders
.post(API_VERSION + "/surveys")
Expand Down Expand Up @@ -53,6 +60,15 @@ protected ResultActions findTargetBySurveyId(Long survey_Id) throws Exception {
);
}

protected ResultActions existsSurveyByToken(String token) throws Exception {
return mockMvc.perform(MockMvcRequestBuilders
.get(API_VERSION + "/surveys/exists")
.header("Authorization", token)
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON)
);
}

@Autowired
final void setMockMvc(MockMvc mockMvc) {
this.mockMvc = mockMvc;
Expand Down
Loading

0 comments on commit 71637d1

Please sign in to comment.