Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 39 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@
<img width="1639" height="621" alt="Group 3" src="https://github.com/user-attachments/assets/70094c33-b732-4769-a033-5d23246b408c" />
<br>



## πŸ›  Backend Tech Stack

### πŸ”§ 기술 μŠ€νƒ

| Category | Technology | Description |
| :--- | :--- | :--- |
| **Language** | ![Node.js](https://img.shields.io/badge/Node.js-339933?style=flat-square&logo=nodedotjs&logoColor=white) | μ„œλ²„ μ‚¬μ΄λ“œ λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 처리 및 API μ„œλ²„ ꡬ좕 |
| **Web Server** | ![NGINX](https://img.shields.io/badge/NGINX-009639?style=flat-square&logo=nginx&logoColor=white) | λ¦¬λ²„μŠ€ ν”„λ‘μ‹œ 섀정을 ν†΅ν•œ λ³΄μ•ˆ 및 API μš”μ²­ 전달 |
| **Database** | ![MySQL](https://img.shields.io/badge/MySQL-4479A1?style=flat-square&logo=mysql&logoColor=white) | κ΄€κ³„ν˜• λ°μ΄ν„°λ² μ΄μŠ€λ₯Ό ν™œμš©ν•œ 데이터 관리 및 CRUD 처리 |
| **Compute** | ![Amazon EC2](https://img.shields.io/badge/Amazon_EC2-FF9900?style=flat-square&logo=amazonec2&logoColor=white) | ν΄λΌμš°λ“œ 가상 μ„œλ²„ μΈμŠ€ν„΄μŠ€λ₯Ό ν†΅ν•œ μ• ν”Œλ¦¬μΌ€μ΄μ…˜ ν˜ΈμŠ€νŒ… |
| **Storage** | ![AWS S3](https://img.shields.io/badge/AWS_S3-569A31?style=flat-square&logo=amazons3&logoColor=white) | μ‚¬μš©μž μ—…λ‘œλ“œ 파일(이미지, λ¬Έμ„œ λ“±) μ €μž₯ 및 객체 URL 관리 |
| **CI/CD** | ![GitHub Actions](https://img.shields.io/badge/GitHub_Actions-2088FF?style=flat-square&logo=githubactions&logoColor=white) | μ½”λ“œ λ³€κ²½ μ‹œ μžλ™ λΉŒλ“œ, ν…ŒμŠ€νŠΈ 및 μ„œλ²„ μžλ™ 배포 ν™˜κ²½ ꡬ좕 |




### πŸ— Service Architecture Flow
1. **Request**: `Vercel(Next.js)`μ—μ„œ λ°œμƒν•œ API μš”μ²­μ΄ `NGINX`둜 μΈμž…λ©λ‹ˆλ‹€.
2. **Proxy**: `NGINX`λŠ” ν•΄λ‹Ή μš”μ²­μ„ λ‚΄λΆ€ `Node.js` μ„œλ²„λ‘œ μ•ˆμ „ν•˜κ²Œ μ „λ‹¬ν•©λ‹ˆλ‹€.
3. **Logic & DB**: `Node.js`μ—μ„œ λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ„ μ²˜λ¦¬ν•˜λ©° `MySQL`κ³Ό ν†΅μ‹ ν•˜μ—¬ 데이터λ₯Ό κ΄€λ¦¬ν•©λ‹ˆλ‹€.
4. **File Control**: 파일 μ—…λ‘œλ“œ μ‹œ `AWS S3`와 ν†΅μ‹ ν•˜μ—¬ νŒŒμΌμ„ κ΄€λ¦¬ν•˜κ³  객체 URL을 λ°˜ν™˜λ°›μŠ΅λ‹ˆλ‹€.


## πŸ“ μ‹œμŠ€ν…œ 디렉토리 ꡬ쑰
```bash
BACKEND
Expand Down Expand Up @@ -159,18 +184,20 @@ npm start
}
```
### β–·μ»€μŠ€ν…€ μ—λŸ¬ μ½”λ“œ
- 상속 ꡬ쑰
| Base Class | μ„€λͺ… |
| --- | --- |
| CustomError | λͺ¨λ“  μ—λŸ¬μ˜ λΆ€λͺ¨ 클래슀 (statusCode, errorCode, reason, data 포함) |
- μ—λŸ¬ νƒ€μž… 정리
| Status Code | Default Error Code | κΈ°λ³Έ λ©”μ‹œμ§€|
| --- | --- | --- |
| 400 | BAD_REQUEST | 잘λͺ»λœ μš”μ²­μž…λ‹ˆλ‹€ |
| 401 | UNAUTHORIZED | 인증에 μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€|
| 403 | FORBIDDEN | μ ‘κ·Ό κΆŒν•œμ΄ μ—†μŠ΅λ‹ˆλ‹€ |
| 404 | NOT_FOUND | λ¦¬μ†ŒμŠ€λ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€ |
| 500 | INTERNAL_SERVER_ERROR | μ„œλ²„ λ‚΄λΆ€ 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€ |

#### **상속 ꡬ쑰**
| Base Class | μ„€λͺ… |
| :--- | :--- |
| `CustomError` | λͺ¨λ“  μ—λŸ¬μ˜ λΆ€λͺ¨ 클래슀 (`statusCode`, `errorCode`, `reason`, `data` 포함) |

#### **μ—λŸ¬ νƒ€μž… 정리**
| Status Code | Default Error Code | κΈ°λ³Έ λ©”μ‹œμ§€ |
| :---: | :--- | :--- |
| 400 | `BAD_REQUEST` | 잘λͺ»λœ μš”μ²­μž…λ‹ˆλ‹€ |
| 401 | `UNAUTHORIZED` | 인증에 μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€ |
| 403 | `FORBIDDEN` | μ ‘κ·Ό κΆŒν•œμ΄ μ—†μŠ΅λ‹ˆλ‹€ |
| 404 | `NOT_FOUND` | λ¦¬μ†ŒμŠ€λ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€ |
| 500 | `INTERNAL_SERVER_ERROR` | μ„œλ²„ λ‚΄λΆ€ 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€ |
<br>

## πŸ“ μ£Όμš” API λͺ©λ‘
Expand Down