diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..784f24d
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,26 @@
+root = true
+
+[*]
+# [encoding-utf8]
+charset = utf-8
+end_of_line = lf
+
+# [newline-eof]
+insert_final_newline = true
+
+[*.bat]
+end_of_line = crlf
+
+[*.java]
+# [indentation-tab]
+indent_style = tab
+
+# [4-spaces-tab]
+indent_size = 4
+tab_width = 4
+
+# [no-trailing-spaces]
+trim_trailing_whitespace = true
+
+[line-length-120]
+max_line_length = 120
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..8bdaa74
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,7 @@
+*.png binary
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.bat text merge=union eol=crlf
+* text=auto eol=lf
+*.java text eol=lf
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..6b950dc
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,126 @@
+name: 'People Here Dev Build'
+
+on:
+ workflow_call:
+ inputs:
+ environment:
+ type: string
+ required: true
+ COMMIT_MESSAGE:
+ type: string
+ required: true
+ API_SERVER:
+ required: true
+ type: string
+ STAGE:
+ required: true
+ type: string
+ FORCE_REBUILD:
+ required: false
+ type: boolean
+ outputs:
+ APP_VERSION:
+ value: ${{ jobs.build.outputs.APP_VERSION }}
+ CACHE_KEY:
+ value: ${{ jobs.build.outputs.CACHE_KEY }}
+
+env:
+ STAGE: ${{ inputs.STAGE }}
+ API_SERVER: ${{ inputs.API_SERVER}}
+ CACHE_KEY: ${{ github.ref }}-${{ inputs.environment }}-${{ github.sha }}
+
+jobs:
+ build:
+ name: Build & Test
+ environment: ${{ inputs.environment }}
+ runs-on: ubuntu-latest
+ outputs:
+ APP_VERSION: ${{ steps.app-version.outputs.APP_VERSION }}
+ CACHE_KEY: ${{ env.CACHE_KEY }}
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Start
+ run: |
+ echo "\
+ ___ __ __ __
+ /\_ \ /\ \ /\ \ /\ \
+ _____ __ ___ _____ \//\ \ __ \ \ \___ __ _ __ __ \ \ \ \ \ \
+ /\ '__`\ /'__`\ / __`\ /\ '__`\ \ \ \ /'__`\ \ \ _ `\ /'__`\ /\`'__\ /'__`\ \ \ \ \ \ \
+ \ \ \L\ \/\ __/ /\ \L\ \\ \ \L\ \ \_\ \_ /\ __/ \ \ \ \ \ /\ __/ \ \ \/ /\ __/ \ \_\ \ \_\
+ \ \ ,__/\ \____\\ \____/ \ \ ,__/ /\____\\ \____\ \ \_\ \_\\ \____\ \ \_\ \ \____\ \/\_\ \/\_\
+ \ \ \/ \/____/ \/___/ \ \ \/ \/____/ \/____/ \/_/\/_/ \/____/ \/_/ \/____/ \/_/ \/_/
+ \ \_\ \ \_\
+ \/_/ \/_/"
+ shell: bash
+
+ - name: 버전 세팅
+ id: app-version
+ run: |
+ BUILD_DATE=$(TZ=Asia/Seoul date +'%Y-%m-%d-%H-%M')
+
+ case ${BRANCH_NAME} in
+ "main"|"staging"|"develop")
+ APP_VERSION="${STAGE:0:1}-${BUILD_DATE}"
+ ;;
+ "feature/"*)
+ ISSUE_NAME=$(echo "${BRANCH_NAME}" | sed -n 's/.*\(PH-[0-9]*\).*/\1/p')
+ APP_VERSION="${ISSUE_NAME}-${BUILD_DATE}"
+ ;;
+ *)
+ APP_VERSION="${STAGE}-${{ github.run_id }}"
+ ;;
+ esac
+
+ echo "APP_VERSION=${APP_VERSION}" | tee -a $GITHUB_ENV >> $GITHUB_OUTPUT
+ echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT
+ shell: bash
+ env:
+ BRANCH_NAME: ${{ github.ref_name }}
+ STAGE: ${{ env.STAGE }}
+
+ - name: 캐시 재사용 체크
+ uses: actions/cache/restore@v4
+ if: inputs.FORCE_REBUILD != true
+ id: artifact-cache-restore
+ with:
+ path: |
+ .build/jar/*.jar
+ key: ${{ env.CACHE_KEY }}
+
+ - name: 버전정보 캐시정보 출력
+ run: |
+ echo "# 앱 버전 APP_VERSION [ ${{ env.APP_VERSION }} ]"
+ if [ "${{ steps.artifact-cache-restore.outputs.cache-hit }}" == "true" ]; then
+ echo "### 캐시 ✅ (key: ${{ env.CACHE_KEY }})" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "### 캐시 없음 ❎ (key: ${{ env.CACHE_KEY }})" >> $GITHUB_STEP_SUMMARY
+ fi
+ echo "" >> $GITHUB_STEP_SUMMARY
+ echo "" >> $GITHUB_STEP_SUMMARY
+
+ # java 셋업
+ - name: Set up JDK 21
+ if: steps.artifact-cache-restore.outputs.cache-hit != 'true'
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'corretto'
+ java-version: '21'
+
+ # gradle caching
+ - uses: actions/cache@v4
+ name: Setup gradle cache
+ with:
+ path: |
+ ~/.gradle/caches
+ ~/.gradle/wrapper
+ key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
+ restore-keys: |
+ ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
+ ${{ runner.os }}-gradle-
+
+ - name: API 빌드 - JAR
+ if: steps.artifact-cache-restore.outputs.cache-hit != 'true'
+ uses: gradle/gradle-build-action@v2
+ with:
+ arguments: -i :module-api:build
diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml
new file mode 100644
index 0000000..c996076
--- /dev/null
+++ b/.github/workflows/develop.yml
@@ -0,0 +1,41 @@
+name: 3. Develop 🚀
+
+on:
+ workflow_dispatch:
+ inputs:
+ deploy-api:
+ description: Develop API 서버 배포 🎉🤣
+ type: boolean
+ required: false
+ force-rebuild:
+ description: 강제 빌드
+ type: boolean
+ required: false
+
+ push:
+ branches:
+ - develop
+ # - 'feature/**'
+ pull_request:
+ branches:
+ - develop
+
+# https://github.com/gradle/gradle-build-action#caching
+permissions:
+ contents: write
+
+jobs:
+ build:
+ name: 빌드 & 테스트
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+ uses: ./.github/workflows/build.yml
+ with:
+ environment: develop
+ COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
+ API_SERVER: https://dev.peoplehere.world
+ STAGE: develop
+ FORCE_REBUILD: ${{ inputs.force-rebuild == true }}
+ secrets: inherit
+
diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml
new file mode 100644
index 0000000..2f04316
--- /dev/null
+++ b/.github/workflows/production.yml
@@ -0,0 +1,56 @@
+name: 1. Production
+
+on:
+ workflow_dispatch:
+ inputs:
+ deploy-api:
+ description: Production API 서버 배포 🎉🤣
+ type: boolean
+ required: false
+ force-rebuild:
+ description: 강제 빌드
+ type: boolean
+ required: false
+ version-to-upgrade:
+ description: 배포 버전 업그레이드
+ type: choice
+ required: true
+ options:
+ - major
+ - minor
+ - patch
+ default: patch
+
+ push:
+ branches:
+ - main
+
+# https://github.com/gradle/gradle-build-action#caching
+permissions:
+ contents: write
+
+jobs:
+ build:
+ name: 빌드 & 테스트
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+ uses: ./.github/workflows/build.yml
+ with:
+ environment: production
+ COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
+ API_SERVER: https://prod.peoplehere.world
+ STAGE: production
+ FORCE_REBUILD: ${{ inputs.force-rebuild == true }}
+ secrets: inherit
+
+ release:
+ if: ${{ github.event_name == 'workflow_dispatch' }}
+ name: 릴리즈
+ uses: ./.github/workflows/release.yml
+ with:
+ environment: production
+ STAGE: production
+ CACHE_KEY: ${{ needs.build.outputs.CACHE_KEY }}
+ VERSION_TO_UPGRADE: ${{ github.event.inputs.version-to-upgrade }}
+ secrets: inherit
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..af26451
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,117 @@
+name: 'peoplehere-release'
+
+on:
+ workflow_call:
+ inputs:
+ environment:
+ type: string
+ required: true
+ STAGE:
+ type: string
+ required: true
+ CACHE_KEY:
+ type: string
+ required: true
+ VERSION_TO_UPGRADE: # major.minor.patch
+ type: string
+ required: true
+ outputs:
+ APP_VERSION:
+ value: ${{ jobs.release.outputs.APP_VERSION }}
+ CACHE_KEY:
+ value: ${{ jobs.release.outputs.CACHE_KEY }}
+
+env:
+ owner: People-Here
+ repo: people-here-dev
+
+jobs:
+ release:
+ name: Release New Version
+ environment: ${{ inputs.environment }}
+ runs-on: ubuntu-latest
+ outputs:
+ APP_VERSION: ${{ env.new-version }}-${{ env.release-date }}
+ CACHE_KEY: ${{ inputs.CACHE_KEY }}
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: 캐시 불러오기
+ uses: actions/cache/restore@v3
+ id: artifact-cache-restore
+ with:
+ path: |
+ .build/jar/*.jar
+ key: ${{ inputs.CACHE_KEY }}
+
+ - name: Set Release Date
+ run: |
+ echo "release-date=$(TZ=Asia/Seoul date +'%Y-%m-%d')" >> $GITHUB_ENV
+
+ - name: 최신 릴리즈 버전 조회
+ id: get-latest-release
+ env:
+ GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
+ run: |
+ OLD_RELEASE=$(gh api \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ /repos/${{ env.owner }}/${{ env.repo }}/releases/latest)
+
+ echo "old-release=${OLD_RELEASE}" >> $GITHUB_ENV
+ continue-on-error: true
+
+ - name: 릴리즈 버전 조회 실패 시 최초 릴리즈로 간주
+ if: ${{ steps.get-latest-release.outcome != 'success' }}
+ run: |
+ NEW_VERSION="v1.0.0"
+ echo "new-version=${NEW_VERSION}" >> $GITHUB_ENV
+
+ - name: 버전업
+ if: ${{ steps.get-latest-release.outcome == 'success' }}
+ run: |
+ OLD_VERSION=${{ fromJson(env.old-release).tag_name }}
+ echo "OLD_VERSION: ${OLD_VERSION}"
+
+ MAJOR=$(echo $OLD_VERSION | cut -d. -f1 | sed 's/v//')
+ MINOR=$(echo $OLD_VERSION | cut -d. -f2)
+ PATCH=$(echo $OLD_VERSION | cut -d. -f3)
+ echo "major: $MAJOR, minor: $MINOR, patch: $PATCH"
+
+ INCREMENT_TYPE=${{ inputs.VERSION_TO_UPGRADE }}
+ if [ "$INCREMENT_TYPE" == "major" ]; then
+ echo "upgrading major version"
+ MAJOR=$((++MAJOR))
+ MINOR=0
+ PATCH=0
+ elif [ "$INCREMENT_TYPE" == "minor" ]; then
+ echo "upgrading minor version"
+ MINOR=$((++MINOR))
+ PATCH=0
+ elif [ "$INCREMENT_TYPE" == "patch" ]; then
+ echo "upgrading patch version"
+ PATCH=$((++PATCH))
+ else
+ echo "Invalid increment type!"
+ exit 1
+ fi
+
+ echo "NEW_VERSION: v$MAJOR.$MINOR.$PATCH"
+ NEW_VERSION="v$MAJOR.$MINOR.$PATCH"
+ echo "new-version=${NEW_VERSION}" >> $GITHUB_ENV
+
+ - name: 버전업 태그 생성
+ env:
+ GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
+ run: |
+ NEW_RELEASE=$(gh api \
+ --method POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ /repos/${{ env.owner }}/${{ env.repo }}/releases \
+ -f tag_name=${{ env.new-version }} \
+ -f target_commitish='main' \
+ -f name=${{ env.new-version }} \
+ -f body='${{ env.new-version }} release')
+
+ echo "new-release=${NEW_RELEASE}" >> $GITHUB_ENV
diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml
new file mode 100644
index 0000000..13a4303
--- /dev/null
+++ b/.github/workflows/staging.yml
@@ -0,0 +1,37 @@
+name: 2. Staging 🚀
+
+on:
+ workflow_dispatch:
+ inputs:
+ deploy-api:
+ description: Staging API 서버 배포 🎉🤣
+ type: boolean
+ required: false
+ force-rebuild:
+ description: 강제 빌드
+ type: boolean
+ required: false
+
+ push:
+ branches:
+ - staging
+
+# https://github.com/gradle/gradle-build-action#caching
+permissions:
+ contents: write
+
+jobs:
+ build:
+ name: 빌드 & 테스트
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+ uses: ./.github/workflows/build.yml
+ with:
+ environment: staging
+ COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
+ API_SERVER: https://stg.peoplehere.world
+ STAGE: develop
+ FORCE_REBUILD: ${{ inputs.force-rebuild == true }}
+ secrets: inherit
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e993330
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,56 @@
+.gradle
+build/
+!gradle/wrapper/gradle-wrapper.jar
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### IntelliJ IDEA ###
+.idea
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
+
+.system
+.build
+
+local.properties
+
+**/src/main/generated
+*.pid
+*.log
+*.http
+
+module-api/src/main/resources/application-api-local.yml
+module-shared/src/main/resources/application-shared-local.yml
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..8a788a7
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,225 @@
+plugins {
+ id 'java'
+ id 'org.springframework.boot' version '3.2.4'
+ id 'io.spring.dependency-management' version '1.1.4'
+
+ // checkstyle
+ id 'checkstyle'
+
+ // jacoco
+ id 'jacoco'
+}
+
+tasks.named('bootJar') {
+ enabled = false
+}
+
+tasks.named('jar') {
+ enabled = false
+}
+
+ext["testcontainersVersion"] = "1.19.6"
+
+subprojects {
+ group = 'com.peoplehere'
+ version = '0.0.1-SNAPSHOT'
+ sourceCompatibility = '21'
+
+ apply plugin: 'java'
+ apply plugin: 'java-library'
+ apply plugin: 'org.springframework.boot'
+ apply plugin: 'io.spring.dependency-management'
+ apply plugin: 'checkstyle'
+ apply plugin: 'jacoco'
+
+ configurations {
+ compileOnly {
+ extendsFrom annotationProcessor
+ }
+ }
+
+ repositories {
+ mavenCentral()
+ }
+
+ // IntelliJ 빌드용
+ tasks.register('cleanOut', Delete) {
+ delete "${projectDir}/out"
+ }
+
+ clean.finalizedBy(cleanOut)
+
+ // 모든 모듈 공통 의존성
+ dependencies {
+
+ // Lombok & Mapstruct
+ compileOnly 'org.projectlombok:lombok'
+ implementation 'org.mapstruct:mapstruct:1.5.1.Final'
+ implementation 'org.projectlombok:lombok-mapstruct-binding:0.2.0'
+ annotationProcessor "org.projectlombok:lombok-mapstruct-binding:0.2.0"
+ annotationProcessor 'org.projectlombok:lombok'
+ annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.1.Final'
+
+ // flyway
+ implementation 'org.flywaydb:flyway-core'
+
+ // https://mvnrepository.com/artifact/com.vladmihalcea/hibernate-types-60
+ implementation 'io.hypersistence:hypersistence-utils-hibernate-60:3.5.1'
+
+ // spring boot
+ implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
+ implementation 'org.springframework.boot:spring-boot-starter-security'
+ implementation 'org.springframework.boot:spring-boot-starter-web'
+ implementation 'org.springframework.boot:spring-boot-starter-actuator'
+ implementation 'org.springframework.boot:spring-boot-starter-validation'
+ implementation 'org.springframework.boot:spring-boot-starter-jdbc'
+
+ // jwt
+ implementation 'io.jsonwebtoken:jjwt-api:0.12.5'
+ implementation 'io.jsonwebtoken:jjwt-impl:0.12.5'
+ implementation 'io.jsonwebtoken:jjwt-jackson:0.12.5'
+
+ // redis
+ implementation 'org.springframework.boot:spring-boot-starter-data-redis'
+
+ // postgresql
+ runtimeOnly 'org.postgresql:postgresql'
+
+ testImplementation 'org.springframework.boot:spring-boot-starter-test'
+ testImplementation 'org.springframework.security:spring-security-test'
+ testImplementation platform('org.junit:junit-bom:5.9.1')
+ testImplementation "org.testcontainers:junit-jupiter:${testcontainersVersion}"
+
+ // testContainer
+ testImplementation "org.testcontainers:testcontainers"
+ testImplementation 'org.testcontainers:postgresql'
+ testImplementation 'io.rest-assured:rest-assured'
+
+ }
+
+ dependencyManagement {
+ imports {
+ mavenBom "org.testcontainers:testcontainers-bom:${testcontainersVersion}"
+ }
+ }
+
+ checkstyle {
+ maxWarnings = 0
+ configFile = file("${rootDir}/lint/naver-checkstyle-rules.xml")
+ configProperties = ["suppressionFile": "${rootDir}/lint/naver-checkstyle-suppressions.xml"]
+ toolVersion = "10.13.0"
+ }
+
+ compileJava.options.encoding = 'UTF-8'
+ compileTestJava.options.encoding = 'UTF-8'
+
+ tasks.named('test') {
+ useJUnitPlatform()
+ finalizedBy 'jacocoTestReport'
+ }
+
+ def QDomains = []
+ for (qPattern in '*.QA'..'*.QZ') { // qPattern = '*.QA', '*.QB', ... '*.QZ'
+ QDomains.add(qPattern + '*')
+ }
+
+ jacoco {
+ toolVersion = '0.8.11' // support jdk 21
+ // reportsDir = file("$buildDir/customJacocoReportDir")
+ }
+
+ jacocoTestReport {
+
+ reports {
+ html.required = true
+ xml.required = true
+ csv.required = false
+
+ // 리포트의 저장 경로 설정
+ // layout.buildDirectory를 직접 사용하여 보고서 목적지 지정
+ html.destination file("${layout.buildDirectory.dir('reports/jacoco').get().asFile}/index.html")
+ xml.destination file("${layout.buildDirectory.dir('reports/jacoco').get().asFile}/index.xml")
+ }
+
+ afterEvaluate {
+ classDirectories.setFrom(
+ files(classDirectories.files.collect {
+ fileTree(dir: it, excludes: [
+ // 측정 안하고 싶은 패턴
+ "**/*Application*",
+ "**/*Properties*",
+ "**/*Config*",
+ "**/entity/**",
+ "**/enums/**",
+ "**/resources/**",
+ "**/test/**"
+ ] + QDomains)
+ })
+ )
+ }
+
+ finalizedBy 'jacocoTestCoverageVerification'
+ }
+
+ jacocoTestCoverageVerification {
+
+ violationRules {
+
+ rule {
+// enabled = true
+ enabled = false
+ element = 'CLASS'
+
+ limit {
+ counter = 'BRANCH'
+ value = 'COVEREDRATIO'
+ minimum = 0.80
+ }
+
+ limit {
+ counter = 'LINE'
+ value = 'COVEREDRATIO'
+ minimum = 0.80
+ }
+
+ excludes = [
+ // 측정 안하고 싶은 패턴
+ '*.*Application*',
+ "*.*Properties*",
+ '*.*Config*',
+ "**.test.**",
+ "**.entity.**",
+ "**.enums.**",
+ "**.resources.**"
+ ] + QDomains
+ }
+ }
+ }
+
+}
+
+project(':module-shared') {
+
+ bootJar { enabled = false }
+ jar { enabled = true }
+
+ dependencies {
+ }
+}
+
+project(':module-api') {
+
+ bootJar {
+ enabled = true
+ destinationDirectory = file("$rootDir/$jarDestDir")
+ archiveFileName = "api.jar"
+ }
+ jar { enabled = false }
+
+ dependencies {
+ implementation project(':module-shared')
+
+ // mail
+ implementation 'org.springframework.boot:spring-boot-starter-mail'
+ }
+}
diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml
new file mode 100644
index 0000000..2574760
--- /dev/null
+++ b/docker/docker-compose.yaml
@@ -0,0 +1,27 @@
+version: "3.8"
+
+services:
+ db:
+ container_name: ph-db
+ image: postgres:15
+ volumes:
+ - ./.system/docker-data/postgres:/var/lib/postgresql/data
+ - ./init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
+ ports:
+ - "5432:5432"
+ environment:
+ - TZ=Asia/Seoul
+ - POSTGRES_DB=postgres
+ - POSTGRES_USER=ph
+ - POSTGRES_PASSWORD=ph
+ redis:
+ container_name: ph-redis
+ image: redis:alpine3.19
+ command: redis-server --port 6379
+ volumes:
+ - ./.system/docker-data/redis:/data
+ labels:
+ - "name=redis"
+ - "mode=standalone"
+ ports:
+ - 6379:6379
diff --git a/docker/init-db.sh b/docker/init-db.sh
new file mode 100644
index 0000000..d6f8f8e
--- /dev/null
+++ b/docker/init-db.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+
+psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
+ create user sonar;
+ alter user sonar with password 'sonar' superuser;
+ create database sonar;
+ grant all privileges on database sonar to sonar;
+EOSQL
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..857e611
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,2 @@
+org.gradle.logging.level=info
+jarDestDir=.build/jar/
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..249e583
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..194b28c
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sun Mar 03 19:09:53 KST 2024
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..1b6c787
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,234 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
+done
+
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+
+APP_NAME="Gradle"
+APP_BASE_NAME=${0##*/}
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+ echo "$*"
+} >&2
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD=$JAVA_HOME/jre/sh/java
+ else
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD=java
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
+ fi
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
+ done
+fi
+
+# Collect all arguments for the java command;
+# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
+# shell script including quotes and variable substitutions, so put them in
+# double quotes to make sure that they get re-expanded; and
+# * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..107acd3
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/lint/naver-checkstyle-rules.xml b/lint/naver-checkstyle-rules.xml
new file mode 100644
index 0000000..2b16050
--- /dev/null
+++ b/lint/naver-checkstyle-rules.xml
@@ -0,0 +1,439 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lint/naver-checkstyle-suppressions.xml b/lint/naver-checkstyle-suppressions.xml
new file mode 100644
index 0000000..a7b6fd1
--- /dev/null
+++ b/lint/naver-checkstyle-suppressions.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/module-api/.gitignore b/module-api/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/module-api/build.gradle b/module-api/build.gradle
new file mode 100644
index 0000000..e69de29
diff --git a/module-api/src/main/java/com/peoplehere/api/ApiApplication.java b/module-api/src/main/java/com/peoplehere/api/ApiApplication.java
new file mode 100644
index 0000000..10b0cbd
--- /dev/null
+++ b/module-api/src/main/java/com/peoplehere/api/ApiApplication.java
@@ -0,0 +1,16 @@
+package com.peoplehere.api;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.ApplicationPidFileWriter;
+
+@SpringBootApplication(scanBasePackages = {"com.peoplehere.api", "com.peoplehere.shared"})
+public class ApiApplication {
+
+ public static void main(String[] args) {
+ var app = new SpringApplication(ApiApplication.class);
+ app.addListeners(new ApplicationPidFileWriter());
+ app.run(args);
+
+ }
+}
diff --git a/module-api/src/main/java/com/peoplehere/api/common/annotation/CheckEmailVerificationLimit.java b/module-api/src/main/java/com/peoplehere/api/common/annotation/CheckEmailVerificationLimit.java
new file mode 100644
index 0000000..90907d7
--- /dev/null
+++ b/module-api/src/main/java/com/peoplehere/api/common/annotation/CheckEmailVerificationLimit.java
@@ -0,0 +1,11 @@
+package com.peoplehere.api.common.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+/**
+ * 이메일 인증 번호 전송에 대한 제한을 체크하는 어노테이션
+ */
+@Target({ElementType.METHOD})
+public @interface CheckEmailVerificationLimit {
+}
diff --git a/module-api/src/main/java/com/peoplehere/api/common/annotation/CheckEmailVerifyLimit.java b/module-api/src/main/java/com/peoplehere/api/common/annotation/CheckEmailVerifyLimit.java
new file mode 100644
index 0000000..bbec569
--- /dev/null
+++ b/module-api/src/main/java/com/peoplehere/api/common/annotation/CheckEmailVerifyLimit.java
@@ -0,0 +1,11 @@
+package com.peoplehere.api.common.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+/**
+ * 이메일 인증 번호 검증에 대한 제한을 체크하는 어노테이션
+ */
+@Target({ElementType.METHOD})
+public @interface CheckEmailVerifyLimit {
+}
diff --git a/module-api/src/main/java/com/peoplehere/api/common/annotation/PrivateNetwork.java b/module-api/src/main/java/com/peoplehere/api/common/annotation/PrivateNetwork.java
new file mode 100644
index 0000000..a3ab0d4
--- /dev/null
+++ b/module-api/src/main/java/com/peoplehere/api/common/annotation/PrivateNetwork.java
@@ -0,0 +1,11 @@
+package com.peoplehere.api.common.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PrivateNetwork {
+}
diff --git a/module-api/src/main/java/com/peoplehere/api/common/config/AsyncConfig.java b/module-api/src/main/java/com/peoplehere/api/common/config/AsyncConfig.java
new file mode 100644
index 0000000..8faaa93
--- /dev/null
+++ b/module-api/src/main/java/com/peoplehere/api/common/config/AsyncConfig.java
@@ -0,0 +1,9 @@
+package com.peoplehere.api.common.config;
+
+/*
+@EnableAsync(proxyTargetClass = true)
+@Configuration
+public class AsyncConfig {
+
+}
+*/
diff --git a/module-api/src/main/java/com/peoplehere/api/common/config/CustomCorsFilter.java b/module-api/src/main/java/com/peoplehere/api/common/config/CustomCorsFilter.java
new file mode 100644
index 0000000..c554c81
--- /dev/null
+++ b/module-api/src/main/java/com/peoplehere/api/common/config/CustomCorsFilter.java
@@ -0,0 +1,88 @@
+package com.peoplehere.api.common.config;
+
+import static com.peoplehere.api.common.util.RequestUtils.*;
+import static java.lang.Boolean.*;
+import static org.springframework.data.mapping.Alias.*;
+import static org.springframework.http.HttpHeaders.*;
+import static org.springframework.http.HttpMethod.*;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.http.HttpStatus;
+import org.springframework.stereotype.Component;
+
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@Component
+@AllArgsConstructor
+@Order(Ordered.HIGHEST_PRECEDENCE)
+public class CustomCorsFilter implements Filter {
+
+ private final IpAccessManager ipAccessManager;
+ private static final List ALLOW_ORIGINS = List.of(
+ ".peoplehere.world", "localhost"
+ );
+
+ private static final String ALLOWED_METHODS = "GET, POST, PUT, OPTIONS";
+ private static final String ALLOWED_HEADERS = "X-Requested-With,Origin,Content-Type,Accept,Authorization";
+
+ /**
+ * 허용된 도메인만 열어주기
+ * todo: whitelist(허용된 ip) 도 열어주기
+ * @param request
+ * @param response
+ * @param chain
+ * @throws IOException
+ * @throws ServletException
+ */
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws
+ IOException,
+ ServletException {
+ final HttpServletRequest req = (HttpServletRequest)request;
+ final HttpServletResponse res = (HttpServletResponse)response;
+ final String origin = ((HttpServletRequest)request).getHeader(ORIGIN);
+
+ if (ofNullable(origin).isPresent()) {
+ log.debug("헤더확인: {}", getIp(req));
+
+ if (ipAccessManager.contains(req) || isAllowOrigin(origin)) {
+ res.addHeader(ACCESS_CONTROL_ALLOW_ORIGIN, origin);
+ res.addHeader(ACCESS_CONTROL_ALLOW_CREDENTIALS, TRUE.toString());
+
+ if (OPTIONS.matches(req.getMethod())) {
+ res.addHeader(ACCESS_CONTROL_ALLOW_METHODS, ALLOWED_METHODS);
+ res.addHeader(ACCESS_CONTROL_ALLOW_HEADERS, ALLOWED_HEADERS);
+ res.setStatus(HttpStatus.OK.value());
+ return;
+ }
+ } else {
+ res.setStatus(HttpStatus.FORBIDDEN.value());
+ return;
+ }
+ }
+ chain.doFilter(req, res);
+
+ }
+
+ private static boolean isAllowOrigin(String origin) {
+ for (String allowOrigin : ALLOW_ORIGINS) {
+ if (origin.contains(allowOrigin)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/module-api/src/main/java/com/peoplehere/api/common/config/ErrorControllerAdvice.java b/module-api/src/main/java/com/peoplehere/api/common/config/ErrorControllerAdvice.java
new file mode 100644
index 0000000..8f77e5a
--- /dev/null
+++ b/module-api/src/main/java/com/peoplehere/api/common/config/ErrorControllerAdvice.java
@@ -0,0 +1,117 @@
+package com.peoplehere.api.common.config;
+
+import static org.springframework.http.HttpStatus.*;
+
+import org.springframework.dao.DataIntegrityViolationException;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.AccessDeniedException;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.validation.BindException;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+
+import com.peoplehere.api.common.exception.AccountIdNotFoundException;
+import com.peoplehere.api.common.exception.ClientBindException;
+import com.peoplehere.api.common.exception.DuplicateException;
+import com.peoplehere.api.common.exception.ForbiddenException;
+import com.peoplehere.shared.common.data.response.ErrorResponseDto;
+import com.peoplehere.shared.common.webhook.AlertWebhook;
+
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
+@Slf4j
+@ControllerAdvice
+@RequiredArgsConstructor
+public class ErrorControllerAdvice {
+ private final AlertWebhook alertWebhook;
+ private static final String FORBIDDEN_403_BODY = "접근할 수 없어요!";
+ private static final String ERROR_500_BODY = "잠시 후 다시 확인해주세요!";
+
+ @ExceptionHandler(value = {ForbiddenException.class, AccessDeniedException.class})
+ public ResponseEntity