From 892536d2833a164c196f5dfa9037b11ba19b5158 Mon Sep 17 00:00:00 2001
From: alswlfl29
Date: Sun, 8 Oct 2023 23:32:16 +0900
Subject: [PATCH 01/13] chore: update frontend submodule
---
frontend | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend b/frontend
index 1a59b19..2273424 160000
--- a/frontend
+++ b/frontend
@@ -1 +1 @@
-Subproject commit 1a59b196373c989a65784e7afc48078c6a6a7fec
+Subproject commit 2273424de5ae01fd2f08edd07f62b81bf3b59fc9
From beadc6c945807068bac393ed4fb5fa7b4bd48767 Mon Sep 17 00:00:00 2001
From: Heekyeong Park
Date: Tue, 10 Oct 2023 14:28:48 +0900
Subject: [PATCH 02/13] chore: update submodule
---
Ai-flask | 2 +-
frontend | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Ai-flask b/Ai-flask
index 7a1b922..ed11625 160000
--- a/Ai-flask
+++ b/Ai-flask
@@ -1 +1 @@
-Subproject commit 7a1b922df621c061ed9f464bab54335fbeff626f
+Subproject commit ed116252d241a0fcfb12c345f67672dc4d470093
diff --git a/frontend b/frontend
index 2273424..2a8ee11 160000
--- a/frontend
+++ b/frontend
@@ -1 +1 @@
-Subproject commit 2273424de5ae01fd2f08edd07f62b81bf3b59fc9
+Subproject commit 2a8ee116715b527336ff7a8eacaaf413dfd546cd
From 62d8f327a7c6809c18babcc4f7dcc8a2759e804b Mon Sep 17 00:00:00 2001
From: gs0428
Date: Tue, 10 Oct 2023 17:05:59 +0900
Subject: [PATCH 03/13] chore : update frontend submodule
---
frontend | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend b/frontend
index 2a8ee11..2273424 160000
--- a/frontend
+++ b/frontend
@@ -1 +1 @@
-Subproject commit 2a8ee116715b527336ff7a8eacaaf413dfd546cd
+Subproject commit 2273424de5ae01fd2f08edd07f62b81bf3b59fc9
From 6c6fe15160b1b6cfa389dc1ab9bcdf4c0e7eb9a1 Mon Sep 17 00:00:00 2001
From: Heekyeong Park
Date: Tue, 10 Oct 2023 17:23:10 +0900
Subject: [PATCH 04/13] chore: update ai submodule
---
Ai-flask | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Ai-flask b/Ai-flask
index ed11625..7a1b922 160000
--- a/Ai-flask
+++ b/Ai-flask
@@ -1 +1 @@
-Subproject commit ed116252d241a0fcfb12c345f67672dc4d470093
+Subproject commit 7a1b922df621c061ed9f464bab54335fbeff626f
From 77d0359d3890bb3f283adda241fc16f792da11f3 Mon Sep 17 00:00:00 2001
From: Heekyeong Park
Date: Wed, 11 Oct 2023 18:33:38 +0900
Subject: [PATCH 05/13] chore: backend submodule update
---
backend-spring | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend-spring b/backend-spring
index d7c27c1..dab0ed3 160000
--- a/backend-spring
+++ b/backend-spring
@@ -1 +1 @@
-Subproject commit d7c27c1fb53362f2978030bf75a28ffbbe5e1aef
+Subproject commit dab0ed3d520078ed8bc0fa7e4802f5e3cdd373d7
From 0460ef8675e526e8dadefe4372ce29fb9ecc8d5f Mon Sep 17 00:00:00 2001
From: alswlfl29
Date: Sat, 14 Oct 2023 19:35:46 +0900
Subject: [PATCH 06/13] chore: frontend submodule update
---
frontend | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend b/frontend
index 2273424..d391bb4 160000
--- a/frontend
+++ b/frontend
@@ -1 +1 @@
-Subproject commit 2273424de5ae01fd2f08edd07f62b81bf3b59fc9
+Subproject commit d391bb46b4cd9e242efb745b8cfd5d031b2cb6c0
From 43acd135b27b0907d1cfdd66e8e5375ecb40cf91 Mon Sep 17 00:00:00 2001
From: alswlfl29
Date: Mon, 16 Oct 2023 11:01:59 +0900
Subject: [PATCH 07/13] =?UTF-8?q?docs:=20=EB=A6=AC=EB=93=9C=EB=AF=B8=20?=
=?UTF-8?q?=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 267 ++++++++++++++++++++++++++++--------------------------
1 file changed, 138 insertions(+), 129 deletions(-)
diff --git a/README.md b/README.md
index 67128eb..aee173e 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,6 @@
## ๐ง Introduce
----
@@ -22,7 +21,7 @@
-
+
|
@@ -31,12 +30,11 @@
์ด ์ธ์์ ๋จ ํ๋๋ฐ์ ์๋ ๊ทธ๋ฆผ ์ผ๊ธฐ๋ฅผ ์์ฑํด๋ณด์ธ์
-
-๐ [www.gdiary.org](http://www.gdiary.org)
-
-๐ [medium](https://medium.com/@dkfud2121/g-diary-3e90e87722a2)
-
-
+ํ์ฌ๋ ์๋ฒ ์ค์ง๋ ์ํ์
๋๋ค!
+
+๐ [www.aiary.net](https://www.aiary.net)
+
+
|
@@ -47,72 +45,89 @@
-## ๐พ System Architecture
----
-
-
+
## ๐ Feature
----
+
### JWT๋ฅผ ์ด์ฉํ ํ์๊ฐ์
, ๋ก๊ทธ์ธ
-
-
+
+
+
-### ์ปค๋ฒ์ฌ์ง ๋ณ๊ฒฝ ๋ฐ ์์
-
+### ์ปค๋ฒ์ฌ์ง, ํ
๋ง ๋ณ๊ฒฝ ๋ฐ ์์
+
+
+
-### ์ผ๊ธฐ์์ฑ
+### ์ผ๊ธฐ์์ฑ(with ํค์๋)
+
์ผ๊ธฐ๋ฅผ ์์ฑํ๊ณ <๊ทธ๋ฆผ๊ฐ์ ธ์ค๊ธฐ> ๋ฅผ ๋๋ฆ
๋๋ค. AI ๋ก ํค์๋๋ฅผ ์ถ์ถํ์ฌ ์ด๋ฏธ์ง๋ฅผ ์ถ๋ ฅ๋ฉ๋๋ค.
๊ทธ๋ฆผ์ ์ ํํ๊ฑฐ๋ <๊ทธ๋ฆผ๊ทธ๋ฆฌ๊ธฐ>๋ก ์ง์ ๊ทธ๋ฆด ์ ์์ต๋๋ค.
-
+
+
+
+
+### ์ผ๊ธฐ์์ฑ(with Dall-E)
+
+์ผ๊ธฐ๋ฅผ ์์ฑํ๊ณ ๋ฅผ ๋๋ฆ
๋๋ค. Dall-E AI ๋ก ์ถ์ถ๋ ์ด๋ฏธ์ง๋ฅผ ์ ํํ์ฌ ๊ทธ๋ฆผ์ผ๊ธฐ๋ฅผ ์์ฑํ ์ ์์ต๋๋ค.
+
### ์บ๋ฆฐ๋๋ก ์ผ๊ธฐ ์กฐํ
-
+
+
-### ์์ฑ๋ฐฉ๋ฒ ๋ฐ ์๊ฐ
-
+### ์ผ๊ธฐ ๊ฒ์
+
+
-## ๐น [Demo]((https://www.youtube.com/watch?v=RCUEUDk4sVw))
-[![Video Label](http://img.youtube.com/vi/nJmduw8adEg/0.jpg)](https://youtu.be/nJmduw8adEg)
+
-
## ๐ป Tech Stack
----
+
+
-
+
+
+
-
-
+
+
+
+
+
+
+
@@ -122,8 +137,6 @@
-
-
@@ -136,150 +149,146 @@
```
-- Frontend: React, Zustand
-- Backend : Django, Django-Rest-FrameWork
-- Web Server: Nginx,
+- Frontend: Vite, React, TypeScript, React-Query, Zustand, Styled-Components
+- Backend : SpringBoot, Spring-Security, JPA, Gradle, Flask
+- Web Server: Nginx
- Asynchronous: Celery, Rabbitmq
- WSGI: Gunicorn
-- Database: AWS RDS MySQL
-- AI : KoNLPy
+- Database: AWS RDS MySQL, Redis
+- AI : KoNLPy, Dall-E 2
- Deployment: Docker, AWS EC2, AWS S3 bucket
- API Test : Postman
- API Documentation : Swagger
-- Monitoring : prometheus, grafana
- Others: Github, Notion, Zoom, Slack, Figma
-
```
-## ๐ฏ ERD
----
-
-
-
-
-
## ๐ API
----
-
-- api/v1/auth : ์ฌ์ฉ์ ์ ๋ณด ํ์ธ, ๋ก๊ทธ์ธ, ๋ก๊ทธ์์
-- api/v1/users : ์ฌ์ฉ์ ์ปค๋ฒ ์ด๋ฏธ์ง ๋ณ๊ฒฝ
-- api/v1/results : ๊ฒฐ๊ณผ ํค์๋ ๋ณ ์ด๋ฏธ์ง ์กฐํ
-- api/v1/text/ : ์ผ๊ธฐ๋ด์ฉ ํค์๋ ์ถ์ถ (AI)
-- api/v1/join : ํ์๊ฐ์
-- api/v1/diaries : ์ผ๊ธฐ ๋ชฉ๋ก ์กฐํ, ๋ฑ๋ก, ์กฐํ
-
-
-
+### ์ผ๊ธฐ, ์ ์ ๊ด๋ จ API
-## Monitoring
----
-| node exporter | Django |
-| :------------: | :-------------: |
-| | |
+
+
+- api/users/login : ์ฌ์ฉ์ ์ ๋ณด ํ์ธ, ๋ก๊ทธ์ธ
+- api/users/logout: ๋ก๊ทธ์์
+- api/users/join : ํ์๊ฐ์
+- api/users/profile: ์ฌ์ฉ์ ์ปค๋ฒ ์ด๋ฏธ์ง ์กฐํ, ๋ณ๊ฒฝ
+- api/users/theme: ํ
๋ง ๋ณ๊ฒฝ
-
-
+
+- api/diaries : ์ผ๊ธฐ ๋ชฉ๋ก ์กฐํ, ๋ฑ๋ก
+- api/diaries/{diaryId}: ์ผ๊ธฐ ์ญ์
+- api/diaries/search: ์ผ๊ธฐ ์ ๋ชฉ/๋ด์ฉ ๊ฒ์
+
+
+
## ๐ณ How to start
----
+
### 1. clone the repository
+
```
-git clone https://github.com/2023-SV-winter-bootcamp-G-Diary/G-Diary.git
+git clone https://github.com/AI-ary/docker-v2.git
```
+
### 2. Set environment file
-Path: G-Diary/backend/config/my_settings.py
-Django secret key & MySQL ํ๊ฒฝ๋ณ์ & S3 bucket
-```
-from pathlib import Path
-BASE_DIR = Path(__file__).resolve().parent.parent
-
-
-MY_SECRET = {
- "SECRET_KEY" : ''
-}
-
-MY_DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.mysql',
- 'NAME' : '',
- 'USER' : '',
- 'PASSWORD' : '',
- 'HOST': '',
- 'PORT': '3306',
- 'OPTIONS':{
- 'init_command' : "SET sql_mode='STRICT_TRANS_TABLES'"
- }
- }
-}
-
-MY_AWS_ACCESS_KEY_ID = {
- "AWS_ACCESS_KEY_ID" :''
-}
-MY_AWS_ACCESS_ACCESS_KEY = {
- "AWS_SECRET_ACCESS_KEY" : ""
-}
-MY_STORAGE_BUCKET_NAME = {
- "BUCKET_NAME" : ""
-}
-```
-
-Path: /G-Diary/backend/.env
-MySQL container ํ๊ฒฝ ๋ณ์ & RabbitMQ ํ๊ฒฝ๋ณ์
+Path: /docker-v2/backend-spring/src/main/resources/application.yml
+RDS, Redis, JWT ์ถ๊ฐ
```
-DEBUG=False
-MYSQL_DATABASE=
-MYSQL_ROOT_PASSWORD=
-MYSQL_PORT=3306
-TZ=Asia/Seoul
-RABBITMQ_HOST=
-RABBITMQ_USER=
-RABBITMQ_PASSWORD=
-RABBITMQ_VHOST=
+server:
+ servlet:
+ context-path: /api
+
+spring:
+ application:
+ name: aiary
+ jpa:
+ database: mysql
+ show-sql: true
+ hibernate:
+ ddl-auto: update
+ properties:
+ hibernate:
+ dialect: org.hibernate.dialect.MySQL8Dialect
+ format_sql: true
+ generate-ddl: true
+ redis:
+ host: localhost # ๋ก์ปฌ: localhost / docker: redis
+ port: 6379
+
+ datasource:
+ driver-class-name: com.mysql.cj.jdbc.Driver
+ url:
+ username:
+ password:
+
+cloud:
+ aws:
+ s3:
+ bucket:
+ stack.auto:
+ region.static:
+ credentials:
+ accessKey:
+ secretKey:
+
+jwt:
+ secret:
```
-
-Path: /G-Diary/frontend/.env.local
-์นด์นด์คํก ๊ณต์ ํ๊ธฐ ํ๊ฒฝ๋ณ์ (ํ์ฌ ๋ก์ปฌ์์๋ง ๊ฐ๋ฅ)
-```
-REACT_APP_KAKAO_KEY=''
-```
-Path: /G-Diary/.env
-RabbitMQ ํ๊ฒฝ๋ณ์
+Path: /docker-v2/Ai-flask/.env
+AI ํ๊ฒฝ๋ณ์
```
-RABBITMQ_HOST=
+# Dalle Open AI
+OPEN_AI_KEY=
+
+# Database
+DB_USERNAME=
+DB_PASSWORD=
+DB_HOST=
+DB_SCHEMA=
+DB_PORT=
+
+# RabbitMq
RABBITMQ_USER=
RABBITMQ_PASSWORD=
-RABBITMQ_VHOST=
+
+# S3
+ACCESS_KEY_ID=
+SECRET_ACCESS_KEY=
+S3_BUCKET_REGION=
+S3_BUCKET_NAME=
```
+
### 3. Run
+
```
docker-compose -f docker-compose.prod.yml up --build
```
+
## ๐จโ๐ป Members
----
-| [๋ฐํฌ๊ฒฝ](https://github.com/gmlrude) | [์ด๋ฏผ์ง](https://github.com/alswlfl29) | [์๊ด์](https://github.com/gs0428) |
-| --- | --- | --- |
-| | | |
-| Leader, Backend, DevOps | Frontend, DevOps | Frontend |
+
+| [๊ณ ์์ค](https://github.com/KoneJ) | [๋ฐํฌ๊ฒฝ](https://github.com/gmlrude) | [๋ฐ์ค์](https://github.com/GaBaljaintheroom) | [์ด๋ฏผ์ง](https://github.com/alswlfl29) | [์๊ด์](https://github.com/gs0428) | [์ด์์]() |
+| ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
+| | | | | | |
+| PM | Leader, Backend, DevOps | Backend, DevOps | Frontend | Frontend | Design |
![Footer](https://capsule-render.vercel.app/api?type=waving&color=auto&height=200&width=1212§ion=footer)
From e3ad9d4e43b84ea74b7d8f2d021ca63d76dc3b9e Mon Sep 17 00:00:00 2001
From: GaBaljaintheroom
Date: Sat, 18 Nov 2023 04:55:51 +0000
Subject: [PATCH 08/13] chore: update ai submodule
---
Ai-flask | 2 +-
backend-spring | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Ai-flask b/Ai-flask
index 7a1b922..54893ff 160000
--- a/Ai-flask
+++ b/Ai-flask
@@ -1 +1 @@
-Subproject commit 7a1b922df621c061ed9f464bab54335fbeff626f
+Subproject commit 54893ff98f0059283f72f168d841bad581144e96
diff --git a/backend-spring b/backend-spring
index dab0ed3..9e94590 160000
--- a/backend-spring
+++ b/backend-spring
@@ -1 +1 @@
-Subproject commit dab0ed3d520078ed8bc0fa7e4802f5e3cdd373d7
+Subproject commit 9e945909ff3e4e2b39de9de8ea082ac197e3988f
From 18c6064605eda1e6eff4060e79421ac99f4132fc Mon Sep 17 00:00:00 2001
From: GaBaljaintheroom
Date: Sat, 18 Nov 2023 05:12:10 +0000
Subject: [PATCH 09/13] chore: backend-spring submodule update
---
backend-spring | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend-spring b/backend-spring
index 9e94590..d4832e3 160000
--- a/backend-spring
+++ b/backend-spring
@@ -1 +1 @@
-Subproject commit 9e945909ff3e4e2b39de9de8ea082ac197e3988f
+Subproject commit d4832e3458009f972618bce1aff1b6b7decff7c2
From ed94df80feb9eb59d11566c60387dce95171b1c5 Mon Sep 17 00:00:00 2001
From: GaBaljaintheroom
Date: Sat, 18 Nov 2023 05:14:51 +0000
Subject: [PATCH 10/13] =?UTF-8?q?refactor:=20REACT=5FAPP=5FBACKEND=5FURL?=
=?UTF-8?q?=20=EC=88=98=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docker-compose.prod.yml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
index cb1f021..d0c475c 100644
--- a/docker-compose.prod.yml
+++ b/docker-compose.prod.yml
@@ -17,7 +17,7 @@ services:
environment:
- CI=true
- CHOKIDAR_USEPOLLING=true
- - REACT_APP_BACKEND_URL=http://localhost
+ - REACT_APP_BACKEND_URL=http://www.aiary.net
stdin_open: true
tty: true
networks:
@@ -67,13 +67,15 @@ services:
context: ./nginx
dockerfile: Dockerfile
ports:
+ - "443:443"
- "80:80"
volumes:
- build_frontend:/var/www/frontend
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/log:/var/log/nginx
- expose:
- - "80"
+ # expose:
+ # - "80"
+ # - "443"
depends_on:
- ai_backend
- backend
From f2c6494c31f8409b0dc23b15a3107c19d0a5f1a2 Mon Sep 17 00:00:00 2001
From: GaBaljaintheroom
Date: Sat, 18 Nov 2023 05:15:38 +0000
Subject: [PATCH 11/13] =?UTF-8?q?feat:=20server=20block=20=EC=88=98?=
=?UTF-8?q?=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
nginx/nginx.conf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index aef7da9..5ce953a 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -14,9 +14,9 @@ http {
server {
listen 80;
charset utf-8;
- server_name localhost;
+ server_name http://www.aiary.net;
client_max_body_size 0;
-
+
location /ai_api/ {
proxy_pass http://ai_api;
proxy_set_header Host $host:$server_port;
From c7bd1f746928779c14decd1ddd9fffd5713049e2 Mon Sep 17 00:00:00 2001
From: GaBaljaintheroom
Date: Sat, 18 Nov 2023 05:18:07 +0000
Subject: [PATCH 12/13] =?UTF-8?q?chore:=20frontend=20submodule=20=EC=97=85?=
=?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend b/frontend
index d391bb4..2273424 160000
--- a/frontend
+++ b/frontend
@@ -1 +1 @@
-Subproject commit d391bb46b4cd9e242efb745b8cfd5d031b2cb6c0
+Subproject commit 2273424de5ae01fd2f08edd07f62b81bf3b59fc9
From 9df339589772d08c10061cc68e73bce0e49f40a6 Mon Sep 17 00:00:00 2001
From: GaBaljaintheroom
Date: Sat, 18 Nov 2023 05:24:03 +0000
Subject: [PATCH 13/13] =?UTF-8?q?chore:=20frontend=20=EC=84=9C=EB=B8=8C=20?=
=?UTF-8?q?=EB=AA=A8=EB=93=88=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend b/frontend
index 2273424..6b3bb4f 160000
--- a/frontend
+++ b/frontend
@@ -1 +1 @@
-Subproject commit 2273424de5ae01fd2f08edd07f62b81bf3b59fc9
+Subproject commit 6b3bb4fec5ec09d79687f75cd6edfaa5080cf0a7