Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md update #52

Merged
merged 15 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
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
Binary file removed .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ out/

.jython_cache

.vscode


# Local .terraform directories
**/.terraform/*
# .tfstate files
*.tfstate
*.tfstate.*
terraform.exe

# Crash log files
crash.log
Expand Down
135 changes: 134 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,134 @@
# movie_chatbot
# 무비빔밥
사용자 선호 및 위치 기반 영화관을 추천해주는 **지능형 고객 지원 챗봇**

<img src="https://github.com/user-attachments/assets/342ac0ff-9b80-4e05-8504-551a7830d80e" width="400" height="400" />


- 🔗 서비스 링크 : http://d14hn9nv9zhgf7.cloudfront.net/
- 📅 개발 기간 : 2024.07.17 ~ 2024.09.03 (7주)

<br>

## 팀 구성 및 역할

<details>
<summary>Alyssa - 인공지능 담당</summary>
<div markdown="1">

- ChatGPT API를 활용한 응답 생성
- 사용자 질문 데이터 전처리
- 프롬프트 엔지니어링을 통한 영화관 추천 생성
- 프로젝트 협업 관리

</div>
</details>

<details>
<summary>Ryan - 인공지능 담당</summary>
<div markdown="1">

- LLM ChatGPT api를 활용한 응답 생성
- 사용자 질문에서 NER을 이용하여 Entity 추출
- koBERT,kiwi를 이용한 RAG구축 후
- FAISS를 이용한 Semantic Search, 및 Levenshtein distance 기반 검색 기능 개발
- LLM 응답 정형화

</div>
</details>

<details>
<summary>Yohan - 풀스택 담당</summary>
<div markdown="1">

- 백엔드
- Spring 애플리케이션 서버 개발
- AI 모델 구동을 위한 FastAPI 서버 개발
- OpenFeign을 사용해 서버 간 통신 구현
- MySQL DB 조회 기능 개발
- 프론트엔드
- 날짜 선택, 지역 선택 화면 구현

</div>
</details>

<details>
<summary>Mir - 풀스택 담당</summary>
<div markdown="1">

- 영화 상영정보 크롤링 및 DB에 저장
- 프론트엔드
- 채팅 화면 구현
- 질문-답변 채팅형태 구현 및 엔티티 관리
- 매뉴얼/응답대기 메시지 및 재확인 버튼/체크박스 구현
- 스타일 적용
- 백엔드 연결

</div>
</details>

<details>
<summary>Bryan - 클라우드 담당</summary>
<div markdown="1">

- AWS 인프라 설계
- Terraform을 활용해 AWS 구현
- Ansible을 활용한 EC2 인스턴스 개발 환경 구축
- Prometheus 및 Grafana를 활용한 인스턴스 모니터링 환경 구축

</div>
</details>

<details>
<summary>Eddy - 클라우드 담당</summary>
<div markdown="1">

- CI/CD 파이프라인 구축
- Docker를 이용한 애플리케이션 이미지 만들기 및 배포
- 전체적인 배포 환경에서의 애플리케이션 실행 테스트

</div>
</details>

<br>

## 주요 기능
- 채팅, 버튼을 통한, 의사소통 기능
- 영화 이름, 지역, 날짜, 시간 정보를 통해 조건에 맞는 영화관의 상영 정보 제공 기능

<br>

## Stack
- Frontend : <img src="https://img.shields.io/badge/react-61DAFB?style=for-the-badge&logo=react&logoColor=black">
- Backend : <img src="https://img.shields.io/badge/java-007396?style=for-the-badge&logo=java&logoColor=white"> <img src="https://img.shields.io/badge/spring-6DB33F?style=for-the-badge&logo=spring&logoColor=white"> <img src="https://img.shields.io/badge/springboot-6DB33F?style=for-the-badge&logo=springboot&logoColor=white"> <img src="https://img.shields.io/badge/JPA-6DB33F?style=for-the-badge&logoColor=white"> <img src="https://img.shields.io/badge/mysql-4479A1?style=for-the-badge&logo=mysql&logoColor=white">
- Cloud : <img src="https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=Docker&logoColor=white"> <img src="https://img.shields.io/badge/Terraform-844FBA?style=for-the-badge&logo=Terraform&logoColor=white"> <img src="https://img.shields.io/badge/Ansible-EE0000?style=for-the-badge&logo=Ansible&logoColor=white"> <img src="https://img.shields.io/badge/Github Actions-2088FF?style=for-the-badge&logo=githubactions&logoColor=white"> <img src="https://img.shields.io/badge/prometheus-E6522C?style=for-the-badge&logo=prometheus&logoColor=white"> <img src="https://img.shields.io/badge/grafana-F46800?style=for-the-badge&logo=grafana&logoColor=white"> <img src="https://img.shields.io/badge/AWS-FF9900?style=for-the-badge&logoColor=white">
- AI : <img src="https://img.shields.io/badge/python-3776AB?style=for-the-badge&logo=python&logoColor=white"> <img src="https://img.shields.io/badge/chatgpt-000000?style=for-the-badge"> <img src="https://img.shields.io/badge/kobert-512BD4?style=for-the-badge"> <img src="https://img.shields.io/badge/faiss-DB6A26?style=for-the-badge"> <img src="https://img.shields.io/badge/langchain-1C3C3C?style=for-the-badge&logo=langchain&logoColor=white">

<br>

## 아키텍처
![Movie-chatbot1](https://github.com/user-attachments/assets/1e5d10f9-a22c-4588-90c4-65a51d475259)


<br>

## 프로젝트 수행 결과

- [풀스택](https://github.com/KTB-19/movie_chatbot/blob/main/docs/%EA%B2%B0%EA%B3%BC_%ED%92%80%EC%8A%A4%ED%83%9D.md)
- [클라우드](https://github.com/KTB-19/movie_chatbot/blob/main/docs/%EA%B2%B0%EA%B3%BC_%ED%81%B4%EB%9D%BC%EC%9A%B0%EB%93%9C.md)
- [인공지능](https://github.com/KTB-19/movie_chatbot/blob/main/docs/%EA%B2%B0%EA%B3%BC_%EC%9D%B8%EA%B3%B5%EC%A7%80%EB%8A%A5.md)

<br>

## 트러블 슈팅

- [풀스택](https://github.com/KTB-19/movie_chatbot/blob/main/docs/%ED%8A%B8%EB%9F%AC%EB%B8%94%EC%8A%88%ED%8C%85_%ED%92%80%EC%8A%A4%ED%83%9D.md)
- [클라우드](https://github.com/KTB-19/movie_chatbot/blob/main/docs/%ED%8A%B8%EB%9F%AC%EB%B8%94%EC%8A%88%ED%8C%85_%ED%81%B4%EB%9D%BC%EC%9A%B0%EB%93%9C.md)
- [인공지능](https://github.com/KTB-19/movie_chatbot/blob/main/docs/%ED%8A%B8%EB%9F%AC%EB%B8%94%EC%8A%88%ED%8C%85_%EC%9D%B8%EA%B3%B5%EC%A7%80%EB%8A%A5.md)

<br>

## 회고

- [회고](https://github.com/KTB-19/movie_chatbot/blob/main/docs/%ED%9A%8C%EA%B3%A0.md)

<br>
6 changes: 6 additions & 0 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions cloud/ansible/crawling-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ version: '3.8'

services:
movie-crawling:
image: prunsoli/movie-crawling:2.0.7
image: prunsoli/movie-crawling:latest
container_name: movie-crawling

env_file:
- .env
environment:
- TZ=Asia/Seoul

cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.49.1
container_name: cadvisor
ports:
- "9100:8080"
- "9090:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ services:
- "3306:3306"
networks:
- export_network
volumes:
- /home/ec2-user/mysql:/var/lib/mysql

mysqld-exporter:
image: prom/mysqld-exporter:main
container_name: mysql_exporter
ports:
- "9100:9104"
- "9090:9104"
volumes:
- /home/ec2-user/config.my-cnf:/cfg/config-my.cnf
command:
Expand Down
24 changes: 21 additions & 3 deletions cloud/ansible/docker-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
- name: Install docker-compose
shell:
cmd: curl -L "https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
warn: false

- name: Chmod docker-compose
file:
Expand All @@ -42,7 +41,7 @@
src: /usr/local/bin/docker-compose
dest: /usr/bin/docker-compose
state: link

# 시간 바꾸기
- name: Set timezone to Asia/Seoul
ansible.builtin.command: timedatectl set-timezone Asia/Seoul

Expand All @@ -52,4 +51,23 @@

- name: Print the current timezone
ansible.builtin.debug:
var: timedatectl_output.stdout
var: timedatectl_output.stdout

# Node Exporter 설치
- name: Pull Node Exporter Docker image
ansible.builtin.docker_image:
name: quay.io/prometheus/node-exporter
tag: latest
source: pull

- name: Run Node Exporter container
ansible.builtin.docker_container:
name: node_exporter
image: quay.io/prometheus/node-exporter:latest
state: started
restart_policy: always
network_mode: host
pid_mode: host
volumes:
- /:/host:ro,rslave
command: --path.rootfs=/host
6 changes: 3 additions & 3 deletions cloud/ansible/work-instance.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: Deploy and run docker-compose on different hosts
hosts: backend, crawling
hosts: db, crawling
become: yes

tasks:
Expand All @@ -14,9 +14,9 @@
src: "{{ item.src }}"
dest: "{{ item.dest}}"
with_items:
- { src: 'backend-docker-compose.yml', dest: '/home/ec2-user/docker-compose.yml'}
- { src: 'db-docker-compose.yml', dest: '/home/ec2-user/docker-compose.yml'}
- { src: 'config.my-cnf', dest: '/home/ec2-user/config.my-cnf'}
when: "'backend' in group_names"
when: "'db' in group_names"

- name: Copy docker-compose.yml and .env to crawling servers
copy:
Expand Down
25 changes: 0 additions & 25 deletions cloud/terraform/environment/dev/front/.terraform.lock.hcl

This file was deleted.

2 changes: 1 addition & 1 deletion cloud/terraform/environment/dev/front/s3CD.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ provider "aws" {
}

resource "aws_s3_bucket" "react_website" {
bucket = "ktb-movie-bucket"
bucket = "ktb-movie-bucket-${workspace}"
}

# S3 버킷의 공용 접근 차단 설정
Expand Down
Loading
Loading