Weird Museum is a responsive web where you can bring images to life. There is a couple of famous paintings you can choose and you can create realistic face swaps based on the target painting by just taking a short video clip.
β¨ See our website! β¨
- Frontend : React
- API Server : Flask
- Deep learning : Pytorch, Colab
- Middleware : Gunicorn
- Web Server : Nginx
- Deployment: Docker, NHN Cloud, GCP(Cloud SQL, GCS bucket)
- Database: PostgreSQL
- API Test : Postman
- API Documentation : Swagger
- Version Control : Git, Github, GitKraken
β‘οΈ Why do we choose these tech stacks for this project?
Frontend | Backend | etc |
---|---|---|
$ git clone https://github.com/Dayflt/Silicon-Valley-Internship-Dayfly.git
$ cd Frontend
$ npm i
$ docker-compose up --build # build images and run containers
$ docker-compose down # stop running containers
$ docker-compose up # rerun containers
or
$ docker-compose down -v # stop running containers and delete its volume
See database
$ docker-compose exec postgres_db psql --username=postgres --dbname=video
(psql)
video=# \l #list all databases
video=# \dt #list all tables in the current database
video=# select * from video_info; #list all data of video_info table
Running
http://localhost:5000 # Flask application
http://localhost:5000/swagger # Swagger
http://localhost:3000 # React application
Check whether 80 and 443 ports are open
Modify configuration
Change domains and email addresses in init-letsencrypt.sh
Replace all occurrences of weirdmuseum.ml with your domain (ex: server_name museum.ml -> server_name 'your domain')
Run the init script to obtain SSL Certificates and Credentials (./certbot directory will be created)
$ chmod +x ./init-letsencrypt.sh # Make it executable
$ ./init-letsencrypt.sh # Run the init script
Check the status of your service
$ docker ps # See running containers
Once you obtain SSL Certificates and Credentials, use the commands below to run, stop or rerun the containers.
$ docker-compose -f docker-compose.prod.yml up --build
$ docker-compose down #stop running containers
$ docker- compose -f docker-compose.prod.yml up # rerun containers
or
$ docker-compose down # stop running containers and delete its volume
Running (based on our domain)
https://museum.ml # Nginx
$ docker ps # See running containers
$ docker ps -a # See all containers
$ docker-compose logs [service_name] # Check the service logs
$ docker images # See all built images
$ docker-compose rm -f $(docker ps -a -q) # Remove all containers
$ docker volume ls # See volumes
$ docker images prune # Remove untagged(none) images
$ docker network prune # Remove all unused network
$ docker volume prune # Remove all unused local volume
βββ README.md - 리λλ―Έ νμΌ
β
βββ Backend/ - λ°±μλ νλΌμ€ν¬ λλ ν 리
β βββ test_endpoints.py - unit test μ€ν νμΌ
β βββ run.py - Flask μ€ν μν νμΌ
β βββ views.py - SQLAlchamyμ κΈ°λ₯μ μ μν νμΌ
β βββ .flaskenv - Flask μ€νμ μν νκ²½λ³μ μ€μ νμΌ
β βββ dayfly-318913-a4b443321e00.json - Google Cloud Bucketμ μ κ·ΌνκΈ° μν κΆν μ λ³΄κ° λ΄κΈ΄ νμΌ
β βββ requirements.txt - λͺ¨λλ€μ μ 리ν νμΌ
β βββ web/
β βββ AI/ - AIλͺ¨λΈ μκ³ λ¦¬μ¦
β βββ data/result/ - λ°±μλ λμμ μμ μ μ₯ λλ ν 리
β βββ __init__.py - μ€νμν€λ €λ flask appμ΄ μ μλμ΄μλ νμΌ νλ‘μ νΈλ₯Ό μ€νμν€λ©΄ appμ ꡬλμν΄
β βββ config.py - νμ configuration μ¬νλ€μ΄ μ μλ νμΌ
β βββ gcp.py - google cloud bucketμ μ΄μ©ν΄ νμΌ μ
μΆλ ₯ μ€νΈλ¦Όμ λ€λ£¨κΈ° μν ν¨μκ° μ μλ νμΌ
β βββ models.py - video_tableμ΄λΌλ database classκ° μ μλ νμΌ
β βββ prdedictmix.py - AI λͺ¨λΈμ μ μ©ν΄μ μλΉμ€μ ν΅μ¬μΈ μμΈ μμ μμ±μ νκΈ° μν νμΌ
β βββ routes.py - API λͺ
μΈμκ° λͺ¨λ μ μλ νμΌ
β βββ views.py - database ORM μ μ νμΌ
β βββ static/
β βββ swagger.json - swagger μ μ νμΌ
β
βββ Frontend/
β βββ Dockerfile - νλ‘ νΈμ€λ λ컀νμΌ
β βββ public/
β β βββindex.html - React νλ‘μ νΈ νμ(favicon, titleμ€μ )
β β βββ logo.ico - μΉνμ΄μ§ favicon
β βββ package.json & package.lock.json - λΌμ΄λΈλ¬λ¦¬ κ΄λ¦¬ νμΌ
β βββ src/
β βββ index.js & index.css - React νλ‘μ νΈ νμΌ
β βββ App.js & App.css - page componentλ€ κ΄λ¦¬ νμΌ
β βββ App.test.js & setupTest.js
β βββ reportWebVitals.js
β βββ api.jsx - baseURL μ€μ
β βββ page/
β βββ css / - μ»΄ν¬λνΈλ€μ css
β βββ imgs / - μ»΄ν¬λνΈλ€μ image
β βββ Gallery.js - κ°€λ¬λ¦¬ νμ΄μ§
β βββ Home.js - λ©μΈ νμ΄μ§
β βββ Preview.js - Preview νμ΄μ§
β βββ Record.js - μΉμΊ νμ΄μ§
β βββ Result.js - κ²°κ³Όλ¬Ό νμ΄μ§
β βββ Selection.js - μ¬μ§ μ ν νμ΄μ§
β βββ components/
β βββ Modal.js - κ²°κ³Όλ¬Όμ μ 보 μ
λ ₯ νμ
μ°½
β
βββ Nginx/
β βββ Dockerfile - nginx λ컀νμΌ
β βββ nginx.conf - nginx μ€μ νμΌ
β
βββ Settings/ - νκ²½λ³μ μ€μ νμΌ
β βββ dev/
β β βββ .env.dev - κ°λ°νκ²½λ³μ μ€μ νμΌ
β βββ prod/
β βββ .env.prod - λ°°ν¬νκ²½λ³μ μ€μ νμΌ
βββ docker-compose.yml - κ°λ°μ© docker-composeνμΌ
βββ docker-compose.prod.yml - λ°°ν¬μ© docker-composeνμΌ
βββ init-letsencrypt.sh - SSLμΈμ¦μ λ°κΈλ°κΈ° μν κ³Όμ μ μλνμν¨ μ€ν¬λ¦½νΈνμΌ
βββ .gitignore
κΉμμ° | λ°©κ·Όμ | μ΄μ§ν | μ₯νμ° | κΉνμ |
---|---|---|---|---|
@ksy991018 | @banggu0321 | @penguin1109 | @aswooo | @harloxx |
Project Manager,DevOps | Front-end Developer | AI, Back-end Developer | Front-end Developer | AI, Backend-Developer |