├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html └── src ├── App.vue ├── assets └── logo.png ├── components ├── ChatList.vue ├── ChatMessage.vue ├── ChatRoom.vue ├── Home.vue ├── Login.vue ├── User.vue └── UserProfile.vue ├── firebase.js └── main.js /.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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Voxer 2 | 3 | A walkie-talkie style chat app with Vue & Firebase. Watch the full [Vue Firebase Course](https://fireship.io/courses/vue/) 👀🔥. 4 | 5 | ## Project setup 6 | 7 | ``` 8 | git clone 9 | npm install 10 | ``` 11 | 12 | Add your Firebase project credentials to `src/firebase.js` 13 | 14 | ``` 15 | npm run serve 16 | ``` -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-chat", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "@vue/composition-api": "^0.5.0", 12 | "core-js": "^3.6.4", 13 | "firebase": "^7.13.1", 14 | "vue": "^2.6.11", 15 | "vue-router": "^3.1.6", 16 | "vuefire": "^2.2.2" 17 | }, 18 | "devDependencies": { 19 | "@vue/cli-plugin-babel": "~4.2.0", 20 | "@vue/cli-plugin-eslint": "~4.2.0", 21 | "@vue/cli-service": "~4.2.0", 22 | "babel-eslint": "^10.0.3", 23 | "eslint": "^6.7.2", 24 | "eslint-plugin-vue": "^6.1.2", 25 | "vue-template-compiler": "^2.6.11" 26 | }, 27 | "eslintConfig": { 28 | "root": true, 29 | "env": { 30 | "node": true 31 | }, 32 | "extends": [ 33 | "plugin:vue/essential", 34 | "eslint:recommended" 35 | ], 36 | "parserOptions": { 37 | "parser": "babel-eslint" 38 | }, 39 | "rules": {} 40 | }, 41 | "browserslist": [ 42 | "> 1%", 43 | "last 2 versions" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fireship-io/vue-firebase-walkie-talkie/a3342668a8d84fd2088e5e3fc9241a92808bca66/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 12 | 13 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 21 | 22 | 30 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fireship-io/vue-firebase-walkie-talkie/a3342668a8d84fd2088e5e3fc9241a92808bca66/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/ChatList.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | -------------------------------------------------------------------------------- /src/components/ChatMessage.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | 37 | -------------------------------------------------------------------------------- /src/components/ChatRoom.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | -------------------------------------------------------------------------------- /src/components/Login.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 74 | 75 | -------------------------------------------------------------------------------- /src/components/User.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /src/components/UserProfile.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 20 | -------------------------------------------------------------------------------- /src/firebase.js: -------------------------------------------------------------------------------- 1 | import firebase from 'firebase/app'; 2 | import 'firebase/firestore'; 3 | import 'firebase/auth'; 4 | import 'firebase/storage'; 5 | 6 | const firebaseConfig = { 7 | // your config here 8 | }; 9 | 10 | firebase.initializeApp(firebaseConfig); 11 | 12 | export const db = firebase.firestore(); 13 | export const auth = firebase.auth(); 14 | export const storage = firebase.storage(); 15 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import { firestorePlugin } from 'vuefire' 4 | import VueRouter from 'vue-router' 5 | 6 | import VueCompositionApi from '@vue/composition-api' 7 | Vue.use(VueCompositionApi) 8 | 9 | Vue.use(VueRouter) 10 | Vue.use(firestorePlugin) 11 | 12 | Vue.config.productionTip = false 13 | 14 | import Home from './components/Home' 15 | import ChatRoom from './components/ChatRoom' 16 | 17 | const router = new VueRouter({ 18 | routes: [ 19 | { path: '/', component: Home }, 20 | { path: '/chats/:id', component: ChatRoom, name: 'chat' } 21 | ] 22 | }) 23 | 24 | new Vue({ 25 | router, 26 | render: h => h(App), 27 | }).$mount('#app') 28 | --------------------------------------------------------------------------------