Skip to content

Commit 2f73f90

Browse files
Merge pull request #516 from woowacourse-teams/develop
Release: v2.0.0
2 parents 9b78a2f + c19ecfc commit 2f73f90

File tree

248 files changed

+5855
-2683
lines changed

Some content is hidden

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

248 files changed

+5855
-2683
lines changed

โ€Ž.github/workflows/frontend-deploy-dev.yml

+22-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ name: Frontend Deploy to Dev
22

33
on:
44
push:
5-
branches: [develop]
6-
paths: frontend/**
5+
branches:
6+
- develop
7+
paths:
8+
- frontend/**
9+
- .github/**
710

811
jobs:
912
build-dockerfile:
@@ -18,8 +21,24 @@ jobs:
1821
with:
1922
node-version: '18.x'
2023

24+
- name: Cache Yarn global cache
25+
uses: actions/cache@v3
26+
with:
27+
path: '**/.yarn'
28+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-yarn-
31+
32+
- name: Cache Yarn project cache
33+
uses: actions/cache@v3
34+
with:
35+
path: '**/.yarn/cache'
36+
key: ${{ runner.os }}-yarn-project-${{ hashFiles('**/yarn.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-yarn-project-
39+
2140
- name: Install dependencies
22-
run: yarn
41+
run: yarn install --immutable
2342

2443
- name: Set up QEMU
2544
uses: docker/setup-qemu-action@v2

โ€Ž.github/workflows/frontend-deploy-prod.yml

+22-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ name: Frontend Deploy to Prod
22

33
on:
44
push:
5-
branches: [main]
6-
paths: frontend/**
5+
branches:
6+
- main
7+
paths:
8+
- frontend/**
9+
- .github/**
710

811
jobs:
912
build-dockerfile:
@@ -18,8 +21,24 @@ jobs:
1821
with:
1922
node-version: '18.x'
2023

24+
- name: Cache Yarn global cache
25+
uses: actions/cache@v3
26+
with:
27+
path: '**/.yarn'
28+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-yarn-
31+
32+
- name: Cache Yarn project cache
33+
uses: actions/cache@v3
34+
with:
35+
path: '**/.yarn/cache'
36+
key: ${{ runner.os }}-yarn-project-${{ hashFiles('**/yarn.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-yarn-project-
39+
2140
- name: Install dependencies
22-
run: yarn
41+
run: yarn install --immutable
2342

2443
- name: Set up QEMU
2544
uses: docker/setup-qemu-action@v2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Frontend Storybook Deploy To S3
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
paths:
8+
- frontend/**
9+
- .github/**
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-22.04
14+
defaults:
15+
run:
16+
working-directory: ./frontend
17+
concurrency:
18+
group: ${{ github.workflow }}
19+
cancel-in-progress: true
20+
21+
steps:
22+
- name: Use repository source
23+
uses: actions/checkout@v3
24+
25+
- name: Use node.js
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: 18.x
29+
30+
- name: Cache Yarn global cache
31+
uses: actions/cache@v3
32+
with:
33+
path: '**/.yarn'
34+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-yarn-
37+
38+
- name: Cache Yarn project cache
39+
uses: actions/cache@v3
40+
with:
41+
path: '**/.yarn/cache'
42+
key: ${{ runner.os }}-yarn-project-${{ hashFiles('**/yarn.lock') }}
43+
restore-keys: |
44+
${{ runner.os }}-yarn-project-
45+
46+
- name: Install dependencies
47+
run: yarn install --immutable
48+
49+
- name: Build Storybook
50+
run: yarn build:sb
51+
52+
- name: Upload storybook build files to temp artifact
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: Storybook
56+
path: frontend/storybook-static
57+
deploy:
58+
needs: build
59+
runs-on: front-dev-server
60+
steps:
61+
- name: Remove previous version app
62+
working-directory: .
63+
run: rm -rf frontend/storybook
64+
65+
- name: Download the built file to AWS EC2
66+
uses: actions/download-artifact@v3
67+
with:
68+
name: Storybook
69+
path: frontend/storybook
70+
71+
- name: Upload to S3
72+
run: |
73+
aws s3 sync frontend/storybook s3://2023-team-project/2023-zipgo/storybook --delete

โ€ŽREADME.md

+39-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,43 @@
1-
# 2023-zipgo
1+
<p align="center">
2+
<img src="https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/e7eefb82-4bbf-47cd-a6ef-dc756d97c77d" alt="์ง‘๊ณ  README ๋ฐฐ๋„ˆ" />
3+
<p align="center">
4+
<img src="https://img.shields.io/badge/react-v18.2.0-9cf?logo=react" alt="react v18.2.0" />
5+
<img src="https://img.shields.io/badge/spring_boot-v3.1.1-green?logo=springbootโ€ alt="spring-boot v3.1.1" />
6+
<img src="https://img.shields.io/badge/typescript-v5.1.6-blue?logo=typescriptโ€ alt="typescript v5.1.6"/>
7+
<img src="https://img.shields.io/badge/mysql-v8.0.34-blue?logo=mysql" alt="mysql v8.0.34"/>
8+
</p>
29

3-
## ๋ฉค๋ฒ„
10+
**์ดˆ๋ณด ์ง‘์‚ฌ์˜ ๋ฐ˜๋ ค๋™๋ฌผ ์‹ํ’ˆ ์„ ํƒ์„ ๋„์™€์ฃผ๋Š” ์„œ๋น„์Šค**, ์ง‘์‚ฌ์˜๊ณ ๋ฏผ์ž…๋‹ˆ๋‹ค.
411

5-
| Frontend | Frontend | Frontend |
6-
| :--------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------: |
7-
| <img src="https://avatars.githubusercontent.com/u/24777828?v=4" width=100px alt="์ฒต์Šค"/> | <img src="https://avatars.githubusercontent.com/u/79056677?v=4" width=100px alt="๋…ธ์•„์ด์ฆˆ"/> | <img src="https://avatars.githubusercontent.com/u/72087183?v=4" width=100px alt="์—๋””"/> |
8-
| [์ฒต์Šค](https://github.com/HyeryongChoi) | [๋…ธ์•„์ด์ฆˆ](https://github.com/n0eyes) | [์—๋””](https://github.com/ksone02)
12+
์ „๋ฌธ๊ฐ€๋“ค์˜ ์‚ฌ๋ฃŒ ์„ ํƒ ๊ธฐ์ค€์€ ๋ฌด์—‡์ผ๊นŒ์š”?
913

14+
๋‹ค์–‘ํ•œ ์ „๋ฌธ๊ฐ€๋“ค์ด ์ธ์ •ํ•˜๋Š” [์ข‹์€ ์‚ฌ๋ฃŒ ์„ ํƒ ๊ธฐ์ค€]([https://translucent-mallet-426.notion.site/dae305b85c8146399d7de6a0e74b773d](https://www.notion.so/dae305b85c8146399d7de6a0e74b773d?pvs=21)), **์ง‘์‚ฌ์˜ ๊ณ ๋ฏผ**์—์„œ ํ™•์ธํ•˜์„ธ์š”!
1015

11-
| Backend | Backend | Backend | Backend |
12-
|:--------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------:|:----------------------------------:| :----------------------------------:|
13-
| <img src="https://avatars.githubusercontent.com/u/73161212?v=4" width=100px alt="๊ฐ€๋น„"/> | <img src="https://avatars.githubusercontent.com/u/76938931?v=4" width=100px alt="๋ฌด๋ฏผ"/> | <img src="https://avatars.githubusercontent.com/u/94087228?v=4" width=100px alt="๋ฒ ๋ฒ "/> | <img src="https://avatars.githubusercontent.com/u/61582017?v=4" width=100px alt="๋กœ์ง€"/> |
14-
| [๊ฐ€๋น„](https://github.com/iamjooon2) | [๋ฌด๋ฏผ](https://github.com/parkmuhyeun) | [๋ฒ ๋ฒ ](https://github.com/wonyongChoi05) | [๋กœ์ง€](https://github.com/kyY00n)
16+
- [zipgo.pet](https://zipgo.pet)
17+
- [zipgo.wiki](https://github.com/woowacourse-teams/2023-zipgo/wiki)
18+
19+
# Skills
20+
21+
### Frontend Tech Stack
22+
![Frontend Tech Stacks](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/4372f950-d29e-46a0-807c-79d78a7f6913)
23+
24+
### Backend Tech Stack
25+
![Backend Tech Stacks](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/a4643676-e669-43f5-9bb4-d2f4e92ed470)
26+
27+
# Infra Structure
28+
![Zigo Infra](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/09847ae1-2aac-41a1-9302-4a2b49a284e0)
29+
30+
31+
### Frontend Infra Structure
32+
![image](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/eac9e8af-2df3-486a-9812-6a39ab36eb4e)
33+
34+
### Backend Infra Structure
35+
![image](https://github.com/woowacourse-teams/2023-zipgo/assets/24777828/c6b9ec96-1301-4088-98d1-1e1ec1d3b334)
36+
37+
38+
# Member
39+
40+
| [์ฒต์Šค](https://github.com/HyeryongChoi) | [๋…ธ์•„์ด์ฆˆ](https://github.com/n0eyes) | [์—๋””](https://github.com/ksone02) | [๊ฐ€๋น„](https://github.com/iamjooon2) | [๋ฌด๋ฏผ](https://github.com/parkmuhyeun) | [๋ฒ ๋ฒ ](https://github.com/wonyongChoi05) | [๋กœ์ง€](https://github.com/kyY00n) |
41+
| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
42+
| <img src="https://avatars.githubusercontent.com/u/24777828?v=4" width=200px alt="์ฒต์Šค" /> | <img src="https://avatars.githubusercontent.com/u/79056677?v=4" width=200px alt="๋…ธ์•„์ด์ฆˆ" /> | <img src="https://avatars.githubusercontent.com/u/72087183?v=4" width=200px alt="์—๋””" /> | <img src="https://avatars.githubusercontent.com/u/73161212?v=4" width=200px alt="๊ฐ€๋น„" /> | <img src="https://avatars.githubusercontent.com/u/76938931?v=4" width=200px alt="๋ฌด๋ฏผ" /> | <img src="https://avatars.githubusercontent.com/u/94087228?v=4" width=200px alt="๋ฒ ๋ฒ "/> | <img src="https://avatars.githubusercontent.com/u/61582017?v=4" width=200px alt="๋กœ์ง€" /> |
43+
| Frontend | Frontend | Frontend | Backend | Backend | Backend | Backend |

โ€Žbackend/build.gradle

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ dependencies {
5252
compileOnly 'org.projectlombok:lombok'
5353
annotationProcessor 'org.projectlombok:lombok'
5454

55+
implementation group: 'com.datadoghq', name: 'dd-trace-api', version: '1.21.0'
56+
5557
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
5658
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
5759
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
@@ -110,6 +112,7 @@ jacocoTestReport {
110112
'**/*Response*',
111113
'**/*Request*',
112114
'**/BaseTimeEntity',
115+
'**/KakaoOAuthClient',
113116
'**/*Dto*',
114117
'**/S3*',
115118
'**/*Interceptor*',
@@ -149,6 +152,7 @@ jacocoTestCoverageVerification {
149152
'*.*Exception*',
150153
'*.*Dto',
151154
'*.S3*',
155+
'*.KakaoOAuthClient*',
152156
'*.*Response',
153157
'*.*Request',
154158
'*.BaseTimeEntity',

โ€Žbackend/deploy-dev.sh

-28
This file was deleted.

โ€Žbackend/deploy-prod.sh

-28
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package zipgo.aspect;
2+
3+
import org.springframework.web.context.request.RequestContextHolder;
4+
5+
import java.lang.reflect.InvocationHandler;
6+
import java.lang.reflect.Method;
7+
8+
public class ConnectionProxyHandler implements InvocationHandler {
9+
10+
private static final String QUERY_PREPARE_STATEMENT = "prepareStatement";
11+
12+
private final Object connection;
13+
private final QueryCounter queryCounter;
14+
15+
public ConnectionProxyHandler(Object connection, QueryCounter queryCounter) {
16+
this.connection = connection;
17+
this.queryCounter = queryCounter;
18+
}
19+
20+
@Override
21+
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
22+
countQuery(method);
23+
return method.invoke(connection, args);
24+
}
25+
26+
private void countQuery(Method method) {
27+
if (isPrepareStatement(method) && isRequest()) {
28+
queryCounter.increaseCount();
29+
}
30+
}
31+
32+
private boolean isPrepareStatement(Method method) {
33+
return method.getName().equals(QUERY_PREPARE_STATEMENT);
34+
}
35+
36+
private boolean isRequest() {
37+
return RequestContextHolder.getRequestAttributes() != null;
38+
}
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package zipgo.aspect;
2+
3+
import lombok.Getter;
4+
import org.springframework.stereotype.Component;
5+
import org.springframework.web.context.annotation.RequestScope;
6+
7+
@Getter
8+
@Component
9+
@RequestScope
10+
public class QueryCounter {
11+
12+
private int count;
13+
14+
public void increaseCount() {
15+
count++;
16+
}
17+
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package zipgo.aspect;
2+
3+
import lombok.RequiredArgsConstructor;
4+
import org.aspectj.lang.ProceedingJoinPoint;
5+
import org.aspectj.lang.annotation.Around;
6+
import org.aspectj.lang.annotation.Aspect;
7+
import org.springframework.stereotype.Component;
8+
9+
import java.lang.reflect.Proxy;
10+
11+
@Aspect
12+
@Component
13+
@RequiredArgsConstructor
14+
public class QueryCounterAop {
15+
16+
private final QueryCounter queryCounter;
17+
18+
@Around("execution(* javax.sql.DataSource.getConnection(..))")
19+
public Object getConnection(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
20+
Object connection = proceedingJoinPoint.proceed();
21+
22+
return Proxy.newProxyInstance(
23+
connection.getClass().getClassLoader(),
24+
connection.getClass().getInterfaces(),
25+
new ConnectionProxyHandler(connection, queryCounter)
26+
);
27+
}
28+
29+
}

0 commit comments

Comments
ย (0)