├── .browserslistrc ├── .env ├── .eslintrc.js ├── .gitignore ├── Dockerfile ├── README.md ├── aws ├── Dockerfile └── default.conf ├── babel.config.js ├── docker-compose.aws.yml ├── docker-compose.yml ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── favicon.ico └── index.html ├── server ├── app.js ├── chat_namespace │ ├── events.js │ └── index.js ├── config │ └── index.js ├── index.js ├── redis │ └── index.js └── routes │ ├── room.js │ └── user.js ├── src ├── App.vue ├── assets │ ├── bck.jpg │ ├── local_env.png │ ├── logo.png │ ├── msg_bck.png │ └── scaling.png ├── components │ ├── ChatArea.vue │ ├── ChatDialog.vue │ ├── MessageArea.vue │ ├── UserList.vue │ ├── VideoArea.vue │ ├── conference │ │ └── Conference.vue │ └── video │ │ ├── AudioVideoControls.vue │ │ └── Video.vue ├── main.js ├── mixins │ └── WebRTC.js ├── router │ └── index.js ├── store │ └── index.js ├── styles │ ├── app.scss │ └── variables.scss ├── utils │ ├── ICEServers.js │ ├── config.js │ └── logging.js └── views │ ├── Chat.vue │ └── Home.vue └── vue.config.js /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not ie <= 8 4 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adrigardi90/video-chat/757b31d1db67727c2d5b15dd05b95edf78bdc863/.env -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'off' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 13 | }, 14 | parserOptions: { 15 | parser: 'babel-eslint' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.6 as build 2 | 3 | WORKDIR /videochat 4 | COPY package.json /videochat/ 5 | RUN npm install 6 | 7 | COPY ./ /videochat 8 | 9 | ARG VUE_APP_SOCKET_HOST=NOT_SET 10 | ARG VUE_APP_SOCKET_PORT=NOT_SET 11 | 12 | RUN export VUE_APP_SOCKET_HOST=${VUE_APP_SOCKET_HOST} VUE_APP_SOCKET_PORT=${VUE_APP_SOCKET_PORT} && npm run build 13 | 14 | CMD ["npm", "run", "run:server"] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # video-chat 2 | > Chat application with **1 to 1** and **many to many** video functionality using [VueJS](https://vuejs.org), [Vuex](https://vuex.vuejs.org), [WebRTC](https://webrtc.org/start/), [SocketIO](https://socket.io),NodeJS and [Redis](https://github.com/NodeRedis/node_redis) 3 | 4 | ## Quick start 5 | First of all, you need to install and run the redis in your PC. Here there is an [article](https://medium.com/@petehouston/install-and-config-redis-on-mac-os-x-via-homebrew-eb8df9a4f298) for Mac OS X. Once Redis is up and running: 6 | 7 | ```bash 8 | # Clone the repo 9 | git clone https://github.com/adrigardi90/video-chat 10 | 11 | # Change into the repo directory 12 | cd video-chat 13 | 14 | # install 15 | npm install 16 | 17 | # Start the FE in dev mode 18 | npm run serve 19 | 20 | # Start the server 21 | npm run run:server 22 | 23 | ``` 24 | Then visit http://localhost:8080 in your browser 25 | 26 | ## Horizontal scaling 27 | To test out the horizontal scaling we'll create 3 different instances. Each one running a unique nodeJS process serving the FE and exposing the API 28 | 29 |
30 |
31 |
Private chat with {{showDialog.user}}
29 |