Skip to content

Commit b6bf791

Browse files
committed
README 추가
1 parent c1bacc7 commit b6bf791

File tree

1 file changed

+96
-55
lines changed

1 file changed

+96
-55
lines changed

README.md

Lines changed: 96 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,96 @@
1-
graph TD
2-
subgraph "End-User"
3-
Client[📱/💻 Client Application]
4-
end
5-
6-
subgraph "AWS Cloud (ap-northeast-2)"
7-
ALB
8-
subgraph "Amazon EC2"
9-
SpringBoot
10-
FastAPI
11-
end
12-
subgraph "Data Persistence Layer"
13-
RDS
14-
S3
15-
VectorDB
16-
end
17-
end
18-
19-
subgraph "External Services"
20-
Kakao[Kakao Authentication API]
21-
GoogleAI[Google Cloud AI Platform<br/>(Vision API / Gemini)]
22-
end
23-
24-
%% Data Flows
25-
Client -- HTTPS Request --> ALB
26-
ALB -- HTTP --> SpringBoot
27-
28-
SpringBoot -- "1. Kakao Redirect" --> Client
29-
Client -- "2. User Consent" --> Kakao
30-
Kakao -- "3. Auth Code" --> SpringBoot
31-
SpringBoot -- "4. Token Request" --> Kakao
32-
Kakao -- "5. Access Token" --> SpringBoot
33-
SpringBoot -- "6. User Info Request" --> Kakao
34-
Kakao -- "7. User Profile" --> SpringBoot
35-
SpringBoot -- "8. Issue JWT" --> Client
36-
37-
Client -- "Image Upload (JWT)" --> SpringBoot
38-
SpringBoot -- "AWS SDK (Credentials)" --> S3
39-
SpringBoot -- "JDBC" --> RDS
40-
SpringBoot -- "HTTP POST (Image Location)" --> FastAPI
41-
FastAPI -- "AWS SDK" --> S3[Fetch Image]
42-
FastAPI -- "REST API Call" --> GoogleAI
43-
GoogleAI -- "Analysis Result (JSON)" --> FastAPI
44-
FastAPI -- "Generate Vector" --> FastAPI
45-
FastAPI -- "Analysis Result + Vector (JSON)" --> SpringBoot
46-
SpringBoot -- "Store Vector" --> VectorDB
47-
SpringBoot -- "JDBC" --> RDS[Update Metadata]
48-
SpringBoot -- "HTTP 200 OK" --> Client
49-
50-
Client -- "Recommendation Request (Image ID, JWT)" --> SpringBoot
51-
SpringBoot -- "Query by ID" --> VectorDB
52-
SpringBoot -- "k-NN Search" --> VectorDB
53-
VectorDB -- "List of similar Image IDs" --> SpringBoot
54-
SpringBoot -- "JDBC (Batch Fetch)" --> RDS[Hydrate Metadata]
55-
SpringBoot -- "JSON Response" --> Client
1+
# DecodEat - Backend Server
2+
3+
[![cicd](https://github.com/DecodEat/BE-SpringBoot/actions/workflows/workflow.yml/badge.svg)](https://github.com/DecodEat/BE-SpringBoot/actions/workflows/workflow.yml)
4+
5+
DecodEat은 식품 정보를 분석하고 사용자 맞춤 추천을 제공하는 서비스입니다. 이 프로젝트는 해당 서비스의 백엔드 서버입니다.
6+
7+
## 🛠️ 주요 기술 스택
8+
9+
| 구분 | 기술 |
10+
| --- | --- |
11+
| **Framework** | Spring Boot 3.2.5 |
12+
| **Language** | Java 17 |
13+
| **Build Tool** | Gradle 8.7 |
14+
| **Database** | Spring Data JPA, QueryDSL |
15+
| **Authentication** | Spring Security, JWT, OAuth 2.0 |
16+
| **API Documentation** | Swagger (Springdoc OpenAPI) |
17+
| **Cloud Service** | AWS S3 |
18+
| **Containerization** | Docker, Docker Compose |
19+
| **CI/CD** | GitHub Actions |
20+
21+
## ✨ 주요 기능
22+
23+
### 1. **사용자 관리 및 인증**
24+
- JWT 토큰 기반의 자체 로그인 및 회원가입 기능을 제공합니다.
25+
- OAuth 2.0을 연동하여 Google, Kakao 등 소셜 로그인을 지원합니다.
26+
- Refresh Token을 이용한 토큰 재발급 로직을 구현하여 사용자 편의성을 높였습니다.
27+
28+
### 2. **상품(식품) 정보 관리**
29+
- 사용자가 직접 상품 정보를 등록하고, 이미지(원재료, 영양정보표)를 S3에 업로드할 수 있습니다.
30+
- 상품명, 카테고리 등 다양한 조건으로 상품을 검색하고 필터링하는 기능을 제공합니다.
31+
- 상품 상세 정보 조회, 찜하기(좋아요) 기능을 제공합니다.
32+
33+
### 3. **영양 정보 분석 및 추천**
34+
- 외부 Python 분석 서버와 비동기 통신(WebClient)하여 상품의 영양 정보를 분석합니다.
35+
- 사용자 기반 및 상품 기반의 추천 알고리즘을 통해 개인화된 상품 추천 목록을 제공합니다.
36+
37+
### 4. **오류 제보 및 관리**
38+
- 사용자는 등록된 상품의 영양 정보나 이미지에 대한 오류를 제보할 수 있습니다.
39+
- 관리자는 제보된 내용을 확인하고, 상품 정보를 수정하거나 제보를 처리할 수 있습니다.
40+
41+
### 5. **API 및 예외 처리**
42+
- 표준화된 API 응답 형식을(`ApiResponse`) 사용하여 클라이언트와의 통신 효율성을 높였습니다.
43+
- `ErrorStatus`를 통해 예외 상황을 체계적으로 관리하고, `ExceptionAdvice`에서 공통으로 처리합니다.
44+
45+
## 🚀 시작하기
46+
47+
### **Prerequisites**
48+
- Java 17
49+
- Gradle 8.7
50+
- Docker (선택 사항)
51+
52+
### **Installation & Run**
53+
1. **Git Clone**
54+
```bash
55+
git clone https://github.com/DecodEat/BE-SpringBoot.git
56+
cd BE-SpringBoot
57+
```
58+
59+
2. **`application.yml` 설정**
60+
`src/main/resources/` 경로에 `application.yml` 파일을 생성하고 데이터베이스, JWT, OAuth, AWS S3 관련 설정값을 입력해야 합니다.
61+
62+
3. **애플리케이션 실행**
63+
```bash
64+
./gradlew bootRun
65+
```
66+
67+
## 📝 API 문서
68+
69+
서버 실행 후, 아래 URL을 통해 API 명세를 확인할 수 있습니다.
70+
- **Swagger UI:** [http://localhost:8080/swagger-ui/index.html](http://localhost:8080/swagger-ui/index.html)
71+
72+
## 📁 프로젝트 구조
73+
74+
```
75+
.
76+
├── src
77+
│ ├── main
78+
│ │ ├── java
79+
│ │ │ └── com
80+
│ │ │ └── DecodEat
81+
│ │ │ ├── DecodEatApplication.java
82+
│ │ │ ├── domain # 비즈니스 로직 (하위 도메인으로 분리)
83+
│ │ │ │ ├── products # 상품
84+
│ │ │ │ ├── users # 사용자
85+
│ │ │ │ ├── report # 제보
86+
│ │ │ │ └── refreshToken # 리프레시 토큰
87+
│ │ │ └── global # 공통 모듈
88+
│ │ │ ├── apiPayload # 공통 응답/예외 처리
89+
│ │ │ ├── aws # AWS 관련 유틸
90+
│ │ │ ├── config # Spring 설정 (Security, Swagger 등)
91+
│ │ │ └── exception # 전역 예외 핸들링
92+
│ │ └── resources
93+
│ │ ├── application.yml
94+
│ └── test
95+
...
96+
```

0 commit comments

Comments
 (0)