Skip to content

Commit

Permalink
readme ์ž‘์„ฑ
Browse files Browse the repository at this point in the history
  • Loading branch information
djdongjae committed Jun 19, 2024
1 parent 0ee3272 commit 1929c47
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 1 deletion.
149 changes: 148 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,148 @@
# Back-End
# Tasty-Inventory: Back-End

### 1. ๊ฐœ์š”

---

#### 1.1. ์†Œ๊ฐœ

์‰ฝ๊ณ  ๊ฐ„ํŽธํ•œ ์žฌ๊ณ  ๊ด€๋ฆฌ, ๋ง›์žˆ๋Š” ์žฌ๊ณ ์™€ ํ•จ๊ป˜ ์‹œ์ž‘ํ•ด์š”! - [๋ฐ”๋กœ๊ฐ€๊ธฐ](https://tasty-inventory-fe.vercel.app/)

* โœ… **์ œ์ž‘ ์˜๋„**: ๋งค์ผ ์—‘์…€ ํŒŒ์ผ์— ์ •๋ฆฌํ–ˆ๋˜ ์žฌ๊ณ ๋ฅผ ๋ง›์žˆ๋Š” ์žฌ๊ณ ์—์„œ ๊ฐ„ํŽธํ•˜๊ฒŒ ์ž…๋ ฅํ•˜๊ณ , ๋‚จ์€ ์ˆ˜๋Ÿ‰์„ ์˜ˆ์ธกํ•  ์ˆ˜ ์žˆ์–ด์š”.

#### 1.2. ๊ธฐ์ˆ  ์Šคํƒ


| Category | Used |
| --- | --- |
| Java version | Java 17 |
| Spring version | 3.2.4 |
| Cloud Computing | AWS EC2 (Ubuntu 22.04 LTS) |
| Database | AWS RDS (Mariadb 10.6.18) |
| File Upload | AWS S3 |
| CI/CD | Github Actions, S3, CodeDeploy, Nginx |
| Monitoring | Sentry, Slack |
| API Docs | Swagger, Notion |

### 2. ์‹คํ–‰๋ฐฉ๋ฒ•

---

#### 2.1. Config

* `application.yml` ํŒŒ์ผ `Tasty-Inventory_BE/src/main/resources` ๋””๋ ‰ํ† ๋ฆฌ์— ์œ„์น˜

<br>

![alt text](<./image/Screenshot 2024-06-19 at 10.59.19โ€ฏAM.png>)

<br>

* `build.gradle`์—์„œ ๋กœ์ปฌ ์ปดํ“จํ„ฐ์— ์„ค์น˜๋œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ข…๋ฅ˜ ์ถ”๊ฐ€

<br>

![alt text](<./image/Screenshot 2024-06-19 at 11.04.16โ€ฏAM.png>)

* `application.yml` ํŒŒ์ผ์—์„œ DB ์„ค์ • ์ •๋ณด ๋ณ€๊ฒฝ

<br>

![alt text](<./image/Screenshot 2024-06-19 at 11.07.15โ€ฏAM.png>)

<br>

#### 2.2. Project Build

```shell
chmod a+x gradlew
./gradlew clean build -x test
```

#### 2.3. Run jar

```shell
cd ./build/libs
java -jar Tasty-Inventory_BE-0.0.1-SNAPSHOT.jar &
```


### 3. ๐Ÿค Code Convention

---

#### 3.1 โœ“ File Naming
- ํŒŒ์ผ ์ด๋ฆ„ ๋ฐ ํด๋ž˜์Šค, ์ธํ„ฐํŽ˜์ด์Šค ์ด๋ฆ„: **ํŒŒ์Šค์นผ ์ผ€์ด์Šค(Pascal Case)**
- Entity์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์†์„ฑ๊ฐ’๋“ค์€ ? **์นด๋ฉœ ์ผ€์ด์Šค(camel Case)**
- ๋‚ด๋ถ€์—์„œ ์‚ฌ์šฉ๋˜๋Š” ํ•จ์ˆ˜ ๋ฐ ๊ธฐํƒ€ ์‚ฌ์šฉ: **์นด๋ฉœ ์ผ€์ด์Šค(camelCase)**

#### 3.2 โœ“ ์ธํ„ฐํŽ˜์ด์Šค ์ด๋ฆ„์— ๋ช…์‚ฌ/ํ˜•์šฉ์‚ฌ ์‚ฌ์šฉ [interface-noun-adj]
์ธํ„ฐํŽ˜์ด์Šค(interface)์˜ ์ด๋ฆ„์€ ๋ช…์‚ฌ/๋ช…์‚ฌ์ ˆ๋กœ ํ˜น์€ ํ˜•์šฉ์‚ฌ/ํ˜•์šฉ์‚ฌ์ ˆ๋กœ ์ง“๋Š”๋‹ค.

#### 3.3 โœ“ ํด๋ž˜์Šค ์ด๋ฆ„์— ๋ช…์‚ฌ ์‚ฌ์šฉ [class-noun]

ํด๋ž˜์Šค ์ด๋ฆ„์€ ๋ช…์‚ฌ๋‚˜ ๋ช…์‚ฌ์ ˆ๋กœ ์ง“๋Š”๋‹ค.

#### 3.4 โœ“ ๋ฉ”์„œ๋“œ ์ด๋ฆ„์€ ๋™์‚ฌ/์ „์น˜์‚ฌ๋กœ ์‹œ์ž‘ [method-verb-preposition]

๋ฉ”์„œ๋“œ๋ช…์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ๋™์‚ฌ๋กœ ์‹œ์ž‘ํ•œ๋‹ค.

๋‹ค๋ฅธ ํƒ€์ž…์œผ๋กœ ์ „ํ™˜ํ•˜๋Š” ๋ฉ”์„œ๋“œ๋‚˜ ๋นŒ๋” ํŒจํ„ด์„ ๊ตฌํ˜„ํ•œ ํด๋ž˜์Šค์˜ ๋ฉ”์„œ๋“œ์—์„œ๋Š” ์ „์น˜์‚ฌ๋ฅผ ์“ธ ์ˆ˜ ์žˆ๋‹ค.

#### 3.5 โœ“ ์ƒ์ˆ˜๋Š” ๋Œ€๋ฌธ์ž์™€ ์–ธ๋”์Šค์ฝ”์–ด๋กœ ๊ตฌ์„ฑ[constant_uppercase]

"static final"๋กœ ์„ ์–ธ๋˜์–ด ์žˆ๋Š” ํ•„๋“œ์ผ ๋•Œ ์ƒ์ˆ˜๋กœ ๊ฐ„์ฃผํ•œ๋‹ค.

์ƒ์ˆ˜ ์ด๋ฆ„์€ ๋Œ€๋ฌธ์ž๋กœ ์ž‘์„ฑํ•˜๋ฉฐ, ๋ณตํ•ฉ์–ด๋Š” ์–ธ๋”์Šค์ฝ”์–ด'_'๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋‹จ์–ด๋ฅผ ๊ตฌ๋ถ„ํ•œ๋‹ค.

#### 3.6 โœ“ ๋ณ€์ˆ˜์— ์†Œ๋ฌธ์ž ์นด๋ฉœํ‘œ๊ธฐ๋ฒ• ์ ์šฉ [var-lower-camelcase]

์ƒ์ˆ˜๊ฐ€ ์•„๋‹Œ ํด๋ž˜์Šค์˜ ๋ฉค๋ฒ„๋ณ€์ˆ˜/์ง€์—ญ๋ณ€์ˆ˜/๋ฉ”์„œ๋“œ ํŒŒ๋ผ๋ฏธํ„ฐ์—๋Š” ์†Œ๋ฌธ์ž ์นด๋ฉœํ‘œ๊ธฐ๋ฒ•(Lower camel case)์„ ์‚ฌ์šฉํ•œ๋‹ค.

#### 3.7 โœ“ ์ž„์‹œ ๋ณ€์ˆ˜ ์™ธ์—๋Š” 1 ๊ธ€์ž ์ด๋ฆ„ ์‚ฌ์šฉ ๊ธˆ์ง€ [avoid-1-char-var]

๋ฉ”์„œ๋“œ ๋ธ”๋Ÿญ ๋ฒ”์œ„ ์ด์ƒ์˜ ์ƒ๋ช… ์ฃผ๊ธฐ๋ฅผ ๊ฐ€์ง€๋Š” ๋ณ€์ˆ˜์—๋Š” 1๊ธ€์ž๋กœ ๋œ ์ด๋ฆ„์„ ์“ฐ์ง€ ์•Š๋Š”๋‹ค.

**๋ฐ˜๋ณต๋ฌธ์˜ ์ธ๋ฑ์Šค๋‚˜ ๋žŒ๋‹ค ํ‘œํ˜„์‹์˜ ํŒŒ๋ผ๋ฏธํ„ฐ ๋“ฑ ์งง์€ ๋ฒ”์œ„์˜ ์ž„์‹œ ๋ณ€์ˆ˜**์—๋Š” ๊ด€๋ก€์ ์œผ๋กœ 1๊ธ€์ž ๋ณ€์ˆ˜๋ช…์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
<br><br>

### 4. ๐Ÿค Git Convention

---


#### 4.1 Issue

๋ชจ๋“  ์ž‘์—…์˜ ๋‹จ์œ„๋Š” github์— ์ƒ์„ฑ๋œ Issue๋ฅผ ๊ธฐ์ค€์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค.

Issue์˜ ๋ณผ๋ฅจ์€ ์ตœ์†Œ ํ•˜๋‚˜์˜ ๊ธฐ๋Šฅ์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค.

ํ•˜๋‚˜์˜ ์ด์Šˆ๋ฅผ ๋งˆ๋ฌด๋ฆฌํ•˜๊ธฐ ์ „์—๋Š” ํŠน๋ณ„ํ•œ ์ƒํ™ฉ์ด ์•„๋‹Œ ์ด์ƒ ๋‹ค๋ฅธ ์ž‘์—…์— ๋Œ€ํ•œ ์ด์Šˆ๋ฅผ ์ƒ์„ฑํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

#### 4.2 PR (Pull Request)

Issue โ‰ค PR

ํ•˜๋‚˜์˜ ์ด์Šˆ์— ๋Œ€ํ•ด์„œ ๋ฐ˜๋“œ์‹œ ํ•˜๋‚˜์˜ PR์ด ์—ด๋ ค์•ผํ•˜๋Š” ๊ฑด ์•„๋‹™๋‹ˆ๋‹ค.

์›ํ™œํ•œ ์ฝ”๋“œ๋ฆฌ๋ทฐ์™€ ๋ฆฌ๋ทฐ์— ๋Œ€ํ•œ ๋‚ด์šฉ์„ ๋ฐ˜์˜ํ•˜๊ธฐ ์œ„ํ•ด์„œ PR์€ 3๊ฐœ์˜ commit์„ ๋„˜์–ด๊ฐ€์ง€ ์•Š์•„์•ผํ•ฉ๋‹ˆ๋‹ค.

ํ•˜๋‚˜์˜ PR์— 3๊ฐœ ์ด์ƒ์˜ File Change๋Š” ์ง€์–‘ํ•ฉ๋‹ˆ๋‹ค.


### 5. Commit

---

| ์ปค๋ฐ‹ ๊ตฌ๋ถ„ | ์„ค๋ช… |
| --- | --- |
| Feature | (Feature) ๊ฐœ์„  ๋˜๋Š” ๊ธฐ๋Šฅ ์ถ”๊ฐ€ |
| Bug | (Bug Fix) ๋ฒ„๊ทธ ์ˆ˜์ • |
| Doc | (Documentation) ๋ฌธ์„œ ์ž‘์—… |
| Test | (Test) ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€/์ˆ˜์ • |
| Build | (Build) ๋นŒ๋“œ ํ”„๋กœ์„ธ์Šค ๊ด€๋ จ ์ˆ˜์ •(yml) |
| Performance | (Performance) ์†๋„ ๊ฐœ์„  |
| Refactor | (Cleanup) ์ฝ”๋“œ ์ •๋ฆฌ/๋ฆฌํŒฉํ† ๋ง |

- ์ด์Šˆ๋ฒˆํ˜ธ์™€ ํ•จ๊ป˜ ์ปค๋ฐ‹ ๋‚ด์šฉ์„ ์ ๋Š”๋‹ค.
- ์˜ˆ์‹œ : [#1] feataure : ~
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1929c47

Please sign in to comment.